Local Variable Usage

This inspection highlights variables, which could be declared as local.

The message is displayed under these conditions:

  1. The current is a .bash file.
    The local keyword is not available in POSIX shell scripts.
  2. The declaration is inside of a function
  3. All references to the declaration are in that function.
    References outside it or sourced files inside the function prevent it from being declared as local.
Detection of variable, which could be declared as local
Detection of variable, which could be declared as local
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal