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():
259
259
action = "store_true" ,
260
260
help = "Only check files in the compilation database" ,
261
261
)
262
+ parser .add_argument (
263
+ "-warnings-as-errors" ,
264
+ help = "Upgrades clang-tidy warnings to errors. Same format as '-checks'." ,
265
+ default = "" ,
266
+ )
262
267
263
268
clang_tidy_args = []
264
269
argv = sys .argv [1 :]
@@ -374,6 +379,8 @@ def main():
374
379
common_clang_tidy_args .append ("-extra-arg-before=%s" % arg )
375
380
for plugin in args .plugins :
376
381
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 )
377
384
378
385
for name in lines_by_file :
379
386
line_filter_json = json .dumps (
Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ Improvements to clang-tidy
97
97
Note: this may lead to false negatives; downstream users may need to adjust
98
98
their checks to preserve existing behavior.
99
99
100
+ - Improved :program: `clang-tidy-diff.py ` script. Add the `-warnings-as-errors `
101
+ argument to treat warnings as errors.
102
+
100
103
New checks
101
104
^^^^^^^^^^
102
105
You can’t perform that action at this time.
0 commit comments