feat(analysis): split interpAllowedSymbols into per-mode lists [PR C]#528
Merged
Conversation
Add interpPerModeSymbols with "read-only" (all current interp symbols) and "remediation" (empty). Wire up checkInterpPerModeSymbols with five checks mirroring checkPerBuiltinAllowedSymbols, partitioning files by the _remediation.go suffix instead of subdirectory. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
julesmcrt
marked this pull request as ready for review
June 16, 2026 09:58
julesmcrt
requested review from
AlexandreYang,
astuyve,
matt-dz,
thieman and
val06
as code owners
June 16, 2026 09:58
| "mvdan.cc/sh/v3/syntax.WordIter", // 🟢 AST node for word iteration (for-in); pure type. | ||
| "mvdan.cc/sh/v3/syntax.WordPart", // 🟢 AST interface for word components; pure interface. | ||
| }, | ||
| "remediation": { |
Member
There was a problem hiding this comment.
👋 I think that's a good starting point and could be enough. But if the remediation symbols list grows, we might want to consider splitting by shell features/files.
AlexandreYang
approved these changes
Jun 16, 2026
This was referenced Jun 16, 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.
Summary
Splits the interp symbol allowlist into a two-layer per-mode system, modelled on how
builtins/already works.interpAllowedSymbols— unchanged, becomes the global ceilinginterpPerModeSymbols["read-only"]— all current symbols; enforced on everyinterp/fileinterpPerModeSymbols["remediation"]— empty for now; grows as write features land in*_remediation.gofilesFiles are partitioned by name suffix (
_remediation.go) rather than subdirectory. Remediation files are checked against the union of both mode lists; read-only files against"read-only"only. The five checks mirrorcheckPerBuiltinAllowedSymbols.Test plan
go test ./analysis/... -timeout 60s— all existing tests passTestInterpPerModeSymbols+ 8TestVerificationInterpPerMode*covering each of the five checks🤖 Generated with Claude Code