tyk
tyk copied to clipboard
`golangci-lint` GitHub Action does not actually perform linting of the source code.
Do you want to request a feature or report a bug?
I guess it is a bug, but a bug in CI, not code.
What is the current behavior?
The golangci-lint
runs only in the project root where there is no *.go
files so in reality the project is not being linted.
What is the expected behavior?
The golangci-lint
GitHub Action should lint the Go code.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
N/A
Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk?
N/A
P.S: I've prepared a fix for this if you'd like me to PR it.
Hey @craicoverflow we'll take a PR for sure! Adding @buger for visibility.
Sure thing @christtyk!
It should work by editing the args
value like so:
- args: --timeout=5m --verbose
+ args: ./... --timeout=5m --verbose
In https://github.com/TykTechnologies/tyk/blob/master/.github/workflows/golangci-lint.yml#L29
This has probablly been changed, I do see the golangci-lint report issues without changes to ./...
(see here). I also verified with nektos/act that the invocation particularly includes ./...
, if defined in the action .yml config:
[golangci-lint/lint] ❓ ::group::run golangci-lint
| Running [/root/golangci-lint-1.44.2-linux-amd64/golangci-lint run --out-format=github-actions ./... --timeout=5m --verbose] in [] ...
There is no difference in runs if ./...
is added to the config. If there are no objections, I suggest closing this issue.
@craicoverflow perhaps only-new-issues: true
is the underlying cause.
I will close this ticket, given the time that has passed since @titpetric's feedback.
If you still have an issue, please do not hesitate to re-open the ticket.
Thanks for supporting Tyk!