2c540b03c5
* api: use errors.New not fmt.Errorf when error doesn't have format. * semgrep: add rule to catch fmt.Errorf use without formatting.
12 lines
266 B
YAML
12 lines
266 B
YAML
rules:
|
|
- id: "fmt_errorf_unformatted_use"
|
|
patterns:
|
|
- pattern: fmt.Errorf("...")
|
|
message: "Use of fmt.Errorf without formatting. Please use errors.New"
|
|
languages:
|
|
- "go"
|
|
severity: "WARNING"
|
|
paths:
|
|
include:
|
|
- "./api/*"
|