-
Notifications
You must be signed in to change notification settings - Fork 7
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
golangci-line exit code lost #46
Comments
I'm able to reproduce this. Reading the |
hmmm....i must be reading something different. https://man7.org/linux/man-pages/man1/find.1.html: "-execdir command {} + always returns true, Also, I can't get the command to work when i use |
Also, it seems the way the find command is used is just to execute the |
Hmm I was going off of a couple sentences before that line:
And verified using the following experiment: 14:28 ~/go/src/github.com/tinkerbell/lint-install $ find . -name go.mod -execdir sh -c 'exit 1' '{}' '+'
14:28 ~/go/src/github.com/tinkerbell/lint-install $ echo $?
1 |
find is used to find the go.mod files (there may be many in a repo, in subdirs for e.g.) and then runs golangci-lint run from within that dir https://github.com/mistifyio/go-zfs/ is an example repo. |
This repo uses the
find
command to executegolangci-lint
in the top level directory. As a side affect of this I believe this swallows the exit code from the actualgolangci-lint
command. This makes it impossible to uselint-install
in CI where a non-zero exit code should fail a build.Same
golanglint-ci
command run on its own:Expected Behaviour
Current Behaviour
Possible Solution
Steps to Reproduce (for bugs)
Context
Your Environment
Operating System and version (e.g. Linux, Windows, MacOS):
How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:
Link to your project or a code example to reproduce issue:
The text was updated successfully, but these errors were encountered: