mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
Remove spurious fmt.Printf calls including one of a key (#15344)
And add a semgrep for fmt.Printf/Println.
This commit is contained in:
committed by
GitHub
parent
cbdf16c5a1
commit
38b0fa6b53
16
tools/semgrep/ci/fmt-printf.yml
Normal file
16
tools/semgrep/ci/fmt-printf.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
rules:
|
||||
- id: fmt.Printf
|
||||
languages: [go]
|
||||
message: fmt.Printf/Println is forbidden outside of cmd and test files
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: fmt.Printf
|
||||
- pattern: fmt.Println
|
||||
severity: ERROR
|
||||
paths:
|
||||
exclude:
|
||||
- "*_test.go"
|
||||
- "cmd/*.go"
|
||||
- "cmd/**/*.go"
|
||||
- sdk/database/dbplugin/server.go # effectively a cmd
|
||||
- sdk/database/dbplugin/v5/plugin_server.go # effectively a cmd
|
||||
Reference in New Issue
Block a user