Skip to content

Commit fe22727

Browse files
feat: add readme for errors severities
1 parent 7ef70c2 commit fe22727

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,24 @@ custom_lint:
227227
some_parameter: "some value"
228228
```
229229

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+
230248
### Obtaining the list of lints in the CI
231249

232250
Unfortunately, running `dart analyze` does not pick up our newly defined lints.

0 commit comments

Comments
 (0)