Skip to content

Make implicitly global parameter declarations local#173

Open
Saklad5 wants to merge 1 commit intojeffreytse:masterfrom
Saklad5:implicit-globals
Open

Make implicitly global parameter declarations local#173
Saklad5 wants to merge 1 commit intojeffreytse:masterfrom
Saklad5:implicit-globals

Conversation

@Saklad5
Copy link
Copy Markdown

@Saklad5 Saklad5 commented Mar 17, 2022

These parameters were not explictly marked as local, which causes zsh to
make them global by default. This is presumably unintended, and pollutes
the environment, so they have been explicitly made local in the manner
already present in the file.

These parameters were found using the zsh option WARN_CREATE_GLOBAL.
There may be other implicit global parameters present, as it only
displays a warning when the relevant code is evaluated.

@Saklad5
Copy link
Copy Markdown
Author

Saklad5 commented Mar 18, 2022

I'm working on the assumption that all implicit global variables are unintentional, such that simply making them local fixes the issue. If any of them are meant to be global, they should be explicitly global: while I very much doubt any of these fall into that category, I recommend briefly skimming the changes before merging.

I will continue to force-push additional fixes along the same lines if I encounter any until it is merged.

These parameters were not explictly marked as local, which causes zsh to
make them global by default. This is presumably unintended, and pollutes
the environment, so they have been explicitly made local in the manner
already present in the file.

These parameters were found using the zsh option WARN_CREATE_GLOBAL.
There may be other implicit global parameters present, as it only
displays a warning when the relevant code is evaluated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant