4 ms·
What's the current state of automatic enforcement of these? I know that Microsoft has built tooling to enforce a subset of them, but I'm not aware of anything
by senkora 2y ago
What's the current state of automatic enforcement of these? I know that Microsoft has built tooling to enforce a subset of them, but I'm not aware of anything for Linux that specifically targets these.
https://learn.microsoft.com/en-us/cpp/code-quality/using-the-cpp-core-guidelines-checkers?view=msvc-170 https://learn.microsoft.com/en-us/cpp/code-quality/using-the...
- pjmlp 2y agoThe best tooling to have them automatically applied are VC++ and Clion. Or you can get the DevOps team to install Sonar, PVS, and then it gets "automatically" enforced by not allowing merges with broken guidelines.
- caleb-troyer 2y agoClang-tidy[0] supports a good set of them (cppcoreguidelines- prefix). It supports extending the checks too with your own checks that operate over the AST[1], so if there are extra guidelines internal to your company like mine has, there's room for extension there. For automation, I've seen a few examples of people integrating clang-tidy into IDEs, git hooks, and code review systems. [0] https://clang.llvm.org/extra/clang-tidy/ https://clang.llvm.org/extra/clang-tidy/ [1] https://github.com/coveooss/clang-tidy-plugin-examples https://github.com/coveooss/clang-tidy-plugin-examples