-
-
Notifications
You must be signed in to change notification settings - Fork 164
.golangci.yaml
doesn't seem to be picked up on Windows
#583
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
Any hint on how can I debug this? |
If you want to see what config is picked up, use the $ /tmp/golangci-lint.exe run -v
level=info msg="[config_reader] Config search paths: [./ ...]"
level=info msg="[config_reader] Used config file .golangci.yaml" However, I don't think your problem is that it doesn't pick up the config. In your config file you specify local prefix run golangci-lint
Running [D:\a\_temp\80fc8004-77d1-4be1-8caa-521a7cd510c4\golangci-lint-1.49.0-windows-amd64\golangci-lint run --out-format=github-actions] in [] ...
Error: File is not `goimports`-ed with -local github.com/mattn/efm-langserver (goimports)
Error: File is not `goimports`-ed with -local github.com/mattn/efm-langserver (goimports)
Error: File is not `goimports`-ed with -local github.com/mattn/efm-langserver (goimports)
Warning: var-naming: don't use leading k in Go names; var kPrev should be prev (revive)
Error: issues found
Ran golangci-lint in [29](https://github.com/itaranto/efm-langserver/actions/runs/3285346400/jobs/5412344592#step:4:31)543ms If it wasn't picked up properly I don't see how it would add I tried cloning your repo and running ~/git/efm-langserver (replace-golint-with-revive)
$ /tmp/golangci-lint.exe run -v --print-issued-lines=false
level=info msg="[config_reader] Config search paths: [./ C:\\Users\\simon\\git\\efm-langserver C:\\Users\\simon\\git C:\\Users\\simon C:\\Users C:\\]"
level=info msg="[config_reader] Used config file .golangci.yaml"
[...]
main.go:1: File is not `goimports`-ed with -local github.com/mattn/efm-langserver (goimports)
langserver\config.go:1: File is not `goimports`-ed with -local github.com/mattn/efm-langserver (goimports)
langserver\diff.go:1: File is not `goimports`-ed with -local github.com/mattn/efm-langserver (goimports) If I manually run $ goimports -local github.com/mattn/efm-langserver -w main.go
$ git status --porcelain | sed s/^...//
main.go However, I'm not very familiar with Windows and how $ git diff main.go
warning: LF will be replaced by CRLF in main.go.
The file will have its original line endings in your working directory I tried to just use the |
Yes, I completely forgot about the
I remember adding Just to check, I added it again and I notice it throws less errors with this setting. What I mean is that before adding
And after adding said attribute I only see:
|
OK, I've managed to fix all the issues, I've found some interesting things...
|
Should I close this? Basically the thing that worries me is point number 2. |
Since I think the original issue here is resolved it would be great to close this and if/when you have a repro for 2 open a new issue. I don't think I've seen this exact issue before but I have seen false positives for This should not matter but worth noting is that |
Welcome
Description of the problem
The following job fails only on Windows due to already ignored linter errors.
Version of golangci-lint
v1.49.0
Version of the GitHub Action
v3.2.0
Workflow file
Go version
v1.19.2
Code example or link to a public repository
https://github.com/itaranto/efm-langserver/blob/replace-golint-with-revive/.github/workflows/ci.yml
mattn/efm-langserver#231
The text was updated successfully, but these errors were encountered: