dgryski.semgrep-go.oddcompare.odd-comparison-xor-neq-zero

profile photo of dgryskidgryski
Author
unknown
Download Count*
License

Odd comparison

Run Locally

Run in CI

Defintion

rules:
  - id: odd-comparison-xor-neq-zero
    patterns:
      - pattern: $X ^ $Y != 0
    fix: $X != $Y
    message: Odd comparison
    languages:
      - go
    severity: ERROR
    metadata:
      license: MIT