diff options
author | EuAndreh <eu@euandre.org> | 2019-05-22 04:11:30 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-05-22 04:14:54 -0300 |
commit | 607f17f612b1d217955b34cc803bf6c67407bee6 (patch) | |
tree | f26b3e7cdf1564a6b521b23419ad71006eb92405 | |
parent | Setup hunspell spellchecking to run against HTML output (diff) | |
download | euandre.org-607f17f612b1d217955b34cc803bf6c67407bee6.tar.gz euandre.org-607f17f612b1d217955b34cc803bf6c67407bee6.tar.xz |
Fail hunspellCheck when hunspell detects spelling mistakes
Diffstat (limited to '')
-rw-r--r-- | default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/default.nix b/default.nix index a5d6f4e..fd02d59 100644 --- a/default.nix +++ b/default.nix @@ -87,6 +87,13 @@ with pkgs.stdenv; rec { exit 1 } + HTML_DIR="${subtasks.docs}" + hunspell -l -p spelling/en_US-dict.txt -d en_US -i utf-8 $(find "$HTML_DIR" -type f) | tee spelling.txt + [[ -s spelling.txt ]] && { + echo "Mispelled words detected by hunspell." + exit 1 + } + touch $out ''; }); |