question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow .clang-tidy overrides

See original GitHub issue

As of version 2.3.0, clang-power-tools allows the use of using a .clang-tidy file by specifying -tidy .clang-tidy. This allows clang-tidy to default to using the nearest .clang-tidy file found which is great for global setups. However, there doesn’t appear to be a way to override settings or specify additional settings that may be missing from this file. For example, in our .clang-tidy file, we list the global checks that we’d like checked. If we want to isolate a check and apply the fix for that one check so we can commit them individually, we can do so by adding `-checks=-*,some-check -fix" to clang-tidy and it will only run single-check with the rest of the options read from the .clang-tidy file (errors, format, header regex, etc). I have tried to do this with the script with this

PowerShell.exe ... -tidy .clang-tidy -tidy-fix "-checks=-*,single-check -fix"

But -tidy-fix completely overrides -tidy. Instead of -tidy-fix, could there be -tidy-additional or some other parameter that would allow me to do this?

Keep up the great work!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chri7325commented, Dec 14, 2017

Ahh I see. My mistake again. I have verified that this work. Thanks again!

0reactions
cpp-red-lioncommented, Dec 14, 2017

We’re going to continue the work on this issue: #168

Read more comments on GitHub >

github_iconTop Results From Across the Web

modernize-use-override - clang-tidy
modernize -use-override¶. Adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Read more >
modernize-use-override - clang-tidy
Adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required. virtual on non...
Read more >
clang-tidy inserts multiple 'override' specifiers when fixing
to the project, clang-tidy inserts multiple instances of the override specifier, for example: void update_sizes() override override override etc ...
Read more >
Modern C++: Safety and Expressiveness with override and ...
We can enable clang-tidy in Compiler Explorer and if we pass the following command: --checks='modernize-use-override'.
Read more >
modernize-use-override.cpp - microsoft/clang-tools-extra
Fork of the clang-tools-extra repository. Contribute to microsoft/clang-tools-extra development by creating an account on GitHub.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found