Skip to content
Permalink
Browse files

Polish our run-clang-tidy fix a bit.

Change-Id: I5492aa1ca45f65a737f7068721ff895c141c72f4
  • Loading branch information...
svenpanne committed May 13, 2019
1 parent d7cdcb1 commit bcaa406ec98a75f454bfcfb86b89caad6fe47c4f
Showing with 6 additions and 2 deletions.
  1. +6 −2 scripts/run-clang-tidy.py
@@ -247,8 +247,12 @@ def main():
if args.checks:
invocation.append('-checks=' + args.checks)
invocation.append('-')
with open("/dev/null", "w") as dev_null:
subprocess.check_call(invocation, stdout=dev_null)
if args.quiet:
# Even with -quiet we still want to check if we can call clang-tidy.
with open(os.devnull, 'w') as dev_null:
subprocess.check_call(invocation, stdout=dev_null)
else:
subprocess.check_call(invocation)
except:
print("Unable to run clang-tidy.", file=sys.stderr)
sys.exit(1)

0 comments on commit bcaa406

Please sign in to comment.
You can’t perform that action at this time.