[VOL-5296] shellcheck and yamllint cleanups
jjb/shell/github-release.sh
---------------------------
o Fixed a few lingering problems in source.
o Cannot quote shifted arguments when creating a reference (local -n).
+ Passed values morph into a string with quoting so lose type.
o Remove shellcheck exclusions, unqouting corrects the problem:
+ SC2178 - Variable was used as an array but is now assigned string.
jjb/lint.yaml
jjb/maven.yaml
jjb/verify/osam.yaml
--------------------
o Peripheral edits to force a jenkins job to run for *.sh.
o Cleanup errors reported by yamllint --strict.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: Ie80b42ebffbdaa24a8205c6344bf1b6b86281fcf
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index 40307e8..fec3872 100755
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -123,7 +123,7 @@
## -----------------------------------------------------------------------
function get_version()
{
- local -n ref="$1"
+ local -n ref=$1; shift
declare -a rev=()
rev+=("$(( RANDOM % 10 + 1 ))")
@@ -267,7 +267,7 @@
## -----------------------------------------------------------------------
function getGitVersion()
{
- local -n varname="$1"; shift
+ local -n varname=$1; shift
local __ver # use prefix('__') to protect callers variable name
if [[ -v cached_getGitVersion ]]; then
@@ -334,7 +334,7 @@
## -----------------------------------------------------------------------
function getReleaseDescription()
{
- local -n varname="$1"; shift
+ local -n varname=$1; shift
local msg
msg="$(git log -1 --pretty=%B)"
@@ -419,7 +419,7 @@
## -----------------------------------------------------------------------
function get_gh_releases()
{
- local -n ref="$1"
+ local -n ref=$1; shift
local repo_org
get_gh_repo_org repo_org
@@ -503,8 +503,6 @@
function get_release_path()
{
local -n ref=$1; shift
-
- # shellcheck disable=SC2128
local varpath="$ref"
DEST_GOPATH=${DEST_GOPATH:-}
@@ -570,7 +568,6 @@
function get_artifacts()
{
local dir="$1" ; shift
- # shellcheck disable=SC2178
local -n refA=$1 ; shift
# Glob available files, exclude checksums
@@ -587,7 +584,6 @@
[[ ${#__artifacts[@]} -eq 0 ]] \
&& error "Artifact dir is empty: $(declare -p dir)"
- # shellcheck disable=SC2034
refA=("${__artifacts[@]}")
return
}
@@ -760,7 +756,7 @@
function get_releases()
{
# shellcheck disable=SC2178
- local -n refA="$1"; shift
+ local -n refA=$1; shift
banner ""
pushd "$scratch" >/dev/null