We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On go1.20rc3, it seems that golangci-lint consumes a lot of memory.
On my environment, if I execute golangci-lint to https://github.com/golangci/golangci-lint itself, then golangci-lint consumes 49.54GB memory.
(Sorry, I haven't tried with the standalone linters yet.)
$ golangci-lint --version golangci-lint has version 1.50.1 built from 8926a95f on 2022-10-22T10:50:47Z
$ cat .golangci.yml linters-settings: depguard: list-type: denylist packages: # logging is allowed only by logutils.Log, logrus # is allowed to use only in logutils package - github.com/sirupsen/logrus packages-with-error-message: - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" dupl: threshold: 100 funlen: lines: 100 statements: 50 goconst: min-len: 2 min-occurrences: 3 gocritic: enabled-tags: - diagnostic - experimental - opinionated - performance - style disabled-checks: - dupImport # https://github.com/go-critic/go-critic/issues/845 - ifElseChain - octalLiteral - whyNoLint gocyclo: min-complexity: 15 goimports: local-prefixes: github.com/golangci/golangci-lint gomnd: # don't include the "operation" and "assign" checks: - argument - case - condition - return ignored-numbers: - '0' - '1' - '2' - '3' ignored-functions: - strings.SplitN govet: check-shadowing: true settings: printf: funcs: - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf lll: line-length: 140 misspell: locale: US nolintlint: allow-unused: false # report any unused nolint directives require-explanation: false # don't require an explanation for nolint directives require-specific: false # don't require nolint directives to be specific about which linter is being skipped linters: disable-all: true enable: - bodyclose - depguard - dogsled - dupl - errcheck - exportloopref - funlen - gochecknoinits - goconst - gocritic - gocyclo - gofmt - goimports - gomnd - goprintffuncname - gosec - gosimple - govet - ineffassign - lll - misspell - nakedret - noctx - nolintlint - staticcheck - stylecheck - typecheck - unconvert - unparam - unused - whitespace # don't enable: # - asciicheck # - scopelint # - gochecknoglobals # - gocognit # - godot # - godox # - goerr113 # - interfacer # - maligned # - nestif # - prealloc # - testpackage # - revive # - wsl issues: # Excluding configuration per-path, per-linter, per-text and per-source exclude-rules: - path: _test\.go linters: - gomnd - path: pkg/golinters/errcheck.go text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead" - path: pkg/commands/run.go text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead" - path: pkg/commands/run.go text: "SA1019: e.cfg.Run.Deadline is deprecated: Deadline exists for historical compatibility and should not be used." - path: pkg/golinters/gofumpt.go text: "SA1019: settings.LangVersion is deprecated: use the global `run.go` instead." - path: pkg/golinters/staticcheck_common.go text: "SA1019: settings.GoVersion is deprecated: use the global `run.go` instead." - path: pkg/lint/lintersdb/manager.go text: "SA1019: (.+).(GoVersion|LangVersion) is deprecated: use the global `run.go` instead." run: timeout: 5m skip-dirs: - test/testdata_etc # test files - internal/cache # extracted from Go code - internal/renameio # extracted from Go code - internal/robustio # extracted from Go code
$ go version && go env go version go1.20rc3 darwin/arm64 GO111MODULE="" GOARCH="arm64" GOBIN="/Users/skaji/bin" GOCACHE="/Users/skaji/Library/Caches/go-build" GOENV="/Users/skaji/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/skaji/.gopath/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/skaji/.gopath" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/Users/skaji/env/goenv/versions/1.20rc3" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/skaji/env/goenv/versions/1.20rc3/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.20rc3" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/skaji/src/github.com/golangci/golangci-lint/go.mod" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_n/2l6k5j153ydb_ndqls62n_ch0000gr/T/go-build1731709403=/tmp/go-build -gno-record-gcc-switches -fno-common"
$ golangci-lint cache clean $ golangci-lint run --verbose INFO [config_reader] Config search paths: [./ /Users/skaji/src/github.com/golangci/golangci-lint /Users/skaji/src/github.com/golangci /Users/skaji/src/github.com /Users/skaji/src /Users/skaji /Users /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 31 linters: [bodyclose depguard dogsled dupl errcheck exportloopref funlen gochecknoinits goconst gocritic gocyclo gofmt goimports gomnd goprintffuncname gosec gosimple govet ineffassign lll misspell nakedret noctx nolintlint staticcheck stylecheck typecheck unconvert unparam unused whitespace] INFO [loader] Go packages loading at mode 575 (name|types_sizes|compiled_files|deps|exports_file|files|imports) took 2.356542542s INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 26.524875ms ^C
This repository: https://github.com/golangci/golangci-lint
The text was updated successfully, but these errors were encountered:
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Sorry, something went wrong.
Hello,
the current stable version of golangci-lint is not ready for go1.20.
PR #3414 is here to add the support of go1.20.
@ldez Thank you. I will subscribe #3414.
The same on the large Go codebase. Go 1.20rc3, Fedora Linux 37, consumes a lot of memory and was killed.
No branches or pull requests
Welcome
Description of the problem
On go1.20rc3, it seems that golangci-lint consumes a lot of memory.
On my environment, if I execute golangci-lint to https://github.com/golangci/golangci-lint itself, then golangci-lint consumes 49.54GB memory.

(Sorry, I haven't tried with the standalone linters yet.)
Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
This repository: https://github.com/golangci/golangci-lint
The text was updated successfully, but these errors were encountered: