Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] Optional inheritance of file configs from parent directo…
…ries Summary: Without this patch clang-tidy stops finding file configs on the nearest .clang-tidy file. In some cases it is not very convenient because it results in common parts duplication into every child .clang-tidy file. This diff adds optional config inheritance from the parent directories config files. Test Plan: Added test cases in existing config test. Reviewers: alexfh, gribozavr2, klimek, hokein Subscribers: njames93, arphaman, xazax.hun, aheejin, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D75184
- Loading branch information
1 parent
d85b387
commit cb1ee34
Showing
12 changed files
with
140 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
clang-tools-extra/test/clang-tidy/infrastructure/Inputs/config-files/3/.clang-tidy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
InheritParentConfig: true | ||
Checks: 'from-child3' | ||
HeaderFilterRegex: 'child3' |
8 changes: 8 additions & 0 deletions
8
clang-tools-extra/test/clang-tidy/infrastructure/Inputs/config-files/4/.clang-tidy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Checks: '-*,modernize-loop-convert,modernize-use-using' | ||
CheckOptions: | ||
- key: modernize-loop-convert.MaxCopySize | ||
value: '10' | ||
- key: modernize-loop-convert.MinConfidence | ||
value: reasonable | ||
- key: modernize-use-using.IgnoreMacros | ||
value: 1 |
9 changes: 9 additions & 0 deletions
9
clang-tools-extra/test/clang-tidy/infrastructure/Inputs/config-files/4/44/.clang-tidy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
InheritParentConfig: true | ||
Checks: 'llvm-qualified-auto' | ||
CheckOptions: | ||
- key: modernize-loop-convert.MaxCopySize | ||
value: '20' | ||
- key: llvm-qualified-auto.AddConstToQualified | ||
value: '1' | ||
- key: IgnoreMacros | ||
value: '0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters