dgryski.semgrep-go.oserrors.os-error-is-permission

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-permission
    patterns:
      - pattern: os.IsPermission($ERR)
    fix: errors.Is($ERR, fs.ErrPermission)
    message: New code should use errors.Is with the appropriate error type
    languages:
      - go
    severity: ERROR
    metadata:
      license: MIT