-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
64 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
Checks: 'clang-diagnostic-*,clang-analyzer-*,cert-*,performance-*' | ||
WarningsAsErrors: '*' |
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 @@ | ||
[ | ||
"\\S+registerRecordDeviceDriver.cpp" | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import json | ||
import subprocess | ||
import re | ||
|
||
if __name__ == '__main__': | ||
exclude = [] | ||
with open('.clang-tidy-exclude.json', 'rb') as fp: | ||
exclude = json.load(fp) | ||
|
||
assert isinstance(exclude, list) | ||
|
||
def is_excluded(file: str) -> bool: | ||
for reg in exclude: | ||
if re.search(reg, file) is not None: | ||
return True | ||
return False | ||
|
||
returnCode = 0 | ||
files = [] | ||
with open('compile_commands.json', 'rb') as fp: | ||
f = json.load(fp) | ||
for cmd in f: | ||
file = cmd['file'] | ||
if not is_excluded(file): | ||
files.append(file) | ||
else: | ||
print(f'Skipping {file}') | ||
print(f'Files: {files}') | ||
r = subprocess.run(['run-clang-tidy'] + files) | ||
exit(r.returncode) |
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