2016-09-13 17:45:13 +05:30
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
# Use long options (e.g. --header instead of -H) for curl examples in documentation.
|
2017-08-17 22:00:37 +05:30
|
|
|
grep --extended-regexp --recursive --color=auto 'curl (.+ )?-[^- ].*' doc/
|
2016-09-13 17:45:13 +05:30
|
|
|
if [ $? == 0 ]
|
|
|
|
then
|
|
|
|
echo '✖ ERROR: Short options should not be used in documentation!' >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
# Ensure that the CHANGELOG.md does not contain duplicate versions
|
|
|
|
DUPLICATE_CHANGELOG_VERSIONS=$(grep --extended-regexp '^## .+' CHANGELOG.md | sed -E 's| \(.+\)||' | sort -r | uniq -d)
|
|
|
|
if [ "${DUPLICATE_CHANGELOG_VERSIONS}" != "" ]
|
|
|
|
then
|
|
|
|
echo '✖ ERROR: Duplicate versions in CHANGELOG.md:' >&2
|
|
|
|
echo "${DUPLICATE_CHANGELOG_VERSIONS}" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
echo "✔ Linting passed"
|
|
|
|
exit 0
|