[PATCH] D123074: [clang-tidy][run-clang-tidy.py] Fix typo in new -config-file option

Aaron Siddhartha Mondal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 13:36:16 PDT 2022


AaronSiddharthaMondal created this revision.
AaronSiddharthaMondal added a reviewer: aaron.ballman.
AaronSiddharthaMondal added a project: clang-tools-extra.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a project: All.
AaronSiddharthaMondal requested review of this revision.
Herald added a subscriber: cfe-commits.

The new `-config-file` option introduced by 9e1f4f1 <https://reviews.llvm.org/rG9e1f4f13984186984ba37513372c1b7e0c4ba4fd> was accidentally referenced
as `args.config_path` on the python side. This patch renames `args.config_path`
to `args.config_file`.

To avoid confusion with python `file` objects, the input argument for
`get_tidy_invocation` has been renamed from `config_path` to `config_file_path`.

See GitHub issue #54728 <https://github.com/llvm/llvm-project/issues/54728> for a discussion.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123074

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
@@ -90,7 +90,7 @@
 
 def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
                         header_filter, allow_enabling_alpha_checkers,
-                        extra_arg, extra_arg_before, quiet, config_path,
+                        extra_arg, extra_arg_before, quiet, config_file_path,
                         config, line_filter, use_color):
   """Gets a command line for clang-tidy."""
   start = [clang_tidy_binary]
@@ -121,8 +121,8 @@
   start.append('-p=' + build_path)
   if quiet:
       start.append('-quiet')
-  if config_path:
-      start.append('--config-file=' + config_path)
+  if config_file_path:
+      start.append('--config-file=' + config_file_path)
   elif config:
       start.append('-config=' + config)
   start.append(f)
@@ -194,7 +194,7 @@
                                      tmpdir, build_path, args.header_filter,
                                      args.allow_enabling_alpha_checkers,
                                      args.extra_arg, args.extra_arg_before,
-                                     args.quiet, args.config_path, args.config,
+                                     args.quiet, args.config_file, args.config,
                                      args.line_filter, args.use_color)
 
     proc = subprocess.Popen(invocation, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -304,7 +304,7 @@
                                      None, build_path, args.header_filter,
                                      args.allow_enabling_alpha_checkers,
                                      args.extra_arg, args.extra_arg_before,
-                                     args.quiet, args.config_path, args.config,
+                                     args.quiet, args.config_file, args.config,
                                      args.line_filter, args.use_color)
     invocation.append('-list-checks')
     invocation.append('-')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123074.420283.patch
Type: text/x-patch
Size: 2141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220404/cc373410/attachment.bin>


More information about the cfe-commits mailing list