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

Investigate adding nilaway check to CI #2020

Open
benluelo opened this issue Jun 3, 2024 · 2 comments
Open

Investigate adding nilaway check to CI #2020

benluelo opened this issue Jun 3, 2024 · 2 comments
Labels
A-ci Area: Our CI C-enhancement Category: An issue proposing an enhancement or a PR with one. S-shelved Status: Not actively being worked on, PR/issue still open for reference

Comments

@benluelo
Copy link
Contributor

benluelo commented Jun 3, 2024

@benluelo benluelo added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-ci Area: Our CI labels Jun 3, 2024
@PoisonPhang
Copy link
Contributor

nilaway recommends using another driver rather than running the linter directly, one of the recommended drivers is golangci-lint.

For the uniond go project, we already run staticcheck on it's own. golangci-lint would allow us to run both staticcheck, nilaway, and more. It would also take advantage of go/analysis.

@PoisonPhang PoisonPhang self-assigned this Jun 11, 2024
@PoisonPhang
Copy link
Contributor

NilAway is currently under active development: false positives and breaking changes can happen. We highly appreciate any feedback and contributions!

NilAway, in its current form, can report false positives. This unfortunately hinders its immediate merging in golangci-lint and be offered as a linter (see golangci/golangci-lint#4045). Therefore, you need to build NilAway as a plugin to golangci-lint to be executed as a private linter. There are two plugin systems in golangci-lint, and it is much easier to use the Module Plugin System (introduced since v1.57.0), and it is the only supported approach to run NilAway in golangci-lint.

I'll keep tabs on nilaway in the future. In it's current state, I don't think nilaway is ready for use in CI

@PoisonPhang PoisonPhang added the S-shelved Status: Not actively being worked on, PR/issue still open for reference label Jun 12, 2024
@PoisonPhang PoisonPhang removed their assignment Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: Our CI C-enhancement Category: An issue proposing an enhancement or a PR with one. S-shelved Status: Not actively being worked on, PR/issue still open for reference
Projects
None yet
Development

No branches or pull requests

2 participants