Skip to content

Commit b77bce7

Browse files
committed
ci: decomission of shellcheck
The following issue won't be fixed: Closes #710 Closes #1615 Part of #1669
1 parent adfacfe commit b77bce7

File tree

5 files changed

+0
-33
lines changed

5 files changed

+0
-33
lines changed

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,6 @@ jobs:
9090
- name: Check license header
9191
run: ./src/main/scripts/execute-command.sh check-license
9292

93-
run-shellcheck:
94-
name: Run ShellCheck
95-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
96-
runs-on: ubuntu-20.04
97-
steps:
98-
- name: Clone source code
99-
uses: actions/[email protected] # https://github.com/actions/checkout
100-
with:
101-
# Whether to configure the token or SSH key with the local git config. Default: true
102-
persist-credentials: false
103-
- name: Show shellcheck version
104-
run: shellcheck --version
105-
- name: Run shellcheck
106-
run: ./src/main/scripts/execute-command.sh shellcheck
107-
10893
run-enforcer:
10994
name: Run maven-enforcer-plugin
11095
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on

src/main/scripts/ci/connect-todos-to-issues.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ ENABLE_DEBUG=
5959
ISSUE_LABEL=techdebt
6060

6161
# We intentionally use single quotes as the real values will be substituted during `eval` call later
62-
# shellcheck disable=SC2016
6362
ISSUE_BODY_TEMPLATE='echo "The puzzle \`${PUZZLE_ID}\` from #$ORIG_ISSUE has to be resolved:
6463
6564
https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA}/${PUZZLE_FILE}#L${PUZZLE_LINE_START}-L${PUZZLE_LINE_END}
@@ -86,7 +85,6 @@ PUZZLES_COUNT=0
8685
NEW_ISSUES_COUNT=0
8786

8887
# UNUSED_REST is really unused but without it, read appends the rest of a line to the last variable
89-
# shellcheck disable=SC2034
9088
while IFS=$'\t' read -r PUZZLE_ID UNUSED_TICKET TITLE UNUSED_REST; do
9189
PUZZLES_COUNT=$((PUZZLES_COUNT + 1))
9290

@@ -151,7 +149,6 @@ while IFS=$'\t' read -r PUZZLE_ID UNUSED_TICKET TITLE UNUSED_REST; do
151149
error " 1) modify a body of one of the tickets to not contain puzzle id (or to have a different title)"
152150
error " 2) manually create a mapping between this puzzle and one of the issues:"
153151
# UNUSED_REST is really unused but without it, read appends the rest of a line to the last variable
154-
# shellcheck disable=SC2034
155152
echo "$CANDIDATES" | while read -r ISSUE_ID ISSUE_STATE UNUSED_REST; do
156153
error " echo '$PUZZLE_ID\t$ISSUE_ID\t$ISSUE_STATE\tmanually' >>$ISSUES_MAPPING_FILE"
157154
done
@@ -162,12 +159,10 @@ while IFS=$'\t' read -r PUZZLE_ID UNUSED_TICKET TITLE UNUSED_REST; do
162159
info "$PUZZLE_ID: no related issues found. Need to create a new issue: $TITLE"
163160

164161
# These variables are needed for eval-ing ISSUE_BODY_TEMPLATE
165-
# shellcheck disable=SC2034
166162
IFS=$'\t' read -r UNUSED_PUZZLE_ID ORIG_ISSUE UNUSED_TITLE PUZZLE_FILE PUZZLE_LINES < <(grep --max-count=1 "^$PUZZLE_ID" "$CODE_MAPPING_FILE")
167163

168164
# "50-51" => {50, 51}
169165
# These variables are needed for eval-ing ISSUE_BODY_TEMPLATE
170-
# shellcheck disable=SC2034
171166
IFS='-' read -r PUZZLE_LINE_START PUZZLE_LINE_END < <(echo "$PUZZLE_LINES")
172167

173168
ISSUE_BODY="$(eval "$ISSUE_BODY_TEMPLATE")"

src/main/scripts/ci/pdd-xml-to-json.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if [ -z "${1:-}" ]; then
1515
fi
1616

1717
# Yes, usage of `cat` is useless here, but it makes code more readable
18-
# shellcheck disable=SC2002
1918
cat "$1" \
2019
| sed \
2120
-e '/<?xml/d' \

src/main/scripts/execute-command.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ case ${1:-} in
5151
--batch-mode \
5252
pmd:check
5353
;;
54-
'shellcheck')
55-
# Shellcheck doesn't support recursive scanning: https://github.com/koalaman/shellcheck/issues/143
56-
# Also I don't want to invoke it many times (slower, more code for handling failures), so I prefer this way.
57-
# shellcheck disable=SC2207
58-
SHELL_FILES=( $(find "$ROOTDIR/src/main/scripts" -type f -name '*.sh') )
59-
exec shellcheck \
60-
--shell bash \
61-
--format gcc \
62-
"${SHELL_FILES[@]}"
63-
;;
6454
'spotbugs')
6555
exec "$MVN" \
6656
--batch-mode \
@@ -86,7 +76,6 @@ case ${1:-} in
8676
echo >&2 '- integration-tests'
8777
echo >&2 '- jest'
8878
echo >&2 '- pmd'
89-
echo >&2 '- shellcheck'
9079
echo >&2 '- spotbugs'
9180
echo >&2 '- unit-tests'
9281
exit 1

src/main/scripts/show-spring-boot-version-diff.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ SPRING_POM="$(curl -sS --fail-with-body https://raw.githubusercontent.com/spring
2323
printf "Comparing with Spring Boot %s (project vs spring versions)\\n\\n" "$SPRING_VERSION"
2424

2525
# I know about useless cat below, but it's here for better readability.
26-
# shellcheck disable=SC2002
2726
join \
2827
<(cat "$PROJECT_POM" | awk -F'[<>]' -v OFS='\t' '$2~/\.version$/{print $2, $3}' | sort) \
2928
<(echo "$SPRING_POM" | awk -F'[<>]' -v OFS='\t' '$2~/\.version$/{print $2, $3}' | sort) \

0 commit comments

Comments
 (0)