dart-code-checker / dart-code-metrics

Software analytics tool that helps developers analyse and improve software quality.
https://dcm.dev
Other
860 stars 265 forks source link

How to ignore `avoid-unused-ignores`? #1224

Closed elliette closed 1 year ago

elliette commented 1 year ago

Environment and configuration

DCM version: 1.3.1 Dart SDK version: 3.0.0-290.3.beta

We are getting a bunch of warnings for `avoid-unused-ignores`, despite the fact that the rule is not enabled in our DCM config, and the warning itself doesn't link to an actual rule. Is there a way to disable `avoid-unused-ignores`? ``` WARNING This ignore does not suppress any diagnostic. Consider removing it. at /Users/elliottbrooks/dev/devtools/packages/devtools_app/lib/src/service/service_manager.dart:344:16 avoid-unused-ignores : https://dcm.dev/docs/individuals/rules ``` YAML: https://github.com/flutter/devtools/blob/master/analysis_options.yaml

What did you do?

Ran dcm analyze ...

What did you expect to happen?

Be able to ignore the rule avoid-unused-ignores

What actually happened?

Unable to ignore the rule avoid-unused-ignores

Participation

Additional comments

No response

incendial commented 1 year ago

@elliette the "avoid-unused-ignores" means you have an ignore that does not have any effect. Instead of ignoring the warning, can you just remove the ignore comment (or a rule id, if there are several ignores)?

incendial commented 1 year ago

It's not a rule per se and feels like removing the ignore is a better way fixing this than ignoring an unused ignore. That's why it does not support ignores.

incendial commented 1 year ago

@elliette can I close this one?