Skip to content

Commit 34c8141

Browse files
committed
Update spellcheck comment
1 parent 2f6ad74 commit 34c8141

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/spelling.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ jobs:
104104
steps.check-files.outputs.skip != 'true' &&
105105
steps.check.outputs.skip != 'true'
106106
run: |
107-
# Get the list of files into an array
108107
if [ "${{ steps.check-files.outputs.is-pr }}" == "true" ]; then
109108
mapfile -t FILES <<< "${{ steps.check-files.outputs.files }}"
110109
else
@@ -113,15 +112,16 @@ jobs:
113112
114113
# Check each file individually
115114
FINAL_EXIT_CODE=0
115+
SPELLCHECK_LOG=""
116116
for file in "${FILES[@]}"; do
117117
if [ -n "$file" ]; then
118118
echo "Checking spelling in $file"
119119
python3 -c "import yaml; config = yaml.safe_load(open('.pyspelling.yml')); new_matrix = [matrix.copy() for matrix in config['matrix'] if (('python' in matrix['name'].lower() and '$file'.endswith('.py')) or ('rest' in matrix['name'].lower() and '$file'.endswith('.rst')) or ('markdown' in matrix['name'].lower() and '$file'.endswith('.md'))) and not matrix.update({'sources': ['$file']})]; config['matrix'] = new_matrix; yaml.dump(config, open('temp_config.yml', 'w'))"
120120
121-
if ! pyspelling -c temp_config.yml; then
121+
OUTPUT=$(pyspelling -c temp_config.yml 2>&1) || {
122122
FINAL_EXIT_CODE=1
123123
SPELLCHECK_LOG+="### $file\n$OUTPUT\n\n"
124-
fi
124+
}
125125
fi
126126
done
127127

0 commit comments

Comments
 (0)