-
-
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
golangci-lint run cannot find golang files in the current directory #1833
Comments
Hello, could try to add a or use |
Adding a
|
If you don't want to patch |
Also please don't close github issues when there's still work to be done on them. The issue was intended to be more than a simple question, and I don't have access to re-open the issue to reflect that. |
But it is working without a If you haven't migrated to modules yet, maybe you are OK to set I also don't like closing issues that's not resolved but you confirmed it was working with both suggested alternatives so I saw the issue where |
I took a stab at the documentation changes with: #1835 |
I only found this while trying to create a minimal repro for #1832. Most of my go projects are go modules, so this isn't a problem for any actual projects. However, I do feel like there's either an issue with the go file searching, or something missing from the documentation, which is why I flagged the issue in the first place.
This feels more like a work-around than an actual fix.
It wasn't clear to me that you had created another issue for this problem. Of course, I'm okay with you organizing the issues for your project in whatever way makes the most sense for you. Fwiw, the documentation changes I suggested in #1835 may not be the best way to resolve this gap. I'll defer to you as to the best way to fix the code and/or update the documentation, but I'm happy to edit the documentation since that's relatively easy. :) |
Sorry, absolutely not trying to be a jerk here! I'll re-open the issue until we've found a proper solution regarding documentation, changes to the code or another suggestion, I shouldn't by myself decide what's best to do here! |
Sure. I understand. :) I think in the future if you cut a new issue to reorganize work, you might leave a comment on the old issues (like this one) with an FYI to that effect. That would probably cut down the confusion. We can discuss on the PR what the best way to update the docs is. Thanks for the clarification! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description of the problem
golangci-lint run
(with no other arguments) cannot find any golang files in a simple repository with one golang file:The
main.go
file is perfectly valid go:Things I tried which didn't help:
main.go
$GOPATH
main.go
into a subdirectorymain.go
into a second file.golangci-lint run ./...
instead.package
name inmain.go
tolib
The only way I was able to get
golangci-lint run
to lint themain.go
file was providing it as an argument, i.e.:golangci-lint run main.go
Version of golangci-lint
Config file
None.
Go environment
Verbose output of running
Code example or link to a public repository
This file was at
main.go
in the current directory, while runninggolangci-lint run
The text was updated successfully, but these errors were encountered: