Repository navigation
fix(analyzer): index variable shell-flag scopes once per window - #790
Open
yashrajp22 wants to merge 8 commits into
Open
yashrajp22 wants to merge 8 commits into
yashrajp22 wants to merge 8 commits into
Conversation
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
Resolve the conflicts with #577 (5ee48ef) in static_patterns_tool_misuse.py. #577 replaced the per-match reparse with a single AST index (_build_variable_shell_ast_index) and moved variable reconciliation into postprocess_path_findings. That supersedes this branch's _VariableShellScopeIndex, so the resolution keeps main's variable-shell design and drops the index class, its _index_scope method and the deque import. Kept from this branch: - USES_RUNTIME_CHECK and the check_runtime keyword, alongside main's defer_variable_reconciliation keyword. - runtime_check() calls in the TM1-TM4 loops, the Perl helper and the non-deferred reconciliation block. - SourceLocationIndex and get_context_from_lines for TM1-TM4 line and context lookups. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Thanks! The newer shell-flow fix in #577 has landed on main and supersedes the AST-reparse change here. I kept that implementation and carried the remaining line-index and runtime safeguards into #741. Its regression confirms that 100 shell-flag matches use one AST parse and one scope index. This PR should not be merged over the newer implementation; I have left it open for tracking. |
mohgupta-ship-it
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The AST-reparse fix is superseded by #577, which has landed on main. The remaining runtime and source-line safeguards are included in #741, with a regression confirming that 100 shell-flag candidates use one AST parse and one scope index.
This branch should not be merged over the newer implementation. It remains open for tracking.