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-09-20 09:09:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 09:09:32 +0300
commitafb35e247139c24382a0bb3da893ce156e183be2 (patch)
tree82b74d1eaa6d17ddb53118b205fb91764a4f24d6 /scripts/lint-doc.sh
parent58c0ae1238785d0964789537be3d75f94e8d60dd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/lint-doc.sh')
-rwxr-xr-xscripts/lint-doc.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index 0157f0c0812..a014a1d622c 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -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.