diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-09 00:09:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-09 00:09:25 +0300 |
commit | 468f4cda2bf7ef45953603caadf46367981c7ce3 (patch) | |
tree | 240573d23c3bcc2a71e0cbd56b17cd4816ad89c6 /scripts | |
parent | 89b770bb38aef8c0b895454e940d8f55a3038527 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/lint-doc.sh | 12 |
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 |