Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-09 00:09:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-09 00:09:25 +0300
commit468f4cda2bf7ef45953603caadf46367981c7ce3 (patch)
tree240573d23c3bcc2a71e0cbd56b17cd4816ad89c6 /scripts/lint-doc.sh
parent89b770bb38aef8c0b895454e940d8f55a3038527 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/lint-doc.sh')
-rwxr-xr-xscripts/lint-doc.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index d6dde5744d7..061af911839 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -18,6 +18,18 @@ then
((ERRORCODE++))
fi
+# Documentation pages need front matter for tracking purposes.
+echo '=> Checking documentation for front matter...'
+echo
+no_frontmatter=$(find doc -name "*.md" -exec head -n1 {} \; | grep -v --count -- ---)
+if [ $no_frontmatter -ne 0 ]
+then
+ echo '✖ ERROR: These documentation pages need front matter. See https://docs.gitlab.com/ee/development/documentation/index.html#stage-and-group-metadata for how to add it.' >&2
+ find doc -name "*.md" -exec sh -c 'if (head -n 1 "{}" | grep -v -- --- >/dev/null); then echo "{}"; fi' \; 2>&1
+ echo
+ ((ERRORCODE++))
+fi
+
# Test for non-standard spaces (NBSP, NNBSP) in documentation.
echo '=> Checking for non-standard spaces...'
echo