-
Notifications
You must be signed in to change notification settings - Fork 755
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
gopls: deduplicate diagnostics from gopls / linters #142
Comments
My preference here would be that we leave this behavior as-is. The error shown in the image here is a build error, so I would hope that these linters don't return such errors. If there are duplicate errors, I'm not sure that it is worth deduping them. |
Linters do return build errors if being run on code with build errors. |
Hm ok, I didn't realize. Then maybe this issue is specific to golint, and if that's deprecated we can deprecate it as a lintOnSave option. |
You can try changing the |
But it has happened that |
Sure. Adding a bit of deduplication will not be difficult, as long as the error range and message are exactly the same. |
The existing deduplication code for go vet/lint/build errors: Lines 908 to 932 in cf03db6
We can intercept the diagnostics from Language Server using cc @suzmue |
Change https://golang.org/cl/279212 mentions this issue: |
Change https://golang.org/cl/282557 mentions this issue: |
Below is an example where we have the same diagnostic being presented by both the language server and the linter
When LSP was not in the picture, such duplicates were removed in https://github.com/microsoft/vscode-go/blob/0.10.2/src/util.ts#L747 and https://github.com/microsoft/vscode-go/blob/0.10.2/src/util.ts#L756
We might have to do something similar to remove duplicates between LSP and the linting tool.
This issue is created from microsoft/vscode-go#2517 by @lggomez
The text was updated successfully, but these errors were encountered: