Skip to content

Commit a04885c

Browse files
committed
Fix cpplint args for empty header extension list
1 parent 4afef78 commit a04885c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

wpiformat/wpiformat/lint.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ def run_batch(config_file, names):
5353
basename = os.path.basename(pattern)
5454
header_exts.append(basename[basename.rfind(".") + 1 :].rstrip("$"))
5555

56-
sys.argv = [
57-
"cpplint.py",
58-
"--filter=-" + ",-".join(exclusion_filters),
59-
"--headers=" + ",".join(header_exts) if header_exts else "",
60-
"--quiet",
61-
] + names
56+
args = ["cpplint.py", "--filter=-" + ",-".join(exclusion_filters)]
57+
if header_exts:
58+
args.append("--headers=" + ",".join(header_exts))
59+
args.append("--quiet")
60+
sys.argv = args + names
6261

6362
# Run cpplint.py
6463
try:

0 commit comments

Comments
 (0)