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
Your feature request related to a problem? Please describe.
When I'm bootstrapping a project, I would like to create a default golangci-lint configuration file. The problem is that I don't have a quick command to type that will create this default configuration file for me.
Describe the solution you'd like.
I would like to have a command such as:
golangci-lint init
or even
golangci-lint config init
Once this command is run, a .golangci-lint.yml file is created inside my current directory. Then I can run golangci-lint and it will natively pick up this file.
Describe alternatives you've considered.
I could copy and paste from previous project but the problem is that linters come and go and it is not easy to know which one are deprecated and the one that are still used.
With an init command I would always be sure to have the latest and recommended linters enabled for my project
Additional context.
No response
The text was updated successfully, but these errors were encountered:
I could copy and paste from previous project but the problem is that linters come and go and it is not easy to know which one are deprecated and the one that are still used.
There are 10 deprecated linters on 113:
ifshort (2022)
structcheck (2022)
varcheck (2022)
deadcode (2022)
exhaustivestruct (2022)
nosnakecase (2022)
golint (2021)
maligned (2021)
interfacer (2021)
scopelint (2021)
We can improve the deprecated workflow but deprecating a linter happens very rarely.
The majority have been deprecated because of missing support of generics (related to go1.18 in 2022).
There are new linters often but it's a user's choice to enable them or not.
We improved the doc with the Since attribute to provide information to help with that. https://golangci-lint.run/usage/linters/
We can do better, and we will do better.
The problem is that I don't have a quick command to type that will create this default configuration file for me.
The only default configuration golangci-lint has is no configuration file: the set of default linters.
With an init command I would always be sure to have the latest and recommended linters enabled for my project
There are no recommended linters: the right linters and the right configuration depend on projects and users' preferences.
I think the real need behind this issue is the same as #1141.
Your feature request related to a problem? Please describe.
When I'm bootstrapping a project, I would like to create a default golangci-lint configuration file. The problem is that I don't have a quick command to type that will create this default configuration file for me.
Describe the solution you'd like.
I would like to have a command such as:
or even
Once this command is run, a
.golangci-lint.yml
file is created inside my current directory. Then I can rungolangci-lint
and it will natively pick up this file.Describe alternatives you've considered.
I could copy and paste from previous project but the problem is that linters come and go and it is not easy to know which one are deprecated and the one that are still used.
With an init command I would always be sure to have the latest and recommended linters enabled for my project
Additional context.
No response
The text was updated successfully, but these errors were encountered: