Clang-tidy CI test: bump version from 15 to 16 #5592
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR bumps the version used for
clang-tidy
CI tests from 15 to 16.It also addresses all the issues found with the upgraded tool.
Most of the issues are related to this newly introduced check:
The check enforces CppCoreGuidelines about constant and reference data members .
Few issues were instead related to these checks:
modernize-loop-convert
This check was already enabled, but
clang-tidy-16
broadens its scope with respect to previous versions.modernize-use-auto
Only one case. I am a bit confused because this should have been found also by version 15 of the tool.
misc-use-anonymous-namespace
This is a new check. Actually, the issues found with this check were false positives, but they disappeared when I properly set
misc-use-anonymous-namespace.HeaderFileExtensions
in the.clang-tidy
configuration file to recognize.H
files as headers.misc-misplaced-const
Only one case. I am a bit confused because this should have been found also by version 15 of the tool.
readability-misleading-indentation [NOW DISABLED DUE TO FALSE POSITIVES]
This check was already enabled. However, with this newer version of the tool, it seems to me that it generates some false positives. Therefore, I would like to propose to disable it. We may try to re-enable it when we will bump the version from 16 to 17.