added (undocumented) `--no-cppcheck-build-dir` command-line option to clear previously specified build-dir
Extracted from #6876.
what is the use case. can't you just remove the previously specified build-dir.
what is the use case. can't you just remove the previously specified build-dir.
The point is to indicate that we do not want a build-dir in any case. Otherwise #6876 will inject it into the tests. Since that is the main reason to add it, it is undocumented for now. I also noted this in a comment in the code.
It would also allow someone to override it in case you have fixed (immutable) options like in a IDE or CI integration to test/workaround things (IMO it should be possible for any option to be overridden).
I don't see how the flag will be used in the pytest files. can't we do something in the pytest instead?
also I think the behavior should be the same locally and in the CI. so if I run python3 -m pytest sometest.py locally and a test does not use a cppcheck build dir then in the CI there should not be a cppcheck build dir neither.
I don't see how the flag will be used in the pytest files.
That was all stated in ma previous comment.
can't we do something in the pytest instead?
That would require a rework of all the test classes and I am not sure if we will get the desired behavior or if it would actually work. This approach is very unintrusive and it "just works" - and we have been using it for quite a while now.
No further feedback in over a month - merging.