Skip to content

Commit 28bc800

Browse files
mikakotleshikus
authored andcommitted
Add shellcheck
1 parent 73495d0 commit 28bc800

File tree

7 files changed

+22
-6
lines changed

7 files changed

+22
-6
lines changed

.github/workflows/ci-build.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- 'release-*'
77
- '!release-1.4'
88
- '!release-1.5'
9+
- '*'
910
pull_request:
1011
branches:
1112
- 'master'
@@ -333,6 +334,15 @@ jobs:
333334
run: yarn lint
334335
working-directory: ui/
335336

337+
shellcheck:
338+
runs-on: ubuntu-latest
339+
steps:
340+
- uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
341+
- run: |
342+
sudo apt-get install shellcheck
343+
shellcheck -e SC2086 -e SC2046 -e SC2068 -e SC2206 -e SC2048 -e SC2059 -e SC2154 -e SC2034 -e SC2016 -e SC2128 -e SC1091 -e SC2207 $(find . -type f -name '*.sh') | tee sc.log
344+
test ! -s sc.log
345+
336346
analyze:
337347
name: Process & analyze test artifacts
338348
if: ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true' }}

generate-snyk-report.sh

Whitespace-only changes.

hack/generate-actions-list.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
find resource_customizations -name action.lua | sed 's/resource_customizations\/\(.*\)\/actions\/\(.*\)\/action.lua/- [\1\/\2](https:\/\/github.com\/argoproj\/argo-cd\/blob\/master\/resource_customizations\/\1\/actions\/\2\/action.lua)/' | sort | uniq > docs/operator-manual/resource_actions_builtin.md
1+
#!/usr/bin/env bash
2+
3+
find resource_customizations -name action.lua | sed 's/resource_customizations\/\(.*\)\/actions\/\(.*\)\/action.lua/- [\1\/\2](https:\/\/github.com\/argoproj\/argo-cd\/blob\/master\/resource_customizations\/\1\/actions\/\2\/action.lua)/' | sort | uniq > docs/operator-manual/resource_actions_builtin.md

hack/trigger-release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414

1515
# Target (version) tag must match version scheme vMAJOR.MINOR.PATCH with an
1616
# optional pre-release tag.
17-
if ! echo "${NEW_TAG}" | egrep -q '^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)*$'; then
17+
if ! echo "${NEW_TAG}" | grep -E -q '^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)*$'; then
1818
echo "!! Malformed version tag: '${NEW_TAG}', must match 'vMAJOR.MINOR.PATCH(-rcX)'" >&2
1919
exit 1
2020
fi
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
#!/usr/bin/env bash
2+
13
cat << EOF
24
apiVersion: v1
35
kind: ConfigMap
46
metadata:
57
name: test-cm
68
data:
79
foo: bar
8-
EOF
10+
EOF

ui/scripts/build_docker.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ set -e
44

55
TAG=${IMAGE_TAG:-'latest'}
66

7-
docker build --build-arg ARGO_VERSION=${TAG} -t ${IMAGE_NAMESPACE:-`whoami`}/argocd-ui:${TAG} .
7+
docker build --build-arg ARGO_VERSION=${TAG} -t ${IMAGE_NAMESPACE:-$(whoami)}/argocd-ui:${TAG} .
88

99
if [ "$DOCKER_PUSH" == "true" ]
1010
then
11-
docker push ${IMAGE_NAMESPACE:-`whoami`}/argocd-ui:${TAG}
11+
docker push ${IMAGE_NAMESPACE:-$(whoami)}/argocd-ui:${TAG}
1212
fi
+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
echo hello world
1+
#!/usr/bin/env bash
2+
3+
echo hello world

0 commit comments

Comments
 (0)