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

No go files to analyze #865

Closed
hazcod opened this issue Nov 22, 2019 · 5 comments
Closed

No go files to analyze #865

hazcod opened this issue Nov 22, 2019 · 5 comments
Labels
bug Something isn't working
Projects

Comments

@hazcod
Copy link

hazcod commented Nov 22, 2019

Version:

~/Downloads/iron-redis$ $(go env GOPATH)/bin/golangci-lint version
golangci-lint has version 1.21.0 built from 645e794 on 2019-10-15T18:15:04Z

PoC:

~/Downloads/iron-redis$ ls . healthcheck/
.:
Dockerfile    README.md     healthcheck   redis.compose redis.conf

healthcheck/:
go.mod         go.sum         healthcheck.go vendor

~/Downloads/iron-redis$ $(go env GOPATH)/bin/golangci-lint run ./...
ERRO Running error: context loading failed: package github.com/go-redis/redis: no go files to analyze

~/Downloads/iron-redis$ $(go env GOPATH)/bin/golangci-lint run healthcheck/...
ERRO Running error: context loading failed: package github.com/go-redis/redis: no go files to analyze

~/Downloads/iron-redis$ $(go env GOPATH)/bin/golangci-lint run healthcheck/healthcheck.go
ERRO Running error: context loading failed: package github.com/go-redis/redis: no go files to analyze
@hazcod
Copy link
Author

hazcod commented Nov 25, 2019

This only happens when I do not have a go.mod in the root of my repository.
Creating a foo go.mod and having the rest in the subdirectory does not work.

@hazcod
Copy link
Author

hazcod commented Nov 26, 2019

Workaround for my case is by running the linter in the subdirectory: reviewdog/action-golangci-lint#15

@fdcds
Copy link

fdcds commented Feb 13, 2020

Probably a duplicate of #825.

@ernado ernado added this to Needs triage in Zero Bug via automation Feb 14, 2020
@kazhuravlev
Copy link

to fix error just

go get ./...
golangci-lint run

@jirfag
Copy link
Member

jirfag commented May 18, 2020

Duplicate of #825

@jirfag jirfag marked this as a duplicate of #825 May 18, 2020
@jirfag jirfag closed this as completed May 18, 2020
Zero Bug automation moved this from Needs triage to Closed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Zero Bug
  
Closed
Development

No branches or pull requests

5 participants