document_ignores
Document ignore comments.
This rule is available as of Dart 3.5.
Details
#DO document all ignored diagnostic reports.
BAD:
dart
// ignore: unused_element
int _x = 1;
GOOD:
dart
// This private field will be used later.
// ignore: unused_element
int _x = 1;
Usage
#To enable the document_ignores
rule, add document_ignores
under linter > rules in your analysis_options.yaml
file:
analysis_options.yaml
yaml
linter:
rules:
- document_ignores
Unless stated otherwise, the documentation on this site reflects Dart 3.5.4. Page last updated on 2024-07-03. View source or report an issue.