summaryrefslogtreecommitdiff
path: root/scripts/lint-doc.sh
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-08-16 15:51:41 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-08-16 15:51:41 +0200
commita2bf638e4044a20daa62bb6ddfa07c4e409a3d39 (patch)
tree7399abbf5e9d3d555857af8109b9d85da84a953c /scripts/lint-doc.sh
parentdb3c5a042d2cd03fb64d7f85b130d065dce3eb42 (diff)
parent5a4ecb9825f34011e9e021af70a3ff0a696ec3f7 (diff)
downloadgitlab-ce-a2bf638e4044a20daa62bb6ddfa07c4e409a3d39.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into 18681-pipelines-merge-request
Diffstat (limited to 'scripts/lint-doc.sh')
-rwxr-xr-xscripts/lint-doc.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
new file mode 100755
index 00000000000..bc6e4d94061
--- /dev/null
+++ b/scripts/lint-doc.sh
@@ -0,0 +1,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
+