Skip to content

style(clang-tidy): fix misc-internal-linkage errors #1752

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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

bavulapati
Copy link
Contributor

closes #1679

@jviotti jviotti merged commit e50d9f6 into sourcemeta:main Jun 23, 2025
14 checks passed
bavulapati added a commit to bavulapati/core that referenced this pull request Jun 23, 2025
Read blogs and played around with [CMAKE_CXX_CLANG_TIDY](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html).
Also read source code to understand the clang-tidy config of chromium, llvm and other projects.

We can provide complete context including headers to the clang-tidy tool for static analyzer by running it while building the code.
This also makes static analysis first-class citizen of the project, reporting errors before making commits.

For example, `misc-internal-linkage` check was reporting mostly false positives prior to this. With this, it also considered the headers,
where methods/functions were declared constant. Refer sourcemeta#1752

And we should also incrementally add the checks.

Signed-off-by: Balakrishna Avulapati <[email protected]>
@bavulapati bavulapati deleted the fix-misc-internal-linkage branch June 23, 2025 13:27
bavulapati added a commit to bavulapati/core that referenced this pull request Jun 27, 2025
Read blogs and played around with [CMAKE_CXX_CLANG_TIDY](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html).
Also read source code to understand the clang-tidy config of chromium, llvm and other projects.

We can provide complete context including headers to the clang-tidy tool for static analyzer by running it while building the code.
This also makes static analysis first-class citizen of the project, reporting errors before making commits.

For example, `misc-internal-linkage` check was reporting mostly false positives prior to this. With this, it also considered the headers,
where methods/functions were declared constant. Refer sourcemeta#1752

And we should also incrementally add the checks.

Signed-off-by: Balakrishna Avulapati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClangTidy warnings for misc-use-internal-linkage
2 participants