Skip to content

Commit 04b42c9

Browse files
aaronmondalAaronBallman
authored andcommitted
Fix typo in new -config-file option
The new -config-file option introduced by 9e1f4f1 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 llvm#54728 for a discussion.
1 parent 01055ed commit 04b42c9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def make_absolute(f, directory):
9090

9191
def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
9292
header_filter, allow_enabling_alpha_checkers,
93-
extra_arg, extra_arg_before, quiet, config_path,
93+
extra_arg, extra_arg_before, quiet, config_file_path,
9494
config, line_filter, use_color):
9595
"""Gets a command line for clang-tidy."""
9696
start = [clang_tidy_binary]
@@ -121,8 +121,8 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
121121
start.append('-p=' + build_path)
122122
if quiet:
123123
start.append('-quiet')
124-
if config_path:
125-
start.append('--config-file=' + config_path)
124+
if config_file_path:
125+
start.append('--config-file=' + config_file_path)
126126
elif config:
127127
start.append('-config=' + config)
128128
start.append(f)
@@ -194,7 +194,7 @@ def run_tidy(args, clang_tidy_binary, tmpdir, build_path, queue, lock,
194194
tmpdir, build_path, args.header_filter,
195195
args.allow_enabling_alpha_checkers,
196196
args.extra_arg, args.extra_arg_before,
197-
args.quiet, args.config_path, args.config,
197+
args.quiet, args.config_file, args.config,
198198
args.line_filter, args.use_color)
199199

200200
proc = subprocess.Popen(invocation, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -304,7 +304,7 @@ def main():
304304
None, build_path, args.header_filter,
305305
args.allow_enabling_alpha_checkers,
306306
args.extra_arg, args.extra_arg_before,
307-
args.quiet, args.config_path, args.config,
307+
args.quiet, args.config_file, args.config,
308308
args.line_filter, args.use_color)
309309
invocation.append('-list-checks')
310310
invocation.append('-')

0 commit comments

Comments
 (0)