summaryrefslogtreecommitdiff
path: root/run-tests
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-10 10:45:12 +0100
committerw0rp <devw0rp@gmail.com>2017-08-10 10:45:12 +0100
commit9ae2df195865e1f5ce3b1dab8b43c89e59ad471e (patch)
treefc24f64632c5fa0d9f4782cea3949ca09a01ee87 /run-tests
parent7dee9da0f27c31226a746377ba7f0bda15e70281 (diff)
downloadale-9ae2df195865e1f5ce3b1dab8b43c89e59ad471e.zip
Automatically check for invalid help tag references, and fix some existing documentation issues
Diffstat (limited to 'run-tests')
-rwxr-xr-xrun-tests21
1 files changed, 21 insertions, 0 deletions
diff --git a/run-tests b/run-tests
index b32ac703..eb398d0d 100755
--- a/run-tests
+++ b/run-tests
@@ -55,6 +55,12 @@ while [ $# -ne 0 ]; do
run_custom_checks=0
shift
;;
+ --custom-checks-only)
+ run_vim_tests=0
+ run_neovim_tests=0
+ run_vint=0
+ shift
+ ;;
--)
shift
break
@@ -211,6 +217,21 @@ if ((run_custom_checks)); then
echo
grep --exclude=tags -roh '\*.*\*$' doc | sort | uniq -d || EXIT=$?
+
+ echo '========================================'
+ echo 'Checking for invalid tag references'
+ echo '========================================'
+ echo 'Invalid tag references tags follow:'
+ echo
+
+ tag_regex='[gb]\?:\?\(ale\|ALE\)[a-zA-Z_\-]\+'
+
+ # Grep for tags and references, and complain if we find a reference without
+ # a tag for the reference. Only our tags will be included.
+ diff -u \
+ <(grep --exclude=tags -roh "\*$tag_regex\*" doc | sort -u | sed 's/*//g') \
+ <(grep --exclude=tags -roh "|$tag_regex|" doc | sort -u | sed 's/|//g') \
+ | grep '^+[^+]' && EXIT=1
fi
exit $EXIT