dgryski.semgrep-go.oserrors.os-error-is-not-exist

profile photo of dgryskidgryski
Author
unknown
Download Count*
License

New code should use errors.Is with the appropriate error type

Run Locally

Run in CI

Defintion

rules:
  - id: os-error-is-not-exist
    patterns:
      - pattern: os.IsNotExist($ERR)
    fix: errors.Is($ERR, fs.ErrNotExist)
    message: New code should use errors.Is with the appropriate error type
    languages:
      - go
    severity: ERROR
    metadata:
      license: MIT