Bash: an assignment in a loop body that reads the loop variable is not listed on later commands
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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).
- Linguagem predominante
- C#
- Estrelas
- 15
- Forks
- 0
- Merge médio
- 9h 8min
- PRs com merge (30d)
- 46
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Aaronontheweb/ShellSyntaxTree
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 57/100
Aaronontheweb/ShellSyntaxTree#244 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
Aaronontheweb/ShellSyntaxTree#236 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
Aaronontheweb/ShellSyntaxTree#235 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 38/100
Aaronontheweb/ShellSyntaxTree#227 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
Aaronontheweb/ShellSyntaxTree#190 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de Aaronontheweb/ShellSyntaxTree
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
stryker-mutator/stryker-net#3892 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
MobiFlight/MobiFlight-Connector#3419 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Kryptos-FR/MarkView.Avalonia#105 ·
Mantenedores costumam responder em até 1 dia
-
[辞書]Aberta提案 辞書
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
microsoft/fluentui-blazor#5410 ·
Mantenedores costumam responder em até 1 dia