diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /scripts/lint-doc.sh | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'scripts/lint-doc.sh')
-rwxr-xr-x | scripts/lint-doc.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh index 0157f0c0812..e99b8a47301 100755 --- a/scripts/lint-doc.sh +++ b/scripts/lint-doc.sh @@ -67,7 +67,7 @@ fi # Do not use 'README.md', instead use 'index.md' # Number of 'README.md's as of 2021-08-17 -NUMBER_READMES=13 +NUMBER_READMES=0 FIND_READMES=$(find doc/ -name "README.md" | wc -l) echo '=> Checking for new README.md files...' echo @@ -81,6 +81,22 @@ then ((ERRORCODE++)) fi +# Do not use dashes (-) in directory names, use underscores (_) instead. +# Number of directories with dashes as of 2021-09-17 +NUMBER_DASHES=2 +FIND_DASHES=$(find doc -type d -name "*-*" | wc -l) +echo '=> Checking for directory names containing dashes...' +echo +if [ ${FIND_DASHES} -ne $NUMBER_DASHES ] +then + echo + echo ' ✖ ERROR: The number of directory names containing dashes has changed. Use underscores instead of dashes for the directory names.' >&2 + echo ' ✖ If removing a directory containing dashes, update NUMBER_DASHES in lint-doc.sh.' >&2 + echo ' https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#work-with-directories-and-files' + echo + ((ERRORCODE++)) +fi + # Run Vale and Markdownlint only on changed files. Only works on merged results # pipelines, so first checks if a merged results CI variable is present. If not present, # runs test on all files. |