File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,12 @@ def main():
173
173
help = "checks filter, when not specified, use clang-tidy " "default" ,
174
174
default = "" ,
175
175
)
176
+ parser .add_argument (
177
+ "-config-file" ,
178
+ dest = "config_file" ,
179
+ help = "Specify the path of .clang-tidy or custom config file" ,
180
+ default = "" ,
181
+ )
176
182
parser .add_argument ("-use-color" , action = "store_true" , help = "Use colors in output" )
177
183
parser .add_argument (
178
184
"-path" , dest = "build_path" , help = "Path used to read a compile command database."
@@ -313,6 +319,8 @@ def main():
313
319
common_clang_tidy_args .append ("-fix" )
314
320
if args .checks != "" :
315
321
common_clang_tidy_args .append ("-checks=" + args .checks )
322
+ if args .config_file != "" :
323
+ common_clang_tidy_args .append ("-config-file=" + args .config_file )
316
324
if args .quiet :
317
325
common_clang_tidy_args .append ("-quiet" )
318
326
if args .build_path is not None :
Original file line number Diff line number Diff line change @@ -119,15 +119,22 @@ Improvements to clang-tidy
119
119
120
120
- Improved `--dump-config ` to print check options in alphabetical order.
121
121
122
- - Improved :program: `clang-tidy-diff.py ` script. It now returns exit code `1 `
123
- if any :program: `clang-tidy ` subprocess exits with a non-zero code or if
124
- exporting fixes fails. It now accepts a directory as a value for
125
- `-export-fixes ` to export individual yaml files for each compilation unit.
122
+ - Improved :program: `clang-tidy-diff.py ` script.
123
+ * Return exit code `1 ` if any :program: `clang-tidy ` subprocess exits with
124
+ a non-zero code or if exporting fixes fails.
125
+
126
+ * Accept a directory as a value for `-export-fixes ` to export individual
127
+ yaml files for each compilation unit.
128
+
129
+ * Introduce a `-config-file ` option that forwards a configuration file to
130
+ :program: `clang-tidy `. Corresponds to the `--config-file ` option in
131
+ :program: `clang-tidy `.
126
132
127
133
- Improved :program: `run-clang-tidy.py ` script. It now accepts a directory
128
134
as a value for `-export-fixes ` to export individual yaml files for each
129
135
compilation unit.
130
136
137
+
131
138
New checks
132
139
^^^^^^^^^^
133
140
You can’t perform that action at this time.
0 commit comments