-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Speed #3925
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, Can you provide a reproducible context?
and a public repository. |
Tested on repo √ compose v2 % time gocritic check
gocritic check 0.37s user 0.16s system 177% cpu 0.297 total √ compose v2 % golangci/1.52.2/golangci-lint cache clean
√ compose v2 % time golangci/1.52.2/golangci-lint run
golangci/1.52.2/golangci-lint run 1.79s user 1.50s system 231% cpu 1.421 total run:
concurrency: 2
timeout: 10m
linters:
enable-all: false
disable-all: true
enable:
- gocritic
gocritic:
enabled-tags:
- diagnostic
- opinionated
- style
disabled-checks:
- paramTypeCombine
- unnamedResult
- whyNoLint |
The performance of linters cannot be analyzed one by one because golangci-lint creates a cache to optimize the run of several linters. |
Right now I simplify the config for creating a good example, in our project (I work with tbarbugli) we have more complex situation, then I don't know how to spot the issues |
Seeing the same issue with gocritic, disabling it reduced our lint time (on a modern macbook) from 95s to 30s. Interestingly, the |
Your feature request related to a problem? Please describe.
Golangci-lint is much slower than the linters it wraps
Describe the solution you'd like.
I think the shared analysis step makes sense but it seems to be incredibly slow, I see a 20x slow down between gocritic and the same with Golangci-lint
Describe alternatives you've considered.
Tried tuning params of all kinds, unfortunately, I have no time to dive into it more than that
Additional context.
No response
The text was updated successfully, but these errors were encountered: