rules:
  - id: no-string-eqeq
    languages: [java]
    patterns:
      - pattern-not: null == (String $Y)
      - pattern: $X == (String $Y)
    message: >-
      Strings should not be compared with '=='.
      This is a reference comparison operator.
      Use '.equals()' instead.
    severity: WARNING
    metadata:
      category: correctness
      technology:
        - java
