golangci-lint-action icon indicating copy to clipboard operation
golangci-lint-action copied to clipboard

No matching files

Open utdrmac opened this issue 4 years ago • 8 comments

Trying to use this in my github action. Works fine when I run it on local machine, but on push to github, fails like this:

  Running [/home/runner/golangci-lint-1.40.1-linux-amd64/golangci-lint run --out-format=github-actions] in [] ...
  Error: pattern build: no matching files found (typecheck)
  
  Error: issues found
  Ran golangci-lint in 26932ms

https://github.com/bakingbacon/bakinbacon/blob/master/.github/workflows/build.yml

utdrmac avatar Jun 03 '21 03:06 utdrmac

@jirfag Thought here?

utdrmac avatar Jun 05 '21 22:06 utdrmac

Same^W^Similar. I added it (to a private repository) via PR. And that worked.

Rebased another PR, which it fails with "no go files to analyze":

 Running [/home/runner/golangci-lint-1.28.1-linux-amd64/golangci-lint run --out-format=github-actions] in [] ...
  level=error msg="Running error: context loading failed: no go files to analyze"
  
  Error: golangci-lint exit with code 5
  Ran golangci-lint in 3739ms

till avatar Jun 16 '21 14:06 till

I think I figured it out: The action took golang-ci from my project's go.mod. And that version is incompatible with the action.

till avatar Jun 16 '21 14:06 till

I don't have golang-ci in my go.mod so whatever @till did to fix their situation was unique to them. This is still an issue for me. I have since removed golangci-lint from my actions but would really like it back.

utdrmac avatar Jun 16 '21 14:06 utdrmac

I have to play with the versions also, when I upgrade I get a ton of issues and deprecated linters, etc..

But no matching files is gone.

till avatar Jun 16 '21 15:06 till

I'm running into the same issue. it doesnt detect .go files at all even though the folder is full of them.

gaby avatar Oct 20 '21 03:10 gaby

We get the same error in Github actions consistently, and the folder is full of .go files...

Running [/home/ubuntu/golangci-lint-1.43.0-linux-amd64/golangci-lint run --out-format=github-actions ./...] in [] ...
level=error msg="Running error: context loading failed: no go files to analyze"
  
Error: golangci-lint exit with code 5
Ran golangci-lint in 16197ms

chriscasola avatar Nov 17 '21 21:11 chriscasola

Probably the same as https://github.com/golangci/golangci-lint/issues/825

chriscasola avatar Nov 17 '21 21:11 chriscasola

It's because the dependencies are missing, a go mod tidy would fix the problem.

ldez avatar May 01 '24 03:05 ldez