In cloudflare line 8:
VERSION=1.0.1
^-----^ SC2034: VERSION appears unused. Verify use (or export if used externally).
In cloudflare line 39:
Version $version
^------^ SC2154: version is referenced but not assigned (did you mean 'VERSION'?).
In cloudflare line 49:
exit ${2:-1}
^-----^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
exit "${2:-1}"
In cloudflare line 53:
if [ $BASH_VERSINFO -lt 4 ]; then
^------------^ SC2128: Expanding an array without an index only gives the first element.
^------------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$BASH_VERSINFO" -lt 4 ]; then
In cloudflare line 76:
if [ "$method" != POST -o "${1:0:1}" = '{' ]
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 95:
curl_opts+=(--$formtype "$1")
^-------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
In cloudflare line 114:
output=curl -sS -H "X-Auth-Email: $CF_ACCOUNT" -H "X-Auth-Key: $CF_TOKEN" \ ^-- SC2006: Use $(...) notation instead of legacy backticked
...`.
Did you mean:
output=$(curl -sS -H "X-Auth-Email: $CF_ACCOUNT" -H "X-Auth-Key: $CF_TOKEN"
-X "$method" "${curl_opts[@]}"
"$APIv4_ENDPOINT$path$querystring" | json_decode "$@")
In cloudflare line 122:
let page++
^--------^ SC2219: Instead of 'let expr', prefer (( expr )) .
In cloudflare line 167:
php -r '
^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.
In cloudflare line 258:
if('$debug') file_put_contents("php://stderr", var_export($data0, 1));
^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.
In cloudflare line 397:
for zname_zid in call_cf_v4 GET /zones -- .result %"%s:%s$NL" ,name,id
^-- SC2006: Use $(...) notation instead of legacy backticked ...
.
Did you mean:
for zname_zid in $(call_cf_v4 GET /zones -- .result %"%s:%s$NL" ,name,id)
In cloudflare line 404:
subdomain=${BASH_REMATCH[2]}
^-------^ SC2034: subdomain appears unused. Verify use (or export if used externally).
In cloudflare line 415:
for test_record in call_cf_v4 GET /zones/$zone_id/dns_records -- .result ,name,type,id,ttl,content
^-- SC2006: Use $(...) notation instead of legacy backticked ...
.
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
for test_record in $(call_cf_v4 GET /zones/"$zone_id"/dns_records -- .result ,name,type,id,ttl,content)
In cloudflare line 418:
set -- $test_record
^----------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
set -- "$test_record"
In cloudflare line 432:
if [ ( -z "$record_type" -o "$test_record_type" = "$record_type" ) -a ( -z "$record_oldcontent" -o "$test_record_content" = "$record_oldcontent" ) ]
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 434:
let rec_found++
^-------------^ SC2219: Instead of 'let expr', prefer (( expr )) .
In cloudflare line 460:
zone_id=call_cf_v4 GET /zones name="$1" -- .result ,id
^-- SC2006: Use $(...) notation instead of legacy backticked ...
.
Did you mean:
zone_id=$(call_cf_v4 GET /zones name="$1" -- .result ,id)
In cloudflare line 512:
source $HOME/.cloudflare
^---------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.
^---^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
source "$HOME"/.cloudflare
In cloudflare line 558:
fieldspec=,id,value,'?editable?"Editable"?""','?modified_on?<",, mod: $modified_on"?""'
^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.
In cloudflare line 562:
call_cf_v4 GET /zones/$zone_id/settings -- .result %"%-30s %s$TA%s%s$NL" "$fieldspec"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 GET /zones/"$zone_id"/settings -- .result %"%-30s %s$TA%s%s$NL" "$fieldspec"
In cloudflare line 572:
call_cf_v4 GET /zones/$zone_id/dns_records -- .result %"%-20s %11s %-8s %s %s$TA; %s #%s$NL"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 GET /zones/"$zone_id"/dns_records -- .result %"%-20s %11s %-8s %s %s$TA; %s #%s$NL" \
In cloudflare line 573:
',@zone_name@name,?<$ttl==1?"auto"?ttl,type,||priority||data.priority||"",content,!!proxiable proxied locked,id'
^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.
In cloudflare line 576:
call_cf_v4 GET /user/firewall/access_rules/rules -- .result %"%s$TA%s$TA%s$TA# %s$NL" ',<$configuration["value"],mode,modified_on,notes'
^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.
In cloudflare line 638:
call_cf_v4 POST /zones/$zone_id/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl,"priority":$prio}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl,"priority":$prio}"
In cloudflare line 646:
set -- $content
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
set -- "$content"
In cloudflare line 661:
call_cf_v4 POST /zones/$zone_id/dns_records "{"type":"$type","ttl":$ttl,"name":"$name","data":{$locdata}}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{"type":"$type","ttl":$ttl,"name":"$name","data":{$locdata}}"
In cloudflare line 669:
call_cf_v4 POST /zones/$zone_id/dns_records "{
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{
In cloudflare line 684:
call_cf_v4 POST /zones/$zone_id/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl}"
In cloudflare line 687:
call_cf_v4 POST /zones/$zone_id/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl,"proxied":$proxied}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl,"proxied":$proxied}"
In cloudflare line 690:
call_cf_v4 POST /zones/$zone_id/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl,"proxied":$proxied}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl,"proxied":$proxied}"
In cloudflare line 693:
call_cf_v4 POST /zones/$zone_id/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 POST /zones/"$zone_id"/dns_records "{"type":"$type","name":"$name","content":"$content","ttl":$ttl}"
In cloudflare line 719:
[ -z "$trg" -o -z "$trg_type" ] && die "Usage: cloudflare add [<whitelist | blacklist | challenge>] [<IP | IP/mask | country_code>] [note]"
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 721:
call_cf_v4 POST /user/firewall/access_rules/rules mode=$mode configuration[target]="$trg_type" configuration[value]="$trg" notes="$notes"
^------^ SC2102: Ranges can only match single chars (mentioned due to duplicates).
In cloudflare line 729:
call_cf_v4 POST /zones "{"name":"$1","jump_start":true}" -- .result '&<"status: $status"'
^-------------------^ SC2016: Expressions don't expand in single quotes, use double quotes for that.
In cloudflare line 752:
die "Unknown parameters: $@"
^-- SC2145: Argument mixes string and array. Use * or separate argument.
In cloudflare line 785:
call_cf_v4 DELETE /zones/$zone_id/dns_records/$record_id
^------^ SC2086: Double quote to prevent globbing and word splitting.
^--------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 DELETE /zones/"$zone_id"/dns_records/"$record_id"
In cloudflare line 791:
while read ruleid trg notes
^--^ SC2162: read without -r will mangle backslashes.
In cloudflare line 793:
if [ "$ruleid" = "$1" -o "$trg" = "$1" ] || grep -qF "$1" <<<"$notes"
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 795:
call_cf_v4 DELETE /user/firewall/access_rules/rules/$ruleid
^-----^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 DELETE /user/firewall/access_rules/rules/"$ruleid"
In cloudflare line 810:
call_cf_v4 DELETE /zones/$zone_id
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 DELETE /zones/"$zone_id"
In cloudflare line 862:
css|html|js) eval $s=on;;
^-- SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
css|html|js) eval "$s"=on;;
In cloudflare line 877:
call_cf_v4 PATCH /zones/$zone_id/settings "{"items":[$setting_items]}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 PATCH /zones/"$zone_id"/settings "{"items":[$setting_items]}"
In cloudflare line 919:
3) is_quiet && die || die "DNS record `$record_name' not found";;
^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
In cloudflare line 935:
[ "$setting" = newtype -o "$setting" = new_type ] && setting=type
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
^-----^ SC2209: Use var=$(command) to assign output (or quote to assign string).
In cloudflare line 936:
[ "$setting" = newname -o "$setting" = new_name ] && setting=name
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 941:
[ "$value" = on -o "$value" = 1 ] && value=true
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 942:
[ "$value" = off -o "$value" = 0 ] && value=false
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 946:
if [ "$setting" != content ] && ( expr "$value" : '[0-9]+$' >/dev/null || expr "$value" : '[0-9]+.[0-9]+$' >/dev/null || [ "$value" = true -o "$value" = false ] )
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In cloudflare line 955:
call_cf_v4 PUT /zones/$zone_id/dns_records/$record_id "{$old_data,$new_data}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
^--------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 PUT /zones/"$zone_id"/dns_records/"$record_id" "{$old_data,$new_data}"
In cloudflare line 970:
call_cf_v4 DELETE /zones/$zone_id/purge_cache '{"purge_everything":true}'
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 DELETE /zones/"$zone_id"/purge_cache '{"purge_everything":true}'
In cloudflare line 985:
call_cf_v4 PUT /zones/$zone_id/activation_check
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 PUT /zones/"$zone_id"/activation_check
In cloudflare line 1010:
zone_id=get_zone_id "$domain" 2>/dev/null; echo "$zone_id"
^-- SC2006: Use $(...) notation instead of legacy backticked ...
.
Did you mean:
zone_id=$(get_zone_id "$domain" 2>/dev/null; echo "$zone_id")
In cloudflare line 1029:
call_cf_v4 DELETE /zones/$zone_id/purge_cache "{"files":[$urls]}"
^------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
call_cf_v4 DELETE /zones/"$zone_id"/purge_cache "{"files":[$urls]}"
In cloudflare line 1039:
*|help)
^-- SC2221: This pattern always overrides a later one on line 1039.
^--^ SC2222: This pattern never matches because of a previous pattern on line 1039.
For more information:
https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ...
https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source....
https://www.shellcheck.net/wiki/SC2034 -- VERSION appears unused. Verify us...