You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I have a syntax error, the error message is packed onto a single line, which makes it hard to diagnose. Just remove any comma or { and run golangci-lint.
Verbose output of running
$golangci-lint run -v ./...
INFO [config_reader] Config search paths: [./ /home/agniva/play/go/src/github.com/mattermost/mattermost-server /home/agniva/play/go/src/github.com/mattermost /home/agniva/play/go/src/github.com /home/agniva/play/go/src /home/agniva/play/go /home/agniva/play /home/agniva /home /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 10 linters: [deadcode gofmt golint gosimple govet ineffassign structcheck unconvert unused varcheck]
INFO [loader] Go packages loading at mode 575 (exports_file|imports|deps|files|name|types_sizes|compiled_files) took 1.362576059s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 330.637983ms
INFO [runner/unused/goanalysis] analyzers took 2.054162ms with top 10 stages: buildssa: 1.313166ms, U1000: 740.996µs
WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/home/agniva/play/go/src/github.com/mattermost/mattermost-server/store/sqlstore/user_store.go:1138:3: expected operand, found 'return'] INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 31.821416ms with top 10 stages: inspect: 1.464287ms, findcall: 1.392011ms, ctrlflow: 981.429µs, buildssa: 949.182µs, printf: 867.813µs, isgenerated: 534.749µs, asmdecl: 519.249µs, buildtag: 512.311µs, golint: 507.229µs, tests: 502.73µs WARN [runner] Can't run linter goanalysis_metalinter: deadcode: analysis skipped: errors in package: [/home/agniva/play/go/src/github.com/mattermost/mattermost-server/wsapi/api.go:7:2: could not import github.com/mattermost/mattermost-server/v5/app (/home/agniva/play/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:16:2: could not import github.com/mattermost/mattermost-server/v5/store/sqlstore (/home/agniva/play/go/src/github.com/mattermost/mattermost-server/store/sqlstore/user_store.go:1138:3: expected operand, found 'return'))]
INFO [runner] processing took 4.466µs with stages: max_same_issues: 1.287µs, skip_dirs: 386ns, max_from_linter: 352ns, filename_unadjuster: 308ns, nolint: 290ns, cgo: 257ns, path_prettifier: 241ns, exclude: 199ns, diff: 196ns, identifier_marker: 167ns, autogenerated_exclude: 161ns, source_code: 108ns, exclude-rules: 107ns, path_shortener: 107ns, max_per_file_from_linter: 104ns, skip_files: 102ns, uniq_by_line: 94ns
INFO [runner] linters took 3.488299632s with stages: unused: 2.216548519s, goanalysis_metalinter: 1.271631816s
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 50 samples, avg is 267.1MB, max is 802.8MB
INFO Execution took 5.224841104s
And moreover, there seems to be unrelated errors also sprouting up:
[/home/agniva/play/go/src/github.com/mattermost/mattermost-server/wsapi/api.go:7:2: could not import github.com/mattermost/mattermost-server/v5/app (/home/agniva/play/go/src/github.com/mattermost/mattermost-server/app/server_app_adapters.go:16:2: could not import github.com/mattermost/mattermost-server/v5/store/sqlstore
I think it will be nice if the each error is printed on a newline, therefore one can clearly see what the error is and act on it. For example, something like this:
WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [
/home/agniva/play/go/src/github.com/mattermost/mattermost-server/store/sqlstore/user_store.go:1138:3: expected operand, found 'return'
]
Can't agree more! Also we should fix the cryptic "failed prerequisites" error which can hide real cause (e.g. running golangci-lint on kubernetes repo without generated files just nearly caused me a heart attack because It looked like regression for bug we've fixed lately).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Thank you for creating the issue!
Please include the following information:
Version of golangci-lint
Config file
https://github.com/mattermost/mattermost-server/blob/master/.golangci.yml
Go environment
Whenever I have a syntax error, the error message is packed onto a single line, which makes it hard to diagnose. Just remove any comma or
{
and run golangci-lint.Verbose output of running
And moreover, there seems to be unrelated errors also sprouting up:
I think it will be nice if the each error is printed on a newline, therefore one can clearly see what the error is and act on it. For example, something like this:
Also related to #866 which should be fixed.
The text was updated successfully, but these errors were encountered: