This inspection highlights unresolved variables.
A variable reference is highlighted as unresolved under these conditions:
- it was not previously declared in the file, a sourced file or a file sourcing the file containing the reference
- it’s not a built-in or predefined variable. For example
$PATHis a built-in variable and
$HOMEis a predefined variable.
- it’s not included in the list of project variables.
- Highlight UPPER_CASE variables
- If this is enabled, then this inspection will also highlight variables only consisting of uppercase characters. By default, these variables are excluded. That’s the same behaviour as implemented in ShellCheck.