-
Notifications
You must be signed in to change notification settings - Fork 11
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
Lots of erroneous cppcheck errors in output #120
Comments
for file in $files_to_check; do
exclude_arg=""
if [ -n "$INPUT_EXCLUDE_DIR" ]; then
exclude_arg="-i$GITHUB_WORKSPACE/$INPUT_EXCLUDE_DIR"
fi
# Replace '/' with '_'
file_name=$(echo "$file" | tr '/' '_')
debug_print "Running cppcheck --project=compile_commands.json $CPPCHECK_ARGS --file-filter=$file --output-file=cppcheck_$file_name.txt $exclude_arg"
eval cppcheck --project=compile_commands.json "$CPPCHECK_ARGS" --file-filter="$file" --output-file="cppcheck_$file_name.txt" "$exclude_arg" || true
done This is the snippet for running cppcheck. This probably can be "fixed" by filtering |
Cool! This is good to know regardless of if this results in any changes! |
Thinking about this a little more it makes a ton of sense, I have a few boost projects in my repo that have tons of header files. |
I am seeing a ton of these messages in the output:
cppcheck: error: could not find any files matching the filter.
As in a run on my repo in the following screenshot:
You can check out the corresponding workflow run here.
Here's my workflow YAML:
TestCPP Static analysis - cppcheck/clang-tidy
Please see the following comment on the CPPCheck sourceforge:
https://sourceforge.net/p/cppcheck/discussion/general/thread/e293714bf0/#9bb4
Is there something I'm doing wrong? Is this expected behavior?
And is there a way to remove these from the output?
Thanks so much!
The text was updated successfully, but these errors were encountered: