mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-07 15:51:08 +00:00
Flag Global Usings in Headers with clang-tidy
A using-directive or using-declaration in the global namespace of a header reaches every file that includes it, and a using-declaration also makes the include checker treat that header as the one to include for the name. google-global-names-in-headers reports both, on changed lines like the existing check, so headers that still have one are not held to it until the line is touched. The check does not see a using inside a namespace. clang_tidy_diff.py's closing message assumed every finding was a missing include; it now says other findings need a manual fix.
This commit is contained in:
@@ -311,11 +311,12 @@ def main():
|
||||
for path in fixed:
|
||||
print(f" {path}")
|
||||
if failed and fixed:
|
||||
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not add.")
|
||||
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not fix.")
|
||||
return 1
|
||||
if failed:
|
||||
print(f"\nclang-tidy failed on {len(failed)} file(s). Add the includes it names, or apply its "
|
||||
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows).")
|
||||
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows). "
|
||||
"Other findings need a manual fix.")
|
||||
return 1
|
||||
print("clang-tidy passed.")
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user