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

[cmd] Remove --tidy-config flag #3822

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Jan 19, 2023

CodeChecker analyze --tidy-config is a rarely used and redundant flag. ClangTidy options can be given through .clang-tidy file, --analyzer-config, --checker-config and --tidyargs flags.

@bruntib bruntib added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands clang-tidy 🐉 clang-tidy is a clang-based C++ “linter” tool. config ⚙️ labels Jan 19, 2023
@bruntib bruntib added this to the release 6.22.0 milestone Jan 19, 2023
@Szelethus
Copy link
Collaborator

I agree, though maybe it'd be more user friendly if we would depracate this flag first.

Copy link
Collaborator

@Szelethus Szelethus left a comment

Choose a reason for hiding this comment

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

In my view, this is the worst way to depracate a feature. You are removing the functionality behind the flag, but not the flag itself, leaving those that don't read warning messages (imagine multi-thousand line CI jobs, or integrated environments like vscode) to think that their configuration works, but it doesn't.

Mind that tidy configs are usually low-impact: its easy to not notice that the feature is off.

You should either

  • Remove the flag altogether;
  • Keep the functionality, but warn that its been deprecated and will be removed in an upcoming release.

@bruntib
Copy link
Contributor Author

bruntib commented Jan 25, 2023

Alright, I restored the flag's functionality. It will be removed in the next release.

Copy link
Collaborator

@Szelethus Szelethus left a comment

Choose a reason for hiding this comment

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

Please create a warning for when the flag is used, warning about the removal in the next release. Otherwise LGTM.

@@ -133,8 +133,7 @@ def get_checker_list(self, config) -> Tuple[List[str], List[str]]:
Return a list of checkers and warnings what needs to be enabled during
analysis.

If the file specified by the '--tidy-config' option contains a 'Checks'
key or the 'Checks' option is specified through the '--analyzer-config'
If 'Checks' option is specified through the '--analyzer-config'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
If 'Checks' option is specified through the '--analyzer-config'
If 'Checks' option is specified through '--analyzer-config'

CodeChecker analyze --tidy-config is a rarely used and redundant flag.
ClangTidy options can be given through .clang-tidy file,
--analyzer-config, --checker-config and --tidyargs flags.
@Szelethus Szelethus merged commit 4c3d9d6 into Ericsson:master Feb 3, 2023
@bruntib bruntib deleted the remove_tidy_config branch February 3, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy 🐉 clang-tidy is a clang-based C++ “linter” tool. CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands config ⚙️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants