$ # golangci-lint cache clean
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/gabolaev/d/reproduction /Users/gabolaev/d /Users/gabolaev /Users /]
INFO [lintersdb] Active 6 linters: [errcheck gosimple govet ineffassign staticcheck unused]
INFO [loader] Go packages loading at mode 575 (files|compiled_files|deps|exports_file|imports|name|types_sizes) took 80.6465ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 671.333µs
INFO [linters_context/goanalysis] analyzers took 22.21121ms with top 10 stages: buildir: 4.840833ms, fact_deprecated: 1.047916ms, ctrlflow: 868.047µs, errcheck: 710.334µs, SA9002: 663.334µs, printf: 639.212µs, SA4020: 559.833µs, SA4019: 559.667µs, unused: 544.792µs, ineffassign: 540.792µs
INFO [runner] processing took 998ns with stages: max_same_issues: 333ns, skip_dirs: 167ns, nolint: 125ns, sort_results: 125ns, max_from_linter: 42ns, diff: 42ns, exclude-rules: 41ns, max_per_file_from_linter: 41ns, severity-rules: 41ns, autogenerated_exclude: 41ns, path_prettifier: 0s, skip_files: 0s, path_shortener: 0s, path_prefixer: 0s, uniq_by_line: 0s, exclude: 0s, filename_unadjuster: 0s, source_code: 0s, fixer: 0s, cgo: 0s, identifier_marker: 0s
INFO [runner] linters took 95.207125ms with stages: goanalysis_metalinter: 94.983417ms
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 3 samples, avg is 32.2MB, max is 39.6MB
INFO Execution took 184.939709ms
Welcome
Description of the problem
Hi, we've encountered some strange behavior with the
govetprintflinter.If we edit the previously reported file without fixing the issue, it stops reporting the issue. However, if we clean the cache, it gets back to normal, but I'm not sure we're supposed to clean the cache before every
run.There is one interesting detail that I think may be a clue though.
It stops being unstable if we change the code so that it doesn't import
logger, but initializeslogin place:Version of golangci-lint
Details
Configuration
Details
Go environment
Details
Verbose output of running
Details
A minimal reproducible example or link to a public repository
https://github.com/gabolaev/gl-issue-reproduction
Validation