Skip to content

Commit a9c8ada

Browse files
committed
fix: avoid appending --extra-arg= for clang-tidy
This avoids adding a `--extra-arg=` (with no arg value) to clang-tidy invocations.
1 parent 7885064 commit a9c8ada

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cpp_linter/clang_tools/clang_tidy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ def run_clang_tidy(
248248
extra_args = extra_args[0].split()
249249
for extra_arg in extra_args:
250250
arg = extra_arg.strip('"')
251-
cmds.append(f"--extra-arg={arg}")
251+
if arg: # avoid adding empty arg values
252+
cmds.append(f"--extra-arg={arg}")
252253
if tidy_review:
253254
# clang-tidy overwrites the file contents when applying fixes.
254255
# create a cache of original contents

0 commit comments

Comments
 (0)