I want to completely disable certain diagnostics without changing the source code. How do I do that?
I looked through the documentation, but it's pretty confusing. I see three options such as: use cfg files (cfg or pvsconfig) with two different formats or a json file without mentioning its format.
My development environment is linux, vscode, cmake. Part of my CMakeList.txt:
pvs_studio_add_target(TARGET parser.analyze ALL
CONFIG ${PROJECT_SOURCE_DIR}/rules.pvsconfig
OUTPUT
HIDE_HELP
FORMAT errorfile-verbose
ANALYZE ${PROJECT_NAME}
MODE GA:1,2
)
where rules.pvsconfig:
//-V::730
Thanks!
If you already have the
*.pvsconfig
file with comments about turning off diagnostic rules, you can put it intopvs_studio_add_target
through theARGS
option:Note that the
CONFIG
option defines a*.cfg
file which is a slightly different entity. You can read more about that here.