17
7
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 plugins > pyramid_lint > diagnostics in your analysis_options.yaml file:
no_self_comparisons
plugins > pyramid_lint > diagnostics
analysis_options.yaml
plugins: pyramid_lint: <version> diagnostics: no_self_comparisons: true