Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vilem Ded
daisy-doc
Commits
22bbf830
Commit
22bbf830
authored
Mar 26, 2020
by
Ewa Smula
Browse files
test spell check added
parent
9ea43c3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
.aspell.en.pws
0 → 100644
View file @
22bbf830
lcsb
Université
.gitlab-ci.yml
View file @
22bbf830
# In case something goes horribly wrong, you can fall back to `image: ruby:latest`
image
:
git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.0
build
the website
:
build
:
stage
:
build
before_script
:
-
gem install bundler -v2.0.2
...
...
@@ -18,6 +18,20 @@ build the website:
variables
:
JEKYLL_ENV
:
production
test_spell_check
:
image
:
debian
stage
:
test
dependencies
:
-
build
script
:
-
apt-get update
-
apt-get install -y aspell aspell-en
-
./test_spell_check.sh
except
:
-
master
pages
:
stage
:
deploy
only
:
...
...
test_spell_check.sh
0 → 100755
View file @
22bbf830
#!/bin/bash
set
-e
#set en_GB for British English
aspell_lang
=
en
echo
"Spell checking"
spell_check_code
=
0
for
x
in
$(
find
test
/
-name
'*.html'
)
;
do
lines
=
`
cat
$x
|aspell
--lang
=
$aspell_lang
--encoding
=
utf-8
--mode
html
--add-extra-dicts
=
./.aspell.en.pws list 2>errors.txt |wc
-l
`
if
[
$lines
-gt
0
]
then
echo
$x
:
cat
$x
| aspell
--lang
=
$aspell_lang
--encoding
=
utf-8
--mode
html
--add-extra-dicts
=
./.aspell.en.pws list
spell_check_code
=
1
echo
fi
# we need to check stderr - in case something really bad happens there will be output there
lines
=
`
cat
errors.txt |
wc
-l
`
if
[
$lines
-gt
0
]
then
cat
errors.txt
spell_check_code
=
1
fi
done
if
[
$spell_check_code
-gt
0
]
then
echo
"Spell check found some problems. Either fix them or add exceptions to the dictionary file: .aspell.en.pws"
fi
rm
errors.txt
exit
$spell_check_code
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment