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 of it or sourced files inside of the function prevent it from being declared as local.

Quick Fix

There’s no quick fix yet—it’ll be added as soon as possible.

© 2020–2021 Joachim Ansorg
Privacy Policy