Bash: an assignment in a loop body that reads the loop variable is not listed on later commands
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- C#
- Sterne
- 15
- Forks
- 0
- Ø Merge
- 9 Std. 8 Min.
- Gemergte PRs (30 T.)
- 46
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Aaronontheweb/ShellSyntaxTree
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 57/100
Aaronontheweb/ShellSyntaxTree#244 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Aaronontheweb/ShellSyntaxTree#236 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
Aaronontheweb/ShellSyntaxTree#235 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
Aaronontheweb/ShellSyntaxTree#227 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Aaronontheweb/ShellSyntaxTree#190 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Aaronontheweb/ShellSyntaxTree
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
stryker-mutator/stryker-net#3892 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
MobiFlight/MobiFlight-Connector#3419 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Kryptos-FR/MarkView.Avalonia#105 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[辞書]Offen提案 辞書
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
microsoft/fluentui-blazor#5410 ·
Maintainer antworten meist innerhalb von 1 Tag