Skip to content

Instantly share code, notes, and snippets.

@alandipert
Created May 7, 2014 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alandipert/87ae0ca84328e3308c0f to your computer and use it in GitHub Desktop.
Save alandipert/87ae0ca84328e3308c0f to your computer and use it in GitHub Desktop.
In gherkin line 37:
pb_get="^$"
^-- SC1000: $ is not used specially and should therefore be escaped.
In gherkin line 38:
pb_unget="^$"
^-- SC1000: $ is not used specially and should therefore be escaped.
In gherkin line 45:
pb_get="${pb_get:0:$((${#pb_get}-1))}${line}${pb_newline}$"
^-- SC1000: $ is not used specially and should therefore be escaped.
In gherkin line 65:
pb_unget="^${ch}${pb_unget:1:$((pb_max-1))}$"
^-- SC1000: $ is not used specially and should therefore be escaped.
In gherkin line 74:
if [[ "$pb_unget" == "^$" ]]; then
^-- SC1000: $ is not used specially and should therefore be escaped.
In gherkin line 82:
has_shebangP() { [[ "$(head -1 $1)" =~ ^#! ]]; }
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 87:
contents="$(tail -n+2 "$f" | sed -e 's/^[ \t]*//' | tr -s '\n' $pb_newline)"
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 89:
contents="$(cat "$f" | sed -e 's/^[ \t]*//' | tr -s '\n' $pb_newline)"
^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 130:
symbol_limit=$heap_increment
^-- SC2034: symbol_limit appears unused. Verify it or export it.
In gherkin line 136:
declare -A type_tags=([000]=integer
^-- SC2102: Ranges can only match single chars (mentioned due to duplicates).
In gherkin line 137:
[001]=symbol
^-- SC2102: Ranges can only match single chars (mentioned due to duplicates).
In gherkin line 138:
[002]=cons
^-- SC2102: Ranges can only match single chars (mentioned due to duplicates).
In gherkin line 139:
[003]=vector
^-- SC2102: Ranges can only match single chars (mentioned due to duplicates).
In gherkin line 140:
[004]=keyword)
^-- SC2102: Ranges can only match single chars (mentioned due to duplicates).
In gherkin line 186:
if [[ $cons_ptr == $cons_limit ]]; then
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 288:
prepend $1 $v
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 298:
acc_count=0
^-- SC2034: acc_count appears unused. Verify it or export it.
In gherkin line 318:
acc_count=0
^-- SC2034: acc_count appears unused. Verify it or export it.
In gherkin line 339:
if [[ $cons_ptr == $cons_limit ]]; then
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 407:
")") cons "$read1" $NIL ;;
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 471:
cons "$read1" $NIL && read2="$r"
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 472:
cons $QUOTE "$read2"
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 488:
cons $c $NIL && ret="$r"
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 490:
string_list $*
^-- SC2048: Use "$@" (with quotes) to prevent whitespace problems.
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 491:
cons $c $r && ret="$r"
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 517:
vget $1 0
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 520:
for ((i=1 ; i < $len ; i++)); do
^-- SC2004: $ on variables in (( )) is unnecessary.
In gherkin line 521:
vget $1 $i
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 532:
if [[ "${car[$lst]}" == $FN ]]; then
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 558:
symbol) strip_tag "$1" && printf -v r '%s' "$(echo "${symbols[$r]}" | tr $pb_star "*")" ;;
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 687:
vectify_args() {
^-- SC2120: vectify_args references arguments, but none are ever passed.
In gherkin line 755:
[[ -z "${environments[$fn]}" ]] && local env=$NIL || local env="${environments[$fn]}"
^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
In gherkin line 764:
if [[ "${car[$params]}" == $AMP ]]; then
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 772:
vget $params 0
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 775:
vget $params $((i++))
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 779:
vget $params $i
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 837:
$NILP) [[ "$arg0" == $NIL ]] && r="$T" ;;
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 842:
$VECTOR) vectify_args ;;
^-- SC2119: Use vectify_args "$@" if function's $1 should mean script's $1.
In gherkin line 911:
$FNP) typeP "$arg0" cons && [[ "${car[$arg0]}" == $FN ]] && r=$T ;;
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 961:
if [[ "$arg0" == $NIL ]]; then
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 965:
if [[ "$r" == cons ]] && [[ "${car[$arg0]}" == $FN ]]; then
^-- SC2053: Quote the rhs of = in [[ ]] to prevent glob interpretation.
In gherkin line 982:
strip_tag $arg0 && x=$r
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 983:
strip_tag $arg1 && y=$r
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 989:
strip_tag $arg0
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1012:
string_list $(for i in $ret; do echo "$i"; done)
^-- SC2046: Quote this to prevent word splitting.
^-- SC2030: Modification of i is local (to subshell caused by $(..) expansion).
In gherkin line 1034:
strip_tag $arg0
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1068:
for (( i=0; i<len; )); do
^-- SC2031: i was modified in a subshell. That change might be lost.
In gherkin line 1107:
$DO) do_ $args ;;
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1111:
[[ "$r" != "$NIL" ]] && lisp_eval "$arg1" || lisp_eval "$arg2"
^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
In gherkin line 1138:
add_bindings $arg0
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1140:
do_ $binding_body
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1145:
strip_tag $op
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1169:
type $1
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1194:
vectify_args
^-- SC2119: Use vectify_args "$@" if function's $1 should mean script's $1.
In gherkin line 1229:
e= # clear existing error state
^-- SC1007: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
In gherkin line 1231:
[[ -n "$e" ]] && printf "read error: $e\n" >&2
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
In gherkin line 1235:
[[ -n "$e" ]] && printf "eval error: $e\n" >&2
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
In gherkin line 1237:
[[ -n "$e" ]] && printf "print error: $e\n" >&2
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
In gherkin line 1260:
[[ $r != $NIL ]] && prn $r
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1263:
[[ $r != $NIL ]] && prn $r
^-- SC2086: Double quote to prevent globbing and word splitting.
In gherkin line 1269:
[[ $r != $NIL ]] && prn $r
^-- SC2086: Double quote to prevent globbing and word splitting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment