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

Can Nilaway support incremental scanning #291

Open
miaogreat opened this issue Oct 30, 2024 · 2 comments
Open

Can Nilaway support incremental scanning #291

miaogreat opened this issue Oct 30, 2024 · 2 comments
Labels
driver question Further information is requested

Comments

@miaogreat
Copy link

We are trying to set up incremental scanning in our CI pipeline using [Tool Name], but we couldn't find any relevant flags or options for this. Could anyone provide guidance on how to achieve this, or let us know if such a feature is supported。

@yuxincs
Copy link
Contributor

yuxincs commented Nov 4, 2024

Hey @miaogreat , are you using the standalone checker?

https://github.com/uber-go/nilaway?tab=readme-ov-file#standalone-checker:

Due to the sophistication of the analyses that NilAway does, NilAway caches its findings about a particular package via the Fact Mechanism from the go/analysis framework. Therefore, it is highly recommended to leverage a driver that supports modular analysis (i.e., bazel/nogo or golangci-lint, but not the standalone checker since it stores all facts in memory) for better performance on large projects. The standalone checker is provided more for evaluation purposes since it is easy to get started.

It only caches its findings in memory, so in the next run everything has to be re-analyzed again.

We recommend using a proper analyzer driver, like golangci-lint (see instructions), or if you're using bazel as your build system - bazel/nogo for proper caching of the facts.

Let me know if that helps!

@miaogreat

This comment was marked as off-topic.

@yuxincs yuxincs added driver question Further information is requested labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants