Skip to content

Fix #12505 (cli: Add option --check-version to pin cppcheck version)#6121

Merged
danmar merged 3 commits intocppcheck-opensource:mainfrom
cppchecksolutions:fix-12505
Apr 4, 2024
Merged

Fix #12505 (cli: Add option --check-version to pin cppcheck version)#6121
danmar merged 3 commits intocppcheck-opensource:mainfrom
cppchecksolutions:fix-12505

Conversation

@danmar
Copy link
Copy Markdown
Collaborator

@danmar danmar commented Mar 13, 2024

I chose to not add it in the help output. But I don't have a strong opinion it can be added there also.

This option was added for the safety certification. It could be very bad if a user runs one version of cppcheck and thinks that he runs another version.

@firewave
Copy link
Copy Markdown
Collaborator

What is the actual use case for this? I have never seen something like this and I do not like this at all.

Comment thread cli/cmdlineparser.cpp
Comment thread test/testcmdlineparser.cpp Outdated
@firewave
Copy link
Copy Markdown
Collaborator

We should simply return the raw version via something like --version-short and not add any logic at all to the application.

@danmar
Copy link
Copy Markdown
Collaborator Author

danmar commented Mar 13, 2024

We should simply return the raw version via something like --version-short and not add any logic at all to the application.

I don't see how that would help. It's the full --version output that is interesting for safety.

@danmar danmar merged commit 5ac87cc into cppcheck-opensource:main Apr 4, 2024
@danmar danmar deleted the fix-12505 branch April 12, 2024 12:17
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