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
INFO [config_reader] Config search paths: [./ /Users/zhaohq/go/src/sonargo-test /Users/zhaohq/go/src /Users/zhaohq/go /Users/zhaohq /Users /]
INFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck]
INFO [lintersdb] Optimized sublinters [staticcheck gosimple unused] into metalinter megacheck
INFO [loader] Go packages loading at mode load types and syntax took 1.470327816s
INFO [loader] SSA repr building timing: packages building 9.962618ms, total 101.292279ms
INFO [runner] worker.4 took 923.948µs with stages: structcheck: 322.505µs, varcheck: 299.842µs, deadcode: 281.891µs, typecheck: 10.47µs
INFO [runner] worker.1 took 1.613303ms with stages: errcheck: 911.329µs, ineffassign: 525.108µs
main.go:21:26: Error return value of (*github.com/go-redis/redis.StatusCmd).Result is not checked (errcheck)
client.Ping().Result()
^
INFO [runner] worker.3 took 271.552451ms with stages: govet: 271.546439ms
INFO [runner] worker.2 took 760.285582ms with stages: megacheck: 760.264137ms
INFO [runner] Workers idle times: #1: 758.658684ms, #3: 488.723978ms, #4: 759.063965ms
INFO [runner] Issues before processing: 2, after processing: 1
INFO [runner] processing took 181.582759ms with stages: nolint: 119.140907ms, source_code: 59.228038ms, exclude: 2.194487ms, skip_dirs: 506.979µs, cgo: 350.218µs, identifier_marker: 90.421µs, autogenerated_exclude: 45.13µs, max_same_issues: 7.018µs, uniq_by_line: 4.952µs, path_prettifier: 4.288µs, path_shortener: 3.108µs, max_from_linter: 2.814µs, filename_unadjuster: 1.449µs, max_per_file_from_linter: 1.148µs, diff: 779ns, exclude-rules: 588ns, skip_files: 435ns
INFO File cache stats: 1 entries of total size 333B
INFO Memory: 27 samples, avg is 198.2MB, max is 406.0MB
INFO Execution took 2.542864033s
But the return value of c.Close() error is not checked. just checked client.Ping().Result()
The text was updated successfully, but these errors were encountered:
This is actually expected. An excerpt from golangci-lint run --help:
$ golangci-lint run --help
[...]
--exclude-use-default Use or not use default excludes:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
[...]
If you want this error to be captured you can use --exclude-use-default=false when running the linter.
Thank you for creating the issue!
Please include the following information:
my code is
golangci-lint run -v
But the return value of c.Close() error is not checked. just checked client.Ping().Result()
The text was updated successfully, but these errors were encountered: