-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
golangci-lint fails with level=error msg="Parallel golangci-lint is running" #869
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
Comments
please check the user’s /tmp/golangci-lint.lock access permission |
I have run into this issue as well. func (e *Executor) acquireFileLock() bool {
lockFile := filepath.Join(os.TempDir(), "golangci-lint.lock")
func (e *Executor) releaseFileLock() {
if err := e.flock.Unlock(); err != nil { The above code does unlcock the file, but it does not delete the file which means even after execution other users are still unable to lock said file. See the note below from godoc on
To fix this I believe the file should be deleted in the release function. |
I've just upgraded to golangci-lint --help
ERRO Parallel golangci-lint is running I'm not able to find a |
It turns out there were actually multiple instances of |
* tag 'v1.23.7': (140 commits) dev: prepare v1.23.7 autogenerated_exclude: increase scanner max buffer size dev: use go1.14 change increase to increasing in timeout error dev: release v1.23.6 tools: update goreleaser dev: release v1.23.5 Support Go 1.14rc1. Simplify alpine Dockerfile add missing mips option Update to latest x/tools (golangci#930) fix golangci#869 by removing lock file after unlocking (golangci#947) dev: release v1.23.3 autogenerated_exclude: increase scanner buffer (golangci#955) gocritic: update disabled check warning message Add MIPS arch support dev: release v1.23.2 Fix misspelled words. (golangci#952) Add Intuit to README.md (golangci#936) fix golangci.yml reference ...
For those seeing this failure with newer versions, just add "--allow-parallel-runners" to your golangci-lint call. |
golangci-lint create a lock file in /tmp which prevents multiple invocation of golanci-lint. Our jenkins build can fail if golangci-lint is already running on the same slave. Add arg to prevent creation of that lock file. refs golangci/golangci-lint#869
property moved to configuration file |
Just downloaded v1.21.0 and started running into this error
Starting with UID : 1003 level=error msg="Parallel golangci-lint is running"
I have no .golangci.yml file and I'm not passing any options to it, just
golangci-lint run
. It's not even printing a help message if I pass-h
to it.The text was updated successfully, but these errors were encountered: