Skip to content

Commit 66c662e

Browse files
committed
gh actions lint spelling python3
1 parent 98767f7 commit 66c662e

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177
run: apt-get update -y
178178
- name: Install lint tools
179179
shell: bash
180-
run: apt-get -y install moreutils lintian
180+
run: apt-get -y install python3-pip moreutils lintian
181181
- name: Install Python lint tools
182182
run: python3 -m pip install --no-input codespell==2.2.1
183183
- name: Enable Problem Matcher for GitHub annotations

scripts/spelling.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ spellingfiles=$(eval "find ./ -type f -and ! \( \
7070
$SPELLINGBLACKLIST \
7171
\) | xargs")
7272

73-
# count the number of spellintian errors, including duplicate words
74-
spellintian_errors="$(zrun spellintian $spellingfiles 2>&1)"
75-
spellintian_errors_count=$([ "$spellintian_errors" == "" ] && printf "0" || (printf "%s\n" "$spellintian_errors" | wc -l))
76-
spellintian_severity="$([ "$spellintian_errors_count" == "0" ] && printf "notice" || printf "error" )"
77-
7873
# count the number of codespell errors
7974
codespell_errors="$(zrun codespell --interactive 0 --disable-colors --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignorelines --ignore-words .codespellignorewords $spellingfiles 2>&1)"
8075
codespell_errors_count="$([ "$codespell_errors" == "" ] && printf "0" || (printf "%s\n" "$codespell_errors" | wc -l))"
8176
codespell_severity="$([ "$codespell_errors_count" == "0" ] && printf "notice" || printf "error" )"
8277

78+
# count the number of spellintian errors, including duplicate words
79+
spellintian_errors="$(zrun spellintian $spellingfiles 2>&1)"
80+
spellintian_errors_count=$([ "$spellintian_errors" == "" ] && printf "0" || (printf "%s\n" "$spellintian_errors" | wc -l))
81+
spellintian_severity="$([ "$spellintian_errors_count" == "0" ] && printf "notice" || printf "error" )"
82+
8383
total_errors_count="$(($spellintian_errors_count + $codespell_errors_count))"
8484
total_severity="$([ "$total_errors_count" == "0" ] && printf "notice" || printf "error" )"
8585

@@ -98,4 +98,4 @@ echo "$codespell_severity: Found $codespell_errors_count spelling errors via cod
9898
echo "$total_severity: Found $total_errors_count total spelling errors"
9999
if [[ $total_errors_count -ne 0 ]]; then
100100
exit 1;
101-
fi;
101+
fi;

0 commit comments

Comments
 (0)