document_ignores
Document ignore comments.
This rule is currently experimental and not yet available in a stable SDK.
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
除非另有说明,文档之所提及适用于 Dart 3.5.0 版本,本页面最后更新时间: 2024-08-07。 查看文档源码 或者 报告页面问题。