summaryrefslogtreecommitdiff
path: root/scripts/lint-doc.sh
blob: bc6e4d940611423a83dc9b664099dc11b4c1fa99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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