Closed
Description
It looks like excluding internal analysers, as was done in #763, is causing my config to fail, because linters-settings.govet.settings.printf
no longer exists.
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version v1.22.2 built from (unknown, mod sum: "h1:iaihss3Tf6NvZVjun3lHimKSgofPV1+FqE/cbehoiRQ=") on (unknown)
Config file
$ cat .golangci.toml
[linters]
disable-all = true
enable = [ "govet" ]
[linters-settings.govet.settings.printf]
funcs = [
"warnf",
"infof",
"errorf",
"logf",
"printf",
"warningf",
"fatalf",
"sprintf",
"fprintf",
"panicf",
]
Go environment
$ go version && go env
go version go1.13.6 linux/amd64
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/user/.local/share/umake/go/go-lang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/user/local/share/umake/go/go-lang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build142817576=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint run -v
INFO [config_reader] Used config file .golangci.toml
INFO [lintersdb] Active 1 linters: [govet]
INFO [lintersdb] Active 1 linters: [govet]
INFO [loader] Go packages loading at mode 575 (files|types_sizes|compiled_files|deps|name|exports_file|imports) took 1.819537546s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 163.287254ms
WARN [runner] Can't run linter govet: failed to configure analyzers: settings key "printf" must be valid analyzer name, valid analyzers: [asmdecl assign atomic bools buildtag cgocall composites copylocks errorsas httpresponse loopclosure lostcancel nilfunc shift stdmethods structtag tests unmarshal unreachable unsafeptr unusedresult]
INFO [runner] processing took 4.181µs with stages: max_same_issues: 1.344µs, filename_unadjuster: 435ns, nolint: 349ns, skip_dirs: 341ns, max_from_linter: 247ns, cgo: 168ns, path_prettifier: 168ns, identifier_marker: 149ns, path_shortener: 145ns, source_code: 139ns, diff: 134ns, skip_files: 133ns, autogenerated_exclude: 129ns, exclude: 81ns, uniq_by_line: 79ns, max_per_file_from_linter: 72ns, exclude-rules: 68ns
INFO [runner] linters took 245.841µs with stages: govet: 161.417µs
ERRO Running error: failed to configure analyzers: settings key "printf" must be valid analyzer name, valid analyzers: [asmdecl assign atomic bools buildtag cgocall composites copylocks errorsas httpresponse loopclosure lostcancel nilfunc shift stdmethods structtag tests unmarshal unreachable unsafeptr unusedresult]
INFO Memory: 21 samples, avg is 68.9MB, max is 69.3MB
INFO Execution took 1.994757397s