# no_self_comparisons

| Severity | Quick Fix | Options |
|:--------:|:---------:|:-------:|
| Warning  |    ❌     |   ❌    |

## Details

**DO** avoid self comparisons.

```dart title="Bad"
if (foo == foo) {}
if (foo.property == foo.property) {}
```

```dart title="Good"
if (foo == bar) {}
if (foo.property == bar.property) {}
```

## Usage

To enable the `no_self_comparisons` rule, add `no_self_comparisons` under `plugins > pyramid_lint > diagnostics` in your `analysis_options.yaml` file:

```yaml
plugins:
  pyramid_lint: <version>
    diagnostics:
      no_self_comparisons: true
```
