depguard does not check for "fmt"
kokizzu opened this issue · comments
Kiswono Prayogo commented
golangci.yml config:
linters-settings:
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/sirupsen/logrus
- github.com/rs/zerolog
- fmt
example go file:
package main
import "fmt"
func main() {
fmt.Println("test")
}
example run golangci-lint run *.go
Expected result: error
Current result: no error
Will Dixon commented
change include-go-root
to true
. By default (which is false) it ignores imports from GOROOT because it is assumed safe as it is apart of Go's standard library.