golangci-lint-action
golangci-lint-action copied to clipboard
No matching files
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
@jirfag Thought here?
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
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.
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.
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.
I'm running into the same issue. it doesnt detect .go files at all even though the folder is full of them.
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
Probably the same as https://github.com/golangci/golangci-lint/issues/825
It's because the dependencies are missing, a go mod tidy would fix the problem.