-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Add a clang-tidy build #2051
Comments
depends on #2053. |
This issue was marked as stale due to lack of activity. |
I started looking into adding clang-tidy to the build, subject to first addressing issues found in cleanup #2053, which I also wanted to tackle to sort of get more acquainted with the rest of the codebase. If all checks are enabled, the list of smells can get overwhelming very quickly; from the full list found at https://clang.llvm.org/extra/clang-tidy/checks/list.html, most of the cppcoreguidelines-* are a no-brainer IMHO. In fact, even cppcoreguidelines might need to be fune-tuned, as just running clang-tidy against api/include/opentelemetry/ produced 370 warnings, about half of them related to macro usage and magic numbers. Ultimately, in order to narrow down the scope of the cleanup that needs to be performed, a subset of checks to run against would have to be established first. It could always start as a very specific set of rules and expand the checks later on. |
CI was implemented recently for include-what-you-use, see: In my understanding, both iwyu and clang-tidy rely on CMake and a compilation database, so it is likely that the CI for clang-tidy can be implemented following the include-what-you-use pattern. Desirable features for the CI:
|
Add a clang-tidy build in CI.
The text was updated successfully, but these errors were encountered: