m-tosch / mu

A small, simple c++ math library
MIT License
1 stars 0 forks source link

disable reported warnings for example files #99

Closed m-tosch closed 3 years ago

m-tosch commented 3 years ago

example files create a a lot of warnings (clang tidy and cpplint probably) disable checking for these files

m-tosch commented 3 years ago

NOT possible because this project uses the clangd language server vs code extension to make clang-tidy available. clangd can't take the clang-tidy cmd argument that would be necessary to disable checking in certain file (line-filter). NOLINT that is globally available with clang tidy only works on single lines.

if clang-tidy were to only be configured via cmake in this project, the following would probably work for any single target

set_target_properties(MyTarget PROPERTIES CXX_CLANG_TIDY "")

see https://stackoverflow.com/questions/44360961/selectively-disable-clang-tidy-warnings https://stackoverflow.com/questions/60996261/how-to-disable-clang-warnings-for-protobuf-generation-in-cmakelist-txt https://stackoverflow.com/questions/63301255/no-line-filter-equivalent-in-clang-tidy-config https://stackoverflow.com/questions/49591804/clang-tidy-cmake-exclude-file-from-check