Closed gane5hvarma closed 2 years ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Hello,
can you provide the different outputs?
@ldez The above output is from github actions. The below output is from my local machine
INFO [config_reader] Config search paths: [./ /Users/ganesh/magic/repo /Users/ganesh/magic /Users/ganesh/Users /]
INFO [config_reader] Used config file .golangci.yaml
INFO [lintersdb] Active 21 linters: [bodyclose deadcode decorder errcheck gofmt gofumpt gosimple govet ineffassign makezero misspell nilerr nilnil rowserrcheck staticcheck structcheck tenv unconvert unparam varcheck wastedassign]
INFO [loader] Go packages loading at mode 575 (types_sizes|exports_file|name|imports|compiled_files|deps|files) took 533.497833ms
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 3.165333ms
INFO [linters context/goanalysis] analyzers took 15.681801583s with top 10 stages: buildir: 9.344975736s, buildssa: 818.130918ms, inspect: 744.726114ms, printf: 625.833346ms, fact_deprecated: 601.981614ms, ctrlflow: 485.527087ms, nilness: 473.911909ms, fact_purity: 448.142124ms, typedness: 350.026128ms, SA5012: 347.505069ms
WARN [linters context] rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] wastedassign is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
INFO [runner/max_same_issues] 4/7 issues with text "File is not `gofumpt`-ed" were hidden, use --max-same-issues
INFO [runner] Issues before processing: 65, after processing: 16
INFO [runner] Processors filtering stat (out/in): diff: 20/20, max_same_issues: 16/20, path_prefixer: 16/16, path_prettifier: 65/65, skip_dirs: 65/65, identifier_marker: 65/65, nolint: 26/50, uniq_by_line: 20/26, max_from_linter: 16/16, source_code: 16/16, sort_results: 16/16, exclude-rules: 50/65, max_per_file_from_linter: 20/20, path_shortener: 16/16, severity-rules: 16/16, filename_unadjuster: 65/65, skip_files: 65/65, autogenerated_exclude: 65/65, exclude: 65/65, cgo: 65/65
INFO [runner] processing took 8.221581ms with stages: nolint: 5.397417ms, identifier_marker: 764.208µs, exclude-rules: 736.958µs, autogenerated_exclude: 561.667µs, path_prettifier: 399.459µs, source_code: 183.917µs, skip_dirs: 123.875µs, max_same_issues: 17.583µs, cgo: 15.166µs, uniq_by_line: 5.75µs, max_from_linter: 4.999µs, filename_unadjuster: 3.834µs, max_per_file_from_linter: 2.625µs, path_shortener: 2.291µs, exclude: 792ns, severity-rules: 291ns, diff: 291ns, skip_files: 208ns, sort_results: 125ns, path_prefixer: 125ns
INFO [runner] linters took 3.474966667s with stages: goanalysis_metalinter: 3.466573917s, rowserrcheck: 10.125µs, structcheck: 5.666µs, wastedassign: 4.125µs
tests/file_test.go:18:6: `testProfile` is unused (deadcode)
func testSomething(t *testing.T) {
^
core/utils/somefile.go:167:16: Error return value of `worktree.Pull` is not checked (errcheck)
worktree.Pull(&git.PullOptions{
^
tests/somefile_test.go:115:9: Error return value of `cmd.Run` is not checked (errcheck)
cmd.Run()
^
core/utils/pretty.go:19: File is not `gofmt`-ed with `-s` (gofmt)
core/utils/pretty.go:22: File is not `gofumpt`-ed (gofumpt)
csvData, err := os.OpenFile(csvPath, os.O_CREATE|os.O_WRONLY, 0644)
core/registry/types.go:193: File is not `gofumpt`-ed (gofumpt)
}
INFO File cache stats: 78 entries of total size 303.5KiB
INFO Memory: 42 samples, avg is 681.0MB, max is 961.4MB
INFO Execution took 4.046977542s
I'm happy to get on a call and show you the issue live as well
I'm happy to get on a call and show you the issue live as well
This will never happen, I'm not free personal support.
deadcode
is deprecated and the other problems are related to a change from go1.19.
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
Go 1.19 issue and gofmt relates to #3110, #3109, #3101, #3069, #3098, #3109, #3063.
I'd got the same problem like yours, have you got the solution?
Welcome
Description of the problem
I have installed the latest version of golangci-lint(1.49.0). When its run on my local machine its throwing lint errors which is are correct. But when run on github actions its not showing any lint issues, which makes me less confident to use it in ci pipeline
Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository