Skip to content

Commit

Permalink
Bump shellcheck to v0.10.0 (#216)
Browse files Browse the repository at this point in the history
- Bump shellcheck to v0.10.0
- explicitly disable SC2317 since it's reporting
  many false positives for us (we have helper functions
  that are only indirectly called in subshells for
  parallel executions but shellcheck is currently not able
  to follow them and so it's reporting the commands
  in the helper functions as unreachable)

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
  • Loading branch information
tiraboschi committed May 29, 2024
1 parent dcab06c commit bc787ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -a -e SC2016 --source-path=./collection-scripts
SHELLCHECK_OPTS: -a -e SC2016 -e SC2317 --source-path=./collection-scripts
with:
check_together: 'yes'
version: v0.8.0
version: v0.10.0
scandir: './collection-scripts/'
- name: check vmConvertor
run: |-
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build: check-image-env docker-build docker-push

# check
check:
shellcheck -e SC2016 collection-scripts/*
shellcheck -a -e SC2016 -e SC2317 --source-path=./collection-scripts collection-scripts/*

docker-build: check-image-env
docker build -t ${IMAGE_REGISTRY}/${MUST_GATHER_IMAGE}:${IMAGE_TAG} .
Expand Down
4 changes: 2 additions & 2 deletions collection-scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ function version() {
# if version still not found, use Unknown
[ -z "${version}" ] && version="Unknown"

echo ${version}
echo "${version}"
}

if [[ ! -f ${VERSION_FILE} ]]; then
# generate /must-gather/version file
mkdir -p "${BASE_COLLECTION_PATH}"
echo "kubevirt/must-gather" > "${VERSION_FILE}"
version >> "${VERSION_FILE}"
fi
fi

0 comments on commit bc787ef

Please sign in to comment.