trailofbits.go.questionable-assignment.questionable-assignment

profile photo of trailofbitstrailofbits
Author
232
Download Count*

Should $X be modified when an error could be returned?

Run Locally

Run in CI

Defintion

rules:
  - id: questionable-assignment
    patterns:
      - pattern-either:
          - pattern: ..., $X . $Y, ..., err = ...
          - pattern: ..., $X . $Y, ..., err := ...
    message: Should `$X` be modified when an error could be returned?
    languages:
      - go
    severity: WARNING
    metadata:
      license: CC-BY-NC-SA-4.0