examples: add a %.spellok helper to check spelling

Usage:
`make -C examples/tutorial_en tutorial_en.spellok`

This will output a list of incorrect words (which should be empty).
Catala-specific words (or uncommon words missing from the default aspell dictionary) can be added to examples/whitelist.<lang>

Signed-off-by: Edwin Török <edwin@etorok.net>
This commit is contained in:
Edwin Török 2021-10-10 15:45:57 +01:00
parent 5000417279
commit 3eddaae882
4 changed files with 13 additions and 1 deletions

4
.gitignore vendored
View File

@ -1,7 +1,9 @@
_build/
_opam/
*.install
*.spellok
*.catala*.errors
compiler/**/.merlin
legifrance_oauth*
*.html
.vscode/
.vscode/

View File

@ -56,6 +56,12 @@ help : ../Makefile.common.mk
HTML \
$<
%.spellok: %.catala_$(CATALA_LANG) ../whitelist.$(CATALA_LANG)
aspell list --lang=$(CATALA_LANG) --mode=markdown --camel-case --add-wordlists=../whitelist.$(CATALA_LANG) <$< | tee "$<".errors
@# list of mispelled words must be empty
@test ! -s "$<".errors
@touch $@
##########################################
# Misceallenous

3
examples/whitelist.en Normal file
View File

@ -0,0 +1,3 @@
catala
enum
durations

1
examples/whitelist.fr Normal file
View File

@ -0,0 +1 @@
catala