Update doc to clarify analysis and reporting scope for nogo #4326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Documentation
What does this PR do? Why is it needed?
#4268 caused a big performance regression, especially when analyzers from staticcheck are enabled. In fact, the feature requested in #4241 is already partially supported without #4268, but it was reported as a "bug": #4241 (comment)
This PR documents the "bug" before #4268 as the design:
includesis the scope for nogo analysis, whileonly_filesis the scope for reporting violations. #4268 makes bothincludesandonly_filesreporting scope and make everything in the analysis scope without a way to customize.With this clarified, we can revert #4268 and potentially replace it with #4277 to allow people to include all dependencies into the analysis scope.
Which issues(s) does this PR fix?
Work towards #4241
Other notes for review
An alternative to fix the performance issue is to add a new field to nogo's JSON configuration to allow every analyzer decide whether it needs facts from dependencies.