duplicate_rule
Details about the 'duplicate_rule' diagnostic produced by the Dart analyzer.
The rule '{0}' is already enabled and doesn't need to be enabled again.
Description
#The analyzer produces this diagnostic when the same lint rule is listed more than once in the linter/rules section.
Example
#
The following code produces this diagnostic because the lint rule
avoid_print appears twice in the list of enabled rules:
yaml
// %uri="analysis_options.yaml"
linter:
rules:
- avoid_print
- avoid_print
Common fixes
#Remove the duplicates:
yaml
// %uri="analysis_options.yaml"
linter:
rules:
- avoid_print
Was this page's content helpful?
除非另有说明,文档之所提及适用于 Dart 3.10.3 版本报告页面问题.