Skip to content

Commit

Permalink
.builds: ignore buggy gosec warning
Browse files Browse the repository at this point in the history
Currently gosec is throwing warnings for any defer statement that closes
a file (even if the error is handled) due to a bug.
Once securego/gosec#714 is fixed and a release has been made this patch
can be reverted.

Signed-off-by: Sam Whited <sam@samwhited.com>
  • Loading branch information
SamWhited committed Oct 23, 2021
1 parent dc9595d commit d267daa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .builds/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ tasks:
staticcheck ./...
# gosec does not handle modules correctly.
# See: https://github.com/securego/gosec/issues/622
gosec -exclude-dir=examples ./...
# It also does not handle deferred close statements correctly (G307).
# See: https://github.com/securego/gosec/issues/714
gosec -exclude=G307 -exclude-dir=examples ./...
checkdoc -fileheader.pattern='-' ./... <<EOF
Copyright \d\d\d\d The Mellium Contributors\.
Expand Down

0 comments on commit d267daa

Please sign in to comment.