-
-
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
Global configuration #1324
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Sorry if I'm missing something but this is exactly how it works to me. I have a personal configuration file in my home directory and it's being used in every project that doesn't bundle it's own configuration file. |
Oh that's right. It works for me too. However, this only works if your projects are located inside your home directory. Try with a project that is located on another drive, and it won't work. Docs:
It is correct, but it doesn't search specifically in the home directory. |
Confirmed. |
@SVilgelm Thank you for the guidance. I will open a PR later. |
Is your feature request related to a problem? Please describe.
Default settings don't suit my needs. When I clone projects that are not using golangci-lint, I would like to keep the configuration I am using everywhere else.
Describe the solution you'd like
If
~/.golangci.yml
exists, use it as global configuration, but only if there is no.golangci.yml
file in the working directory or in parent directories. For example, if your projects are not located inside your home directory (maybe on another drive), the~/.golangci.yml
file won't be found and it won't work.Describe alternatives you've considered
Copying my default config to every new project, but it's not very practical. If you agree with the feature, but you don't have time to implement it, I can try and open a pull request.
The text was updated successfully, but these errors were encountered: