1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-23 22:15:04 +02:00

Rule for defering methods which return errors (#441)

This commit is contained in:
Sam Caccavale
2020-03-01 15:45:37 -05:00
committed by GitHub
parent a2ac0bf32b
commit 7525fe4bb7
6 changed files with 135 additions and 2 deletions

View File

@@ -131,6 +131,10 @@ var _ = Describe("gosec rules", func() {
runner("G306", testutils.SampleCodeG306)
})
It("should detect unsafe defer of os.Close", func() {
runner("G307", testutils.SampleCodeG307)
})
It("should detect weak crypto algorithms", func() {
runner("G401", testutils.SampleCodeG401)
})