File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,24 @@ custom_lint:
227
227
some_parameter: "some value"
228
228
` ` `
229
229
230
+ # ### Overriding lint error severities
231
+
232
+ You can also override the severity of lint rules in the `analysis_options.yaml` file.
233
+ This allows you to change INFO level lints to WARNING or ERROR, or vice versa :
234
+
235
+ ` ` ` yaml
236
+ custom_lint:
237
+ rules:
238
+ - my_lint_rule # enable the rule with default severity
239
+ errors:
240
+ my_lint_rule: error # Override severity to ERROR
241
+ another_rule: warning # Override severity to WARNING
242
+ third_rule: info # Override severity to INFO
243
+ fourth_rule: none # Suppress the lint entirely
244
+ ` ` `
245
+
246
+ The available severity levels are : ` error` , `warning`, `info`, and `none`.
247
+
230
248
# ## Obtaining the list of lints in the CI
231
249
232
250
Unfortunately, running `dart analyze` does not pick up our newly defined lints.
You can’t perform that action at this time.
0 commit comments