Skip to content

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

Merged
firewave merged 1 commit into
cppcheck-opensource:mainfrom
firewave:no-builddir
Dec 2, 2024
Merged

added (undocumented) --no-cppcheck-build-dir command-line option to clear previously specified build-dir#6942
firewave merged 1 commit into
cppcheck-opensource:mainfrom
firewave:no-builddir

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator Author

Extracted from #6876.

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Oct 26, 2024

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

@firewave
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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
Copy Markdown
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.

@firewave
Copy link
Copy Markdown
Collaborator Author

firewave commented Dec 2, 2024

No further feedback in over a month - merging.

@firewave firewave merged commit 0a8ec90 into cppcheck-opensource:main Dec 2, 2024
@firewave firewave deleted the no-builddir branch December 2, 2024 05:47
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