Skip to content
New issue

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

golangci-lint fails on 0.9.0 #213

Closed
aminvakil opened this issue Nov 19, 2021 · 1 comment · Fixed by #214
Closed

golangci-lint fails on 0.9.0 #213

aminvakil opened this issue Nov 19, 2021 · 1 comment · Fixed by #214

Comments

@aminvakil
Copy link
Contributor

Executing make on 0.9.0 fails here:

 ▶ running golangci-lint...
level=info msg="[config_reader] Used config file .golangci.yml"
level=info msg="[lintersdb] Active 51 linters: [asciicheck bodyclose deadcode depguard dogsled dupl durationcheck errcheck errname errorlint exhaustive exportloopref funlen gci gocognit goconst gocritic gocyclo goerr113 gofmt goimports gomnd gomoddirectives goprintffuncname gosec gosimple govet ifshort importas ineffassign makezero misspell nakedret nilerr nolintlint prealloc predeclared promlinter revive rowserrcheck staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck wastedassign whitespace wrapcheck]"
level=info msg="[loader] Go packages loading at mode 575 (compiled_files|files|name|types_sizes|deps|exports_file|imports) took 7.307463866s"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 15.005179ms"
level=info msg="[linters context] importas settings found, but no aliases listed. List aliases under alias: key."
level=info msg="[linters context/goanalysis] analyzers took 45.220306198s with top 10 stages: gocritic: 17.514422813s, buildir: 9.230428628s, the_only_name: 3.05068643s, wastedassign: 2.570746672s, dupl: 2.35058529s, buildssa: 1.755761449s, unconvert: 1.37404458s, goimports: 754.428194ms, inspect: 594.859506ms, gosec: 508.686347ms"
level=info msg="[runner] Issues before processing: 550, after processing: 5"
pkg/container/client.go:170:18: ioutilDeprecated: ioutil.ReadAll is deprecated, use io.ReadAll instead (gocritic)
		output, err := ioutil.ReadAll(attachRes.Reader)
		               ^
pkg/container/client_test.go:618:83: ioutilDeprecated: ioutil.NopCloser is deprecated, use io.NopCloser instead (gocritic)
	engineClient.On("ImagePull", ctx, config.Image, types.ImagePullOptions{}).Return(ioutil.NopCloser(readerResponse), nil)
	                                                                                 ^
pkg/container/client_test.go:880:73: ioutilDeprecated: ioutil.NopCloser is deprecated, use io.NopCloser instead (gocritic)
				engine.On("ImagePull", ctx, image, types.ImagePullOptions{}).Return(ioutil.NopCloser(readerResponse), nil)
				                                                                    ^
pkg/container/client_test.go:906:73: ioutilDeprecated: ioutil.NopCloser is deprecated, use io.NopCloser instead (gocritic)
				engine.On("ImagePull", ctx, image, types.ImagePullOptions{}).Return(ioutil.NopCloser(bytes.NewReader([]byte("{}"))), errors.New("failed to pull image"))
				                                                                    ^
cmd/main.go:244:19: ioutilDeprecated: ioutil.ReadFile is deprecated, use os.ReadFile instead (gocritic)
				caCert, err = ioutil.ReadFile(caCertFlag)
				              ^
level=info msg="[runner] Processors filtering stat (out/in): max_same_issues: 5/5, severity-rules: 5/5, sort_results: 5/5, cgo: 550/550, max_per_file_from_linter: 5/5, diff: 5/5, path_shortener: 5/5, exclude-rules: 96/178, nolint: 5/96, identifier_marker: 178/178, filename_unadjuster: 550/550, skip_dirs: 550/550, autogenerated_exclude: 178/550, exclude: 178/178, uniq_by_line: 5/5, max_from_linter: 5/5, source_code: 5/5, path_prefixer: 5/5, path_prettifier: 550/550, skip_files: 550/550"
level=info msg="[runner] processing took 23.421028ms with stages: nolint: 12.667069ms, exclude-rules: 4.623326ms, identifier_marker: 3.396919ms, path_prettifier: 1.066105ms, autogenerated_exclude: 902.605µs, exclude: 239.101µs, cgo: 187.201µs, skip_dirs: 146.9µs, source_code: 141.5µs, filename_unadjuster: 35.301µs, max_same_issues: 4.7µs, uniq_by_line: 3.6µs, path_shortener: 2.1µs, max_per_file_from_linter: 1.8µs, max_from_linter: 1.5µs, diff: 400ns, severity-rules: 400ns, skip_files: 301ns, path_prefixer: 100ns, sort_results: 100ns"
level=info msg="[runner] linters took 17.483278783s with stages: goanalysis_metalinter: 17.459724853s"
level=info msg="File cache stats: 63 entries of total size 405.9KiB"
level=info msg="Memory: 250 samples, avg is 332.8MB, max is 672.5MB"
level=info msg="Execution took 24.817762476s"
make: *** [Makefile:132: lint] Error 1

More log: https://github.com/aminvakil/aur/runs/4264067009?check_suite_focus=true

alexei-led added a commit that referenced this issue Nov 20, 2021
@aminvakil
Copy link
Contributor Author

I'm not sure if this is a new bug or same as before:

level=info msg="[config_reader] Used config file .golangci.yml"
level=info msg="[lintersdb] Active 51 linters: [asciicheck bodyclose deadcode depguard dogsled dupl durationcheck errcheck errname errorlint exhaustive exportloopref funlen gci gocognit goconst gocritic gocyclo goerr113 gofmt goimports gomnd gomoddirectives goprintffuncname gosec gosimple govet ifshort importas ineffassign makezero misspell nakedret nilerr nolintlint prealloc predeclared promlinter revive rowserrcheck staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck wastedassign whitespace wrapcheck]"
level=info msg="[loader] Go packages loading at mode 575 (compiled_files|deps|exports_file|files|name|imports|types_sizes) took 8.508075515s"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 19.822682ms"
level=info msg="[linters context] importas settings found, but no aliases listed. List aliases under alias: key."
level=info msg="[linters context/goanalysis] analyzers took 1m3.172071124s with top 10 stages: gocritic: 19.814275267s, buildir: 10.196756192s, the_only_name: 3.616494803s, dupl: 3.426215957s, wastedassign: 2.898769796s, buildssa: 2.399264265s, unconvert: 1.995833248s, goimports: 1.123674394s, exhaustive: 682.81867ms, gosec: 674.555751ms"
level=info msg="[runner/skip dirs] Skipped 336 issues from dir mocks by pattern mocks"
pkg/container/client.go:170:18: ioutilDeprecated: ioutil.ReadAll is deprecated, use io.ReadAll instead (gocritic)
		output, err := ioutil.ReadAll(attachRes.Reader)
		               ^
cmd/main.go:244:19: ioutilDeprecated: ioutil.ReadFile is deprecated, use os.ReadFile instead (gocritic)
				caCert, err = ioutil.ReadFile(caCertFlag)
				              ^
level=info msg="[runner] Issues before processing: 575, after processing: 2"
level=info msg="[runner] Processors filtering stat (out/in): diff: 2/2, path_shortener: 2/2, severity-rules: 2/2, filename_unadjuster: 575/575, autogenerated_exclude: 200/239, nolint: 2/119, max_from_linter: 2/2, source_code: 2/2, path_prefixer: 2/2, sort_results: 2/2, exclude: 200/200, uniq_by_line: 2/2, max_same_issues: 2/2, cgo: 575/575, path_prettifier: 575/575, skip_files: 575/575, skip_dirs: 239/575, identifier_marker: 200/200, exclude-rules: 119/200, max_per_file_from_linter: 2/2"
level=info msg="[runner] processing took 24.34195ms with stages: nolint: 10.536835ms, exclude-rules: 6.651259ms, identifier_marker: 4.408073ms, path_prettifier: 1.169493ms, autogenerated_exclude: 791.795µs, exclude: 327.298µs, skip_dirs: 217.899µs, source_code: 101.999µs, cgo: 87.2µs, filename_unadjuster: 38.599µs, max_same_issues: 3.3µs, uniq_by_line: 2.8µs, path_shortener: 1.5µs, max_from_linter: 1.3µs, max_per_file_from_linter: 900ns, diff: 600ns, sort_results: 400ns, severity-rules: 300ns, path_prefixer: 200ns, skip_files: 200ns"
level=info msg="[runner] linters took 19.960413291s with stages: goanalysis_metalinter: 19.935884542s"
level=info msg="File cache stats: 62 entries of total size 364.9KiB"
level=info msg="Memory: 286 samples, avg is 335.6MB, max is 691.0MB"
level=info msg="Execution took 28.497475435s"
make: *** [Makefile:132: lint] Error 1

https://github.com/aminvakil/aur/runs/4409658007?check_suite_focus=true#step:11:113

aminvakil added a commit to aminvakil/aur that referenced this issue Dec 4, 2021
upstream release

Revert to pumba 0.8.0-1

alexei-led/pumba#213

Revert "Use golangci linter"

This reverts commit 1c1a05a.

upgpkg: pumba 0.8.0-1

upstream release

Revert "upgpkg: pumba 0.9.0-1"

This reverts commit f2fe88c.
aminvakil added a commit to aminvakil/aur that referenced this issue Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant