mapbox / node-cpp-skel

Skeleton for bindings to C++ libraries for Node.js using node-addon-api
Creative Commons Zero v1.0 Universal
72 stars 10 forks source link

How do we want to document clang-tidy and clang-format config options? #126

Open sssoleileraaa opened 6 years ago

sssoleileraaa commented 6 years ago

Would it be useful to add documentation in the config files about different clang-tidy options for example? Or would we rather document in a readme?

springmeyer commented 6 years ago

👍 let's document more in the .clang-tidy and .clang-format themselves (since this will travel with them). Then in the docs we can link to the configs for more detail. Sound good?

Other todo we had:

sssoleileraaa commented 6 years ago

I like it! Instead of, for example:

AnalyzeTemporaryDtors: false
CheckOptions:   
  - key:             modernize-use-nullptr.NullMacros
    value:           'NULL'

we would have something like:

# AnalyzeTemporaryDtors is set to false because...
AnalyzeTemporaryDtors: false
CheckOptions:   
  # this check converts the usage of null pointer `NULL` constants to use the new C++11 nullptr keyword
  - key:             modernize-use-nullptr.NullMacros
    value:           'NULL'

I'd be happy to make this change in a PR so you can double-check my understanding of what each of these settings are doing. Also during this process we will be able to mark Clean up the configs so that they only include stuff we understand as done because everything in our config files will be documented and understood.