Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
32667581
Commit
32667581
authored
Sep 20, 2021
by
Achilleas Pipinellis
Committed by
Albert Salim
Sep 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test to check for dashes in docs directory names
parent
f509f166
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
scripts/lint-doc.sh
scripts/lint-doc.sh
+16
-0
No files found.
scripts/lint-doc.sh
View file @
32667581
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment