gitlab-org--gitlab-foss/scripts/lint-doc.sh

16 lines
344 B
Bash
Raw Normal View History

2016-08-08 08:42:20 -04:00
#!/usr/bin/env bash
cd "$(dirname "$0")/.."
# Use long options (e.g. --header instead of -H) for curl examples in documentation.
grep --perl-regexp --recursive --color=auto 'curl (.+ )?-[^- ].*' doc/
if [ $? == 0 ]
then
echo '✖ ERROR: Short options should not be used in documentation!' >&2
exit 1
fi
echo "✔ Linting passed"
exit 0