diff --git a/.gitea/workflows/quality-gates-github.yml b/.gitea/workflows/quality-gates-github.yml index ffd74b5..061ee59 100644 --- a/.gitea/workflows/quality-gates-github.yml +++ b/.gitea/workflows/quality-gates-github.yml @@ -118,6 +118,9 @@ jobs: while (match(s, /[$][{]?[A-Za-z_][A-Za-z0-9_]*/)) { v = substr(s, RSTART, RLENGTH); sub(/^[$][{]?/, "", v) s = substr(s, RSTART + RLENGTH) + # In un RUN espande la shell: una variabile assegnata nel comando + # stesso (VERSIONE="$(...)" && ... ${VERSIONE}) non va scambiata per la ARG. + if (kw == "RUN" && match(rest, "(^|[^A-Za-z0-9_$])" v "=")) continue if ((v in allargs) && !(v in scope) && !(v in predefined) && !((ln, v) in seen)) { seen[ln, v] = 1 printf "%d\t%s\t%s\n", ln, v, stage diff --git a/.gitea/workflows/quality-gates.yml b/.gitea/workflows/quality-gates.yml index 2d29e4e..f9ae2f8 100644 --- a/.gitea/workflows/quality-gates.yml +++ b/.gitea/workflows/quality-gates.yml @@ -197,6 +197,9 @@ jobs: while (match(s, /[$][{]?[A-Za-z_][A-Za-z0-9_]*/)) { v = substr(s, RSTART, RLENGTH); sub(/^[$][{]?/, "", v) s = substr(s, RSTART + RLENGTH) + # In un RUN espande la shell: una variabile assegnata nel comando + # stesso (VERSIONE="$(...)" && ... ${VERSIONE}) non va scambiata per la ARG. + if (kw == "RUN" && match(rest, "(^|[^A-Za-z0-9_$])" v "=")) continue if ((v in allargs) && !(v in scope) && !(v in predefined) && !((ln, v) in seen)) { seen[ln, v] = 1 printf "%d\t%s\t%s\n", ln, v, stage