uber-go / nilaway

Static analysis tool to detect potential nil panics in Go code
Apache License 2.0
2.96k stars 54 forks source link

Adding support for nilaway in nvim-lint #255

Open NormanPerrin opened 1 month ago

NormanPerrin commented 1 month ago

Hello! I wanted to have the nilaway linter output in nvim directly and I didn't know how to integrate it, so I added support to it in nvim-lint.

I understand that this wouldn't be necessary once it's merged with golangci-lint, but in the meantime it'd be nice to have this. The PR is open if you want to comment on something before it progresses.

Thanks

yuxincs commented 1 month ago

Hi @NormanPerrin, thanks for letting us know! It's always great to see contributions from the community 😃

golangci-lint recently added a new plugin mode (since v1.57.0), which made it a lot easier to use NilAway as a private linter in it. We have added documentation in our README: https://github.com/uber-go/nilaway?tab=readme-ov-file#golangci-lint--v1570 , do you think that would help in this case?

With all that being said, kudos to the work on integrating NilAway with nvim-lint

NormanPerrin commented 1 month ago

@yuxincs I'll investigate further and get back here with the private plugin integration with nvim 👌🏽