I’m using sonarcloud , and i have a false positive on rule “Unused local variables should be removed shelldre:S1481” : See SonarQube Cloud
It says that the variable prev is not used in the following code :
_opfab_completion() {
local cur prev nb_colon
_get_comp_words_by_ref -n : cur prev
nb_colon=$(grep -o ":" <<< "$COMP_LINE" | wc -l)
COMPREPLY=( $(compgen -W '$(opfab --compbash --compgen "$((COMP_CWORD - (nb_colon * 2)))" "$prev" "${COMP_LINE}")' -- "$cur") )
__ltrim_colon_completions "$cur"