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

fix: support GO111MODULE packages without go files in root #80

Closed
wants to merge 1 commit into from

Conversation

wwade
Copy link

@wwade wwade commented Feb 1, 2022

Some packages don't have any go files in the root directory, for
example, those following https://github.com/golang-standards/project-layout

In the case of a GO111MODULE package with go.mod in place, we can just
use "go list -m" and this will return the package name even without
any go files in the project root.

I've also updated the script to report all files that fail "go vet" in
a single run instead of exiting after finding the first error.

This is a fix for issue #30.

Some packages don't have any go files in the root directory, for
example, those following https://github.com/golang-standards/project-layout

In the case of a GO111MODULE package with go.mod in place, we can just
use "go list -m" and this will return the package name even without
any go files in the project root.

I've also updated the script to report all files that fail "go vet" in
a single run instead of exiting after finding the first error.

This is a fix for issue dnephin#30.
@wwade wwade closed this Feb 2, 2022
@wwade
Copy link
Author

wwade commented Feb 2, 2022

It seems better to just use the golangci-lint hook that runs a govet linter.

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.

1 participant