Hello everyone,
I'm using cppcheck with inline commands to check MISRA2012 rules, and I want to exclude every .c files holding the "tests" folder in their path. E.g:
foo/bar/tests/baz/file.c
These files were not designed to be analysed, so they are flooding my analysis results with many errors.
I'm trying to use the option --suppressions-list, and my suppressions.txt file looks like this:
*:foo/**/tests/**
But cppcheck is giving me a glob error
cppcheck: error: Failed to add suppression. Invalid glob pattern 'foo/**/tests/**'
I've tried many combinations of simple and double *, with or without "*.c" at the end, but without success.
If you have any ideas, I'll be glad to read it !
Thanks a lot
Turns out this suppressions.txt matches my needs:
*:foo/*/tests/*
The * character seems to be recursive inside subfolders.
Sorry for the post, hope it helps someone !
Log in to post a comment.
Hello everyone,
I'm using cppcheck with inline commands to check MISRA2012 rules, and I want to exclude every .c files holding the "tests" folder in their path. E.g:
These files were not designed to be analysed, so they are flooding my analysis results with many errors.
I'm trying to use the option --suppressions-list, and my suppressions.txt file looks like this:
But cppcheck is giving me a glob error
I've tried many combinations of simple and double *, with or without "*.c" at the end, but without success.
If you have any ideas, I'll be glad to read it !
Thanks a lot
Turns out this suppressions.txt matches my needs:
The * character seems to be recursive inside subfolders.
Sorry for the post, hope it helps someone !