Skip to content
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

x/tools/gopls: add uber-go/nilaway to the set of analyzers #64623

Open
blacktop opened this issue Nov 22, 2023 · 5 comments
Open

x/tools/gopls: add uber-go/nilaway to the set of analyzers #64623

blacktop opened this issue Nov 22, 2023 · 5 comments
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@blacktop
Copy link

The primary reason I get bit by unexpected crashes is often getting nil or array bounds errors. I believe this could help a lot of others as well.

It'd be cool to add support for https://github.com/uber-go/nilaway and have the Problems UI point to these errors.

Using via the CLI works, but this feels like it'd make a good addition to the linters/error checks offered in vscode-go

@hyangah
Copy link
Contributor

hyangah commented Nov 29, 2023

Current recommendation is to integrate through meta linters like golangci-lint or custom linter.
Unfortunately, it looks like the feature request is currently closed due to too many false positives. golangci/golangci-lint#4045

@adonovan adonovan transferred this issue from golang/vscode-go Dec 8, 2023
@adonovan adonovan changed the title Add support for uber-go/nilaway x/tools/gopls: add uber-go/nilaway to the set of analyzers Dec 8, 2023
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Dec 8, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 8, 2023
@hyangah hyangah modified the milestones: Unreleased, gopls/unplanned Dec 8, 2023
@hyangah
Copy link
Contributor

hyangah commented Dec 8, 2023

We moved this issue to the gopls issue tracker since vscode-go doesn't plan to add any custom analyzer directly through the extension. We still need to investigate if its false report rate meets the quality standard we expect from gopls analyzers. If its false report rate is too high, either it needs to wait for the custom analyzer support (for example #59869), or alternatively, set up a custom linter and configure the extension to call it using the go.lintTool setting.

@blacktop
Copy link
Author

thanks!

@blacktop blacktop reopened this Dec 11, 2023
@blacktop
Copy link
Author

whoops closed because I thought a new issue was created 😬

@moogacs
Copy link

moogacs commented Feb 27, 2024

I've created a custom plugin to be used locally and in GHA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants