diff --git a/test/testdata/gosec.go b/test/testdata/gosec.go index df5ab3ea..452567ca 100644 --- a/test/testdata/gosec.go +++ b/test/testdata/gosec.go @@ -3,7 +3,9 @@ package testdata import ( "crypto/md5" // ERROR "G501: Blacklisted import `crypto/md5`: weak cryptographic primitive" + "fmt" "log" + "os" ) func Gosec() { @@ -20,3 +22,8 @@ func GosecNolintGosec() { h := md5.New() //nolint:gosec log.Print(h) } + +func GosecNoErrorCheckingByDefault() { + f, _ := os.Create("foo") + fmt.Println(f) +}