Skip to content

fix #13431: consolidate CLI options for XML output format#7700

Merged
danmar merged 5 commits intocppcheck-opensource:mainfrom
ludviggunne:13431
Aug 7, 2025
Merged

fix #13431: consolidate CLI options for XML output format#7700
danmar merged 5 commits intocppcheck-opensource:mainfrom
ludviggunne:13431

Conversation

@ludviggunne
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread cli/cmdlineparser.h Outdated
Comment thread cli/cmdlineparser.cpp Outdated
Comment thread cli/cmdlineparser.cpp Outdated
Comment thread test/testcmdlineparser.cpp Outdated
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Aug 5, 2025

Comment thread cli/cmdlineparser.cpp
" * text\n"
" * sarif\n"
" * xml\n"
" * xml (deprecated)\n"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is deprecated we should show a message to the user about it when used and determine a version when this will be removed. As xmlv2 has been the default for a long time already I think it should be fine if this is removed in 2.20. The import code in the GUI and htmlreport should also reflect that.

Maybe also mention that text is the default.

We should also have a releasenotes.txt entry and ticket for the deprecation. And another for the planned removal.

Given the additional scope the whole deprecation thing should be done in a follow-up PR though.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --xml* options should be deprecated as well but I would not do that until we can show the CLI messages as findings.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --xml* options should be deprecated as well but I would not do that until we can show the CLI messages as findings.

not sure why we would deprecate those? it would break A LOT of scripts to remove them. we can just hide them from the --help output.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed https://trac.cppcheck.net/ticket/14055 and https://trac.cppcheck.net/ticket/14056 about this.

not sure why we would deprecate those?

So we do not have multiple ways to achieve the same. Also so the logic added here is not actually necessary.

@danmar danmar merged commit 633b4e4 into cppcheck-opensource:main Aug 7, 2025
63 checks passed
@ludviggunne ludviggunne deleted the 13431 branch August 25, 2025 12:27
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.

3 participants