Skip to content
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

added (undocumented) --no-cppcheck-build-dir command-line option to clear previously specified build-dir #6942

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

firewave
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator Author

Extracted from #6876.

@danmar
Copy link
Owner

danmar commented Oct 26, 2024

what is the use case. can't you just remove the previously specified build-dir.

@firewave
Copy link
Collaborator Author

firewave commented Oct 26, 2024

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).

@danmar
Copy link
Owner

danmar commented Oct 27, 2024

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.

@firewave
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants