2019-09-10 18:34:13 +00:00
language : minimal
dist : bionic
addons :
apt :
packages :
- python3-pip
- python3-setuptools
install :
- pip3 install --user codespell
2019-09-22 13:51:14 +00:00
- go get -u github.com/client9/misspell/cmd/misspell
2019-09-10 18:34:13 +00:00
script :
2019-09-28 14:43:42 +00:00
- git grep -n --color $'\r' -- "*.asciidoc" "*.md" && echo "^ Possible Windows style line ending detected. Please use Unix style line endings (\n)." && exit 1 || true
- git grep -n --color ' $' -- "*.asciidoc" "*.md" && echo "^ Trailing space detected at end of line. Please remove." && exit 1 || true
- git grep -n --color $'\t' -- "*.asciidoc" "*.md" && echo "^ Use of tabs detected. Please use space for indentation." && exit 1 || true
- git grep -iE -n --color '(^| )(\w+) \2(\.|,|:|;| |$)' -- "*.asciidoc" "*.md" && echo "^ Detected lexical illusion in the form of a duplicated word. Please correct." && exit 1 || true
2019-09-20 19:48:52 +00:00
- for FILE in $(git ls-files -- "*.asciidoc" "*.md"); do if [[ $(tail -c1 $FILE) != "" ]]; then echo "File ${FILE} does not end with a newline character (\n)."; exit 1; fi; done
2019-09-20 19:46:48 +00:00
- git grep "" -- "*.asciidoc" "*.md" | uniq -c | grep -1 "^ [2-9] " | cut -b9- | sed 's/:$/:[more-than-one-blank-line-here-please-remove]/' | grep ":" && echo "^ Multiple blank lines detected. Please use only one blank line between paragraphs." && exit 1 || true
2019-09-10 18:34:13 +00:00
- codespell --ignore-words-list=que $(git ls-files -- "*.asciidoc" "*.md")
2019-09-22 13:51:14 +00:00
- misspell -error $(git ls-files -- "*.asciidoc" "*.md")