Bash: an assignment in a loop body that reads the loop variable is not listed on later commands
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
The issue names no source files or tests; start by locating how SST records assignment facts for commands inside Bash loop bodies, then trace the handling of assignments that read the loop variable. Add or find coverage for the provided for loop example and verify later git status occurrences list the assignment with a proven value or Unknown, while MayAffectProcessEnvironment remains true unless the complete-environment rule proves otherwise.
由索引模型根據 Issue 內容生成。
描述
Problem
An assignment inside a loop body that reads the loop variable does not appear in the assignment facts of the later commands in that body.
Example:
for i in 1 2; do GIT_DIR=/tmp/r$i; git status; done
- If
GIT_DIRis in the launch environment,git statusruns withGIT_DIR=/tmp/r1and then withGIT_DIR=/tmp/r2. - SST does not list the
GIT_DIRassignment on thegit statusoccurrence.
Impact
A consumer that reads the assignment facts (for example, an approval digest) does not see that the environment of git status can change.
Expected
- List the assignment on each later command in the body, with the value set when SST proves it (
/tmp/r1,/tmp/r2), or Unknown. - Keep
MayAffectProcessEnvironmenttrue unless the complete-environment rule (https://github.com/Aaronontheweb/ShellSyntaxTree/pull/248) proves otherwise.
Found by the review of https://github.com/Aaronontheweb/ShellSyntaxTree/pull/248 (dev has the same gap).
- 主要語言
- C#
- 星號
- 15
- 分支
- 0
- 平均合併
- 9 小時 8 分鐘
- 30 天內合併 PR
- 46
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Aaronontheweb/ShellSyntaxTree 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 57/100
Aaronontheweb/ShellSyntaxTree#244 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
Aaronontheweb/ShellSyntaxTree#236 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 55/100
Aaronontheweb/ShellSyntaxTree#235 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 38/100
Aaronontheweb/ShellSyntaxTree#227 · 1 則留言 ·
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
Aaronontheweb/ShellSyntaxTree#190 ·
維護者通常 1 天內回覆
查看 Aaronontheweb/ShellSyntaxTree 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
PCL-Community/PCL-CE#3658 ·
維護者通常 1 天內回覆
-
Deploy & Patch-issues opprettes ikke: create-pnd-issues.yml har feilet hver uke siden 2025-09-08未關閉
難度 2/5 1-3 小時 新手友好度 62/100
Altinn/altinn-auth#4359 ·
維護者通常 1 天內回覆
-
type/automation type/tech-debt
難度 1/5 1 小時以內 新手友好度 72/100
維護者通常 1 天內回覆
-
no-stack-trace
難度 2/5 1-3 小時 新手友好度 83/100
維護者通常 1 天內回覆
-
S: Untriaged
難度 2/5 1-3 小時 新手友好度 62/100
project-wayfarer/wayfarer-14#1650 ·
維護者通常 2 天內回覆