Skip to content

Commit ec92132

Browse files
committed
print clang-tidy warning and error
1 parent 9465704 commit ec92132

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp_linter_hooks/clang_tidy.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def run_clang_tidy(args) -> int:
2121
sp = subprocess.run(command, stdout=subprocess.PIPE)
2222
retval = sp.returncode
2323
output = sp.stdout.decode("utf-8")
24+
if "warning:" in output:
25+
retval = 1
2426
return retval, output
2527
except FileNotFoundError as e:
2628
retval = 1

0 commit comments

Comments
 (0)