Non-existing include path is not a fatal problem requiring exiting
the program. Instead we just print a warning and remove the non-
existing include path from the list.
This expands the CLI exclude feature to also allow excluding
filenames (with paths). When filename with recognized extension
is given to -i option then matching filenames (with paths) are
ignored when checking.
Ticket #2538 (Allow excluding files from the checking)
Only match full directory names as parts of whole paths. So -isrc
matches src/file.cpp and proj/src/file.cpp. But does not match
mysrc/file.cpp or proj/srcfiles/file.cpp.
Add support for giving list of ignored paths from CLI. This way
user can define paths one doesn't want to check (like generated
code). This first simple implementation only does exact matching,
no support for wildcards etc. And matching is always agains dir
names.
If the filtered dir name is part of the checked filename then the
file is ignored.
Ticket #1690 (Ability to exclude files and directories from checks)
The --exitcode-suppressions option was inconsistent with other
long options by taking the filename as separate argument. Now
it expects format --exitcode-suppressions=filename.txt like
other long options.
Ticket: #1837 (--suppresions file.txt inconsistent)
The option --suppressions-list was inconsistent with other options
so renaming it to --suppressions-list.
Ticket: #1837 (--suppresions file.txt inconsistent)
Ticket #2441 (Parsing of command line arguments breaks after --errorlist)
Instead of stopping processing command line options after
--errorlist process them all. This way e.g. --verbose can be given
also after the --errorlist.
Fix ticket #2496 (Is error reporting for an unneeded parameter wrong?)
There are several command line options / commands after which we
don't want Cppcheck to even try to open any files. Eg. printing
help or listing errors. So add new attribute for CmdLineParser to
track use of these options and exit before checking files when
the attribute is set.