Complying with SC2155 should not trigger Reassigned local variable highlight
Description
Complying with Shellcheck SC2155 Declare and assign separately to avoid masking return values erroneously triggers a Reassigned local variable highlight even if no initial value is assigned to the variable within the declaration statement.
What happens
If one need to declare variable type with declare|local|typeset and assign a value separately, it gets onerously highlighted as value mutation.
# All these get wrongly underlined as Reassigned local variable
local -- repository_url
repository_url=$(git remote get-url origin)
local -- foo
read -r foo
typeset -ai array
mapfile -t array

Expected behaviour
Unless a variable is explicitly assigned an initial value during declare, local or typeset, a separate assignment should not highlight the variable as Reassigned (none of the above examples above should get highlighted).
# Even if implicit initial value is 0
declare -i counter
# Initial value assigned separately to conform with SC2155 shall not cause a variable underline highlight
counter=$(get_value)
# Here is a real Reassignment which should be highlighted
counter+=5
# Declaration is combined with an explicit assignment
declare -a array=(foo bar)
# This is a mutation to be highlighted
array=(hello)
# This is another mutation
array+=(world)
As a general rule, if the declaration statement does not contain an = sign next to the variable name, the variable should not be considered assigned (even if Bash always initialize a value (empty string, 0, empty array.
Thanks @leagris ! I'll improve this inspection for the 3.0 version.