Skip to content
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

Add an option to run golangci-lint from the directory of config file #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

misha-ridge
Copy link

golangci-lint has issues running in subdirectories of the project, e.g. golangci/golangci-lint#3656, golangci/golangci-lint#3717, so running it from the directory where configuration file is located is the only option for some projects.

Make it work as an option, because not every project triggers this problem in golangci-lint, so for these projects overhead of looking up directory of config file and adjusting the paths after is not needed.

@misha-ridge
Copy link
Author

I will gladly remove the option and make -from-config-dir the default if you wish to.

golangci-lint has issues running in subdirectories of the project,
e.g. golangci/golangci-lint#3656, golangci/golangci-lint#3717, so
running it from the directory where configuration file is located
is the only option for some projects.

Make it work as an option, because not every project triggers this
problem in golangci-lint, so for these projects overhead of
looking up directory of config file and adjusting the paths after
is not needed.
@misha-ridge misha-ridge force-pushed the add-run-from-config-dir branch from 478554e to 7429faf Compare March 23, 2023 11:53
@stan-stately
Copy link

i'd really like this feature

@nametake nametake changed the base branch from master to main January 13, 2025 04:05
@nametake
Copy link
Owner

I initially thought this was an issue on the golangci-lint side, but I’m open to considering it.

I’ve added integration tests in handler_test.go. Please include a test case for the situation you’re addressing in this PR.
Also, please resolve the conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants