15
6
DO avoid self comparisons.
if (foo == foo) {} if (foo.property == foo.property) {}
if (foo == bar) {} if (foo.property == bar.property) {}
To enable the no_self_comparisons rule, add no_self_comparisons under custom_lint > rules in your analysis_options.yaml file:
no_self_comparisons
analysis_options.yaml
custom_lint: rules: - no_self_comparisons