Validate misspellings in documentation
This commit is contained in:
parent
adf385fdf3
commit
f0b991e1a8
1 changed files with 4 additions and 2 deletions
|
@ -3,8 +3,10 @@
|
||||||
source "$(dirname "$BASH_SOURCE")/.validate"
|
source "$(dirname "$BASH_SOURCE")/.validate"
|
||||||
|
|
||||||
IFS=$'\n'
|
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
|
unset IFS
|
||||||
|
files=("${src[@]}" "${docs[@]}")
|
||||||
|
|
||||||
errors=()
|
errors=()
|
||||||
for f in "${files[@]}"; do
|
for f in "${files[@]}"; do
|
||||||
|
@ -16,7 +18,7 @@ for f in "${files[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ${#errors[@]} -eq 0 ]; then
|
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
|
else
|
||||||
{
|
{
|
||||||
echo "Errors from misspell:"
|
echo "Errors from misspell:"
|
||||||
|
|
Loading…
Reference in a new issue