Skip to content

Commit

Permalink
chore: add gosec linter rules to .golangci.yml configuration file
Browse files Browse the repository at this point in the history
- Add specific rules for the `gosec` linter in `.golangci.yml`

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Apr 26, 2023
1 parent 7a528ab commit bd0d319
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ linters:
- nolintlint
- revive
- wastedassign

linters-settings:
gosec:
# To select a subset of rules to run.
# Available rules: https://github.com/securego/gosec#available-rules
# Default: [] - means include all rules
includes:
- G102
- G106
- G108
- G109
- G111
- G112
- G201
- G203

issues:
exclude-rules:
- linters:
Expand All @@ -37,9 +53,6 @@ issues:
- path: _test\.go
linters:
- gosec # security is not make sense in tests
- path: gin.go
linters:
- gosec
- linters:
- revive
path: _test\.go

0 comments on commit bd0d319

Please sign in to comment.