mirror of
https://github.com/versity/versitygw.git
synced 2025-12-23 05:05:16 +00:00
Merge pull request #612 from versity/ben/shellcheck
chore: add shellcheck PR check
This commit is contained in:
16
.github/workflows/shellcheck.yml
vendored
Normal file
16
.github/workflows/shellcheck.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: shellcheck
|
||||
on: pull_request
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Run shellcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run checks
|
||||
run: |
|
||||
shellcheck --version
|
||||
shellcheck -e SC1091 tests/*.sh tests/*/*.sh
|
||||
@@ -56,7 +56,7 @@ create_multipart_upload_custom() {
|
||||
local multipart_data
|
||||
log 5 "additional create multipart params"
|
||||
for i in "$@"; do
|
||||
log 5 $i
|
||||
log 5 "$i"
|
||||
done
|
||||
log 5 "${*:3}"
|
||||
log 5 "aws --no-verify-ssl s3api create-multipart-upload --bucket $1 --key $2 ${*:3}"
|
||||
|
||||
@@ -7,7 +7,6 @@ list_buckets() {
|
||||
fi
|
||||
|
||||
local exit_code=0
|
||||
local error
|
||||
if [[ $1 == 's3' ]]; then
|
||||
buckets=$(aws --no-verify-ssl s3 ls 2>&1 s3://) || exit_code=$?
|
||||
elif [[ $1 == 's3api' ]] || [[ $1 == 'aws' ]]; then
|
||||
|
||||
@@ -88,4 +88,5 @@ case $command_type in
|
||||
;;
|
||||
esac
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
exit $exit_code
|
||||
|
||||
@@ -231,6 +231,7 @@ object_exists() {
|
||||
echo "error checking if object exists"
|
||||
return 2
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
return $head_result
|
||||
}
|
||||
|
||||
@@ -493,6 +494,7 @@ check_object_tags_empty() {
|
||||
return 2
|
||||
fi
|
||||
check_tags_empty "$1" || local check_result=$?
|
||||
# shellcheck disable=SC2086
|
||||
return $check_result
|
||||
}
|
||||
|
||||
@@ -506,6 +508,7 @@ check_bucket_tags_empty() {
|
||||
return 2
|
||||
fi
|
||||
check_tags_empty "$1" || local check_result=$?
|
||||
# shellcheck disable=SC2086
|
||||
return $check_result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user