Skip to content

Commit

Permalink
Fix cpplint args for empty header extension list (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Oct 4, 2024
1 parent 4afef78 commit b3604cf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions wpiformat/wpiformat/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ def run_batch(config_file, names):
basename = os.path.basename(pattern)
header_exts.append(basename[basename.rfind(".") + 1 :].rstrip("$"))

sys.argv = [
"cpplint.py",
"--filter=-" + ",-".join(exclusion_filters),
"--headers=" + ",".join(header_exts) if header_exts else "",
"--quiet",
] + names
args = ["cpplint.py", "--filter=-" + ",-".join(exclusion_filters)]
if header_exts:
args.append("--headers=" + ",".join(header_exts))
args.append("--quiet")
sys.argv = args + names

# Run cpplint.py
try:
Expand Down

0 comments on commit b3604cf

Please sign in to comment.