Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hpc-compendium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIH
hpcsupport
hpc-compendium
Merge requests
!260
Added spell-checking to CI: Check whether change increases number of mistakes.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added spell-checking to CI: Check whether change increases number of mistakes.
ci-check-spelling-on-merge
into
preview
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Jan Frenzel
requested to merge
ci-check-spelling-on-merge
into
preview
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
Closes
#53 (closed)
0
0
Merge request reports
Compare
preview
preview (base)
and
latest version
latest version
0cab98ba
1 commit,
3 years ago
2 files
+
44
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
doc.zih.tu-dresden.de/util/check-spelling-changes.sh
0 → 100755
+
37
−
0
Options
#!/bin/bash
set
-euo
pipefail
scriptpath
=
${
BASH_SOURCE
[0]
}
basedir
=
`
dirname
"
$scriptpath
"
`
basedir
=
`
dirname
"
$basedir
"
`
wordlistfile
=
$basedir
/wordlist.aspell
function
getNumberOfAspellOutputLines
(){
cat
- | aspell
-p
"
$wordlistfile
"
--ignore
2
-l
en_US list |
sort
-u
|
wc
-l
}
branch
=
"preview"
if
[
-n
"
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
"
]
;
then
branch
=
"origin/
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
"
fi
any_fails
=
false
source_hash
=
`
git merge-base HEAD
"
$branch
"
`
files
=
$(
git diff
--name-only
"
$source_hash
"
)
for
f
in
$files
;
do
if
[
"
${
f
:
-3
}
"
==
".md"
]
;
then
previous_count
=
`
git show
"
$source_hash
:
$f
"
| getNumberOfAspellOutputLines
`
current_count
=
`
cat
"
$f
"
| getNumberOfAspellOutputLines
`
if
[
$current_count
-gt
$previous_count
]
;
then
echo
"-- File
$f
"
echo
"Change increases spelling mistake count (from
$previous_count
to
$current_count
)"
any_fails
=
true
fi
fi
done
if
[
"
$any_fails
"
==
true
]
;
then
exit
1
fi
Loading