This repository was archived by the owner on Jul 15, 2023. It is now read-only.
golangci-lint --out-format=colored-line-number#3112
Merged
ramya-rao-a merged 2 commits intomicrosoft:masterfrom Mar 20, 2020
Merged
golangci-lint --out-format=colored-line-number#3112ramya-rao-a merged 2 commits intomicrosoft:masterfrom
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
Conversation
What Problem =============== In a project with .golancci.yml with `output: format: checkstyle` vscode will fail to parse warning output from golangci-lint. Other formats probably confuse this extension too. Solution -------------- Let's be explicit about a format that we do understand. I chose `colored-line-number` because that's golangci-lint's default according to `golangci-lint run --help`.
ramya-rao-a
approved these changes
Mar 20, 2020
Contributor
ramya-rao-a
left a comment
There was a problem hiding this comment.
Looks like this is your first PR contribution to this project, Thanks & Welcome!
Contributor
|
You can try out the change in this PR in the latest beta version of this extension |
Contributor
|
This change is now available in the latest version of this extension. Thanks @CarltonHenderson! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem
In a project with
.golancci.ymlcontainingoutput: format: checkstyle(many formats other than checkstyle probably cause the same bug.) vscode will fail to parse warning output from golangci-lint with no discernible error message other than the usualNo problems have been detected in the workspace so far.in the problems view. Output in theOutput view > Go tabshows only the normalFinished running tool: /home/user/go/bin/golangci-lint run --print-issued-lines=falseSolution
Let's be explicit about a format that we do understand. I chose
colored-line-numberbecause that's golangci-lint's default according togolangci-lint run --help.Testing
I approximated tested by setting
"go.lintFlags": ["--out-format=colored-line-number"],insettings.jsonand watching the command come up in the Output view > Go tab. Unfortunately, I don't currently have time to build the extension, sideload it, write tests, run tests, etc.