Otto Fowler created METRON-1375:
-----------------------------------
Summary: fix shellcheck errors in validate-jiras-for-release script
Key: METRON-1375
URL: https://issues.apache.org/jira/browse/METRON-1375
Project: Metron
Issue Type: Improvement
Reporter: Otto Fowler
-> % shellcheck validate-jira-for-release
In validate-jira-for-release line 140:
WORKDIR="~/tmp"
^-- SC2088: Tilde does not expand in quotes. Use $HOME.
In validate-jira-for-release line 165:
git clone $REPO "metron-$VERSION"
^-- SC2086: Double quote to prevent globbing and word splitting.
In validate-jira-for-release line 166:
git checkout $BRANCH
^-- SC2086: Double quote to prevent globbing and word splitting.
In validate-jira-for-release line 167:
cd "$WORKDIR/metron-$VERSION"
^-- SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
In validate-jira-for-release line 174:
FORMAT_STR="%15s %15s %15s %30s %50s\n"
^-- SC1117: Backslash is literal in "\n".
Prefer explicit escaping: "\\n".
In validate-jira-for-release line 175:
printf "$FORMAT_STR" "JIRA" "STATUS" "FIX VERSION" "ASSIGNEE" "FIX"
^-- SC2059: Don't use variables in the printf format string. Use printf
"..%s.." "$foo".
In validate-jira-for-release line 178:
eval $GET_JIRAS | while read JIRA ; do
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2162: read without -r will mangle backslashes.
In validate-jira-for-release line 182:
CONTENT=`curl -s $URL`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word
splitting.
In validate-jira-for-release line 185:
STATUS=`echo "$CONTENT" | grep "<status[^>]*>" | sed
's/^.*<status[^>]*>//' | sed 's/<.status>.*$//'`
^-- SC2006: Use $(..) instead of legacy `..`.
In validate-jira-for-release line 186:
ASSIGNEE=`echo "$CONTENT" | grep "<assignee[^>]*>" | sed
's/^.*<assignee[^>]*>//' | sed 's/<.assignee>.*$//'`
^-- SC2006: Use $(..) instead of legacy `..`.
In validate-jira-for-release line 187:
FIXV=`echo "$CONTENT" | grep "<fixVersion[^>]*>" | sed
's/^.*<fixVersion[^>]*>//' | sed 's/<.fixVersion>.*$//'`
^-- SC2006: Use $(..) instead of legacy `..`.
In validate-jira-for-release line 196:
printf "$FORMAT_STR" "$JIRA" "$STATUS" "$FIXV" "$ASSIGNEE" "$LINK"
^-- SC2059: Don't use variables in the printf format string. Use
printf "..%s.." "$foo".
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)