JesApp created this revision.
JesApp added a reviewer: alexfh.
JesApp added a project: clang-tools-extra.
Herald added a subscriber: carlosgalvezp.
JesApp requested review of this revision.
Herald added a subscriber: cfe-commits.

The test invocation at the start of run-clang-tidy.py (line 257) prints all 
enabled checks - meaning either the default set or anything configured via the 
-checks option. If any checks were (un-)configured via the -config option, 
these are not printed. This is confusing to the user, since the list of checks 
that are printed may be different from the list of checks that are used by the 
non-testing calls to clang-tidy, where the -config option is passed correctly.

This patch adds the -config option to the test invocation of clang-tidy at the 
start of the script. This means that checks (un-)configured via the -config 
option (rather than the -checks option) are applied correctly, when printing 
the list of enabled checks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118104

Files:
  clang-tools-extra/clang-tidy/tool/run-clang-tidy.py


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -260,6 +260,8 @@
     invocation.append('-p=' + build_path)
     if args.checks:
       invocation.append('-checks=' + args.checks)
+    if args.config:
+      invocation.append('-config=' + args.config)
     invocation.append('-')
     if args.quiet:
       # Even with -quiet we still want to check if we can call clang-tidy.


Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -260,6 +260,8 @@
     invocation.append('-p=' + build_path)
     if args.checks:
       invocation.append('-checks=' + args.checks)
+    if args.config:
+      invocation.append('-config=' + args.config)
     invocation.append('-')
     if args.quiet:
       # Even with -quiet we still want to check if we can call clang-tidy.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to