Validate misspellings in documentation

This commit is contained in:
Ed Robinson 2016-11-16 09:50:20 +00:00
parent adf385fdf3
commit f0b991e1a8
No known key found for this signature in database
GPG key ID: EC501FCA6421CCF0

View file

@ -3,8 +3,10 @@
source "$(dirname "$BASH_SOURCE")/.validate"
IFS=$'\n'
files=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^vendor/\|autogen' || true) )
src=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^vendor/\|autogen' || true) )
docs=( $(validate_diff --diff-filter=ACMR --name-only -- 'docs/*.md') )
unset IFS
files=("${src[@]}" "${docs[@]}")
errors=()
for f in "${files[@]}"; do
@ -16,7 +18,7 @@ for f in "${files[@]}"; do
done
if [ ${#errors[@]} -eq 0 ]; then
echo 'Congratulations! All Go source files have been checked for common mispellings.'
echo 'Congratulations! All Go source files and docs have been checked for common mispellings.'
else
{
echo "Errors from misspell:"