mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
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:
parent
5000417279
commit
3eddaae882
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,7 +1,9 @@
|
||||
_build/
|
||||
_opam/
|
||||
*.install
|
||||
*.spellok
|
||||
*.catala*.errors
|
||||
compiler/**/.merlin
|
||||
legifrance_oauth*
|
||||
*.html
|
||||
.vscode/
|
||||
.vscode/
|
||||
|
@ -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
3
examples/whitelist.en
Normal file
@ -0,0 +1,3 @@
|
||||
catala
|
||||
enum
|
||||
durations
|
1
examples/whitelist.fr
Normal file
1
examples/whitelist.fr
Normal file
@ -0,0 +1 @@
|
||||
catala
|
Loading…
Reference in New Issue
Block a user