1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-22 20:31:31 +03:00

Redo the way undocumented definitions are counted (#381)

* Redo the way undocumented definitions are counted

* Fix YAML

* Fix a typo
This commit is contained in:
Artyom Kazak 2019-08-19 15:35:34 +03:00 committed by mergify[bot]
parent 0d170b3e30
commit a100905cbf

View File

@ -69,11 +69,12 @@ jobs:
# "missing documentation".
- stack --no-terminal exec -- ghc-pkg unregister guide
- stack --no-terminal build --test --no-run-tests --haddock --no-haddock-deps --haddock-arguments='--no-warnings' 2> haddock.log
- awk '/\(src\//' haddock.log | awk 'END { print NR }' > undocumented
- awk '{ print "undocumented == " $1 }' undocumented
- export undocumented=$(awk '/\(src\// {count++} END{print count}' haddock.log)
- |
if [[ `cat undocumented` -gt 251 ]]; then
>&2 echo "FAIL: found $(cat undocumented) top-level undocumented definitions. The current limit is 251. Please, add Haddock comments to undocumented definitions!"
echo "Undocumented definitions: $undocumented"
- |
if [ $undocumented -gt 251 ]; then
>&2 echo "FAIL: found $undocumented top-level undocumented definitions. The current limit is 251. Please, add Haddock comments to undocumented definitions!"
exit 1
fi
before_cache: