Local Variable Usage
This inspection highlights variables, which could be declared as local
.
The message is displayed under these conditions:
- The current is a
.bash
file.
Thelocal
keyword is not available in POSIX shell scripts. - The declaration is inside of a function
- All references to the declaration are in that function.
References outside it or sourced files inside the function prevent it from being declared aslocal
.
