-
Notifications
You must be signed in to change notification settings - Fork 763
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-lint
integration issue
#411
Comments
Change https://golang.org/cl/244801 mentions this issue: |
@butuzov thanks for the bug report. From vscode-go's code, golangci-lint is supposed to output the lint result using stdout. But this Unfortunately, I am not familiar with golangci-lint and I still want to understand what's special about We are happy to help to apply the solution once the By the way, from the golangci-lint source, I think the issues-exit-code is 0 by default already. So, I am curious to learn how the linked PR changes the default behavior. |
First, I also thought that issue on
P.S. golangci-lint run --help | grep issues-exit-code
> --issues-exit-code int Exit code when issues were found (default 1)
golangci-lint --version
> golangci-lint has version 1.29.0 built from 6a68907 on 2020-07-24T16:57:30Z |
Regarding my PR.
|
Thanks for explaining the problem. In my opinion, the issue lies in the logic of But if it's perfectly ok to set |
@hyangah thanks for the correction on commit message and spell issue. And yeah, I don't know if code is used somewhere else (with exact settings err && stderr && !useStdErr). That's why js code included to test |
TL/DR
Warning message generated by
nolintlint
linter, brakesvscode-go
problem reporting. this is caused by npmchild_process
executor logic. Current workaround to enableno error code
argument supplied to vscode-gogolangci-lint
linter argumens (--issues-exit-code=0
) .What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gogo version go1.14.5 darwin/amd64
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders1.47.2
golang.go
go env
to get the go development environment detailsShare the Go related settings you have added/edited
Describe the bug
This is an integration bug (found while working with
golangci-lint
) and prevents getting Problems found by linter.It occurs if combinations of factors happen, If linter output has:
vscode-go
) fails to report an code problems.Steps to reproduce the behavior:
Create
example.go
Run VSCode against folder with this file with default settings () to get failed examples.
Run VSCode against folder with this file with default settings +
--issues-exit-code=0
in order to get working example.An example of call to
golangci-lint
Suggestions?
--issues-exit-code=0
to list of arguments passed togolangci-lint
in addition to existing ones (added in steals mode byvscode-go
)Root of the problem
child_process
:> 0
err
if stderr has output and return code is0
test node.js script
run it
against next files https://gist.github.com/butuzov/4a682fd28bc89c1bdb6f1cc7996e9cfb
The text was updated successfully, but these errors were encountered: