snowplow / snowplow-cpp-tracker

Snowplow event tracker for C++. Add analytics to your C++ applications, games and servers
http://snowplowanalytics.com
Apache License 2.0
9 stars 6 forks source link

Use snowplow namespace (close #13) #43

Closed matus-tomlein closed 2 years ago

matus-tomlein commented 2 years ago

This PR actually does 2 things:

  1. Adds a C++ namespace snowplow to all classes and other types in the tracker.
  2. Formats the code using the Google C++ Style Guide.
    • I like the idea of adopting an existing style guide that made some decisions and just making it consistent across the code base. It is based on the Clang format style options and there are more style guides to choose from (e.g., Visual Studio, LLVM, Mozilla).
    • I appreciate that this is a bit out of scope from the task of adding a namespace. I wanted to adopt a formatting while adding the namespace and it turned out a bigger change :) I can separate this out into another PR if that makes sense.
matus-tomlein commented 2 years ago

Thanks @AlexBenny and @paulboocock for comments! Made a few changes:

  1. Split into two commits and made the second one refer to a new issue (I will rebase the PR when merging to keep the commits independent)
  2. I change the style guide to LLVM instead of Google which reflects almost all your suggestions except for the line length
  3. Added a .clang-format file which sets the LLVM style guide and adds a custom property to drop the requirement for max line length