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.
Adds clang-tidy static analyzer and linter checks to pull requests.
The failed checks are reported in the PR in a comment, see these for some examples:
slaren#11
slaren#12 (here it finds a bug in the command line parsing of
benchmark-matmult.cpp
)I tried to remove some of the most pedantic checks, but there are still a lot of failed checks in the current code that should be addressed over time. However, the workflow action will only report the checks failed in the lines modified by the PR, so the current issues will not be blamed on new PRs (unless they happen to be in the lines modified by the PR).
To test the settings in
.clang-tidy
locally:-DCMAKE_EXPORT_COMPILE_COMMANDS=on
-p
and the source file, for example:clang-tidy -p build llama.cpp
Note that since this adds comments to the PRs, it requires adding write permissions to the workflows in the project settings.