3 ms·
Pro tip: clang-tidy understands pretty much all of the cpp core guidelines, and if you're using clangd it can emit clang-tidy warnings for violations (and in so
by eklitzke 4y ago
Pro tip: clang-tidy understands pretty much all of the cpp core guidelines, and if you're using clangd it can emit clang-tidy warnings for violations (and in some cases even provide fixits). Not to mention a bunch of other really useful style rules. You should definitely be using it if you're not already.
- ephimetheus 4y agoRunning this on header-heavy or header-only code is still an unsolved problem however.
- account42 4y agoCan't you just pass your headers as "source files" to clang-tidy? Or create dummy source files that include them if your build system can't do that?
- ephimetheus 4y agoKind of, if you happen to have the right include paths and compiler flags, which even a compile command database from e.g. CMake doesn't give you (by default)