powershell/PSAvoidGlobalVars is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
tally disables this rule by default for Dockerfile
RUN snippets because a RUN executes
statements inline rather than defining cmdlets, parameters, or modules with external callers. Re-enable it with
include = ["powershell/PSAvoidGlobalVars"] or by setting
rules.powershell.PSAvoidGlobalVars.severity = "warning" in .tally.toml.Description
A variable is a unit of memory in which values are stored. PowerShell controls access to variables, functions, aliases, and drives through a mechanism known as scoping. Variables and functions that are present when PowerShell starts have been created in the global scope. Globally scoped variables include:- Automatic variables
- Preference variables
- Variables, aliases, and functions that are in your PowerShell profiles
Get-Help about_Scopes.