rules:
- id: useless-if-conditional
  message: if block checks for the same condition on both branches (`$X`)
  languages: [python]
  severity: WARNING
  pattern: |
    if $X:
        ...
    elif $X:
        ...
  metadata:
    category: maintainability
    technology:
    - python
- id: useless-if-body
  pattern: |
    if $X:
        $S
    else:
        $S
  message: useless if statment; both blocks have the same body
  languages: [python]
  severity: WARNING
  metadata:
    category: maintainability
    technology:
    - python
