File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,11 @@ def main():
259259 action = "store_true" ,
260260 help = "Only check files in the compilation database" ,
261261 )
262+ parser .add_argument (
263+ "-warnings-as-errors" ,
264+ help = "Upgrades clang-tidy warnings to errors. Same format as '-checks'." ,
265+ default = "" ,
266+ )
262267
263268 clang_tidy_args = []
264269 argv = sys .argv [1 :]
@@ -374,6 +379,8 @@ def main():
374379 common_clang_tidy_args .append ("-extra-arg-before=%s" % arg )
375380 for plugin in args .plugins :
376381 common_clang_tidy_args .append ("-load=%s" % plugin )
382+ if args .warnings_as_errors :
383+ common_clang_tidy_args .append ("-warnings-as-errors=" + args .warnings_as_errors )
377384
378385 for name in lines_by_file :
379386 line_filter_json = json .dumps (
Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ Improvements to clang-tidy
9797 Note: this may lead to false negatives; downstream users may need to adjust
9898 their checks to preserve existing behavior.
9999
100+ - Improved :program: `clang-tidy-diff.py ` script. Add the `-warnings-as-errors `
101+ argument to treat warnings as errors.
102+
100103New checks
101104^^^^^^^^^^
102105
You can’t perform that action at this time.
0 commit comments