Commit f6520923 authored by Leo's avatar Leo

braced_variable: do better matching.

- Match the minus sign properly
- Match whitespace
- Match equal sign
- Match round brackets
parent d040110c
......@@ -263,9 +263,9 @@ braced_variable() {
[ "$SKIP_AL32" ] && return 0
# Match a Sigil ($) then a brace and any valid value until the end brace and then
# match end-of-line or a character that can't be in the name of a variable
grep -Eo -Hn -e '\$\{[A-Za-z0-9_]+\}($|["\./\-])' "$apkbuild" |
grep -Eo -Hn -e '\$\{[A-Za-z0-9_]+\}($|["\./\(\)= -])' "$apkbuild" |
sed "s/^\([^:]*:[^:]*:\)\(.*\)/MP:[AL32]:\1unnecesary usage of braces: \2/" |
sed 's|[\./"\-]$||g' # This strips the last match in the grep
sed 's|.$||g' # This strips the last match in the grep
}
cpan_variable() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment