5ec0d57313
Add security-scanner tool and github workflow
20 lines
416 B
YAML
20 lines
416 B
YAML
rules:
|
|
- id: hc-return-nil
|
|
patterns:
|
|
- pattern-either:
|
|
- pattern: |
|
|
if $X == nil {
|
|
return $X
|
|
}
|
|
- pattern: |
|
|
if $X != nil {
|
|
return ...
|
|
}
|
|
return $X
|
|
message: return nil instead of nil value
|
|
languages:
|
|
- go
|
|
severity: ERROR
|
|
metadata:
|
|
license: MIT
|