Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
7fbe6a40
Commit
7fbe6a40
authored
1 year ago
by
Achilleas Pipinellis
Committed by
Jennifer Li
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add test to check for uppercase letters in dir and file names
parent
47c8eca7
No related branches found
No related tags found
2 merge requests
!120936
Draft: Debugging commit to trigger pipeline (DO NOT MERGE)
,
!120726
Add test to check for uppercase letters in dir and file names
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/development/sec/cyclonedx_property_taxonomy.md
+0
-0
0 additions, 0 deletions
doc/development/sec/cyclonedx_property_taxonomy.md
scripts/lint-doc.sh
+29
-2
29 additions, 2 deletions
scripts/lint-doc.sh
with
29 additions
and
2 deletions
doc/development/sec/
C
yclone
DX
_property_taxonomy.md
→
doc/development/sec/
c
yclone
dx
_property_taxonomy.md
+
0
−
0
View file @
7fbe6a40
File moved
This diff is collapsed.
Click to expand it.
scripts/lint-doc.sh
+
29
−
2
View file @
7fbe6a40
...
...
@@ -76,7 +76,7 @@ then
echo
echo
' ✖ ERROR: The number of README.md file(s) has changed. Use index.md instead of README.md.'
>
&2
echo
' ✖ If removing a README.md file, update NUMBER_READMES in lint-doc.sh.'
>
&2
echo
' https://docs.gitlab.com/ee/development/documentation/s
tyleguide/index
.html#work-with-directories-and-files'
echo
' https://docs.gitlab.com/ee/development/documentation/s
ite_architecture/folder_structure
.html#work-with-directories-and-files'
>
&2
echo
((
ERRORCODE++
))
fi
...
...
@@ -92,7 +92,34 @@ 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
' https://docs.gitlab.com/ee/development/documentation/site_architecture/folder_structure.html#work-with-directories-and-files'
>
&2
echo
((
ERRORCODE++
))
fi
# Do not use uppercase letters in directory and file names, use all lowercase instead.
# (find always returns 0, so we use the grep hack https://serverfault.com/a/225827)
FIND_UPPERCASE_DIRS
=
$(
find doc
-type
d
-name
"*[[:upper:]]*"
)
echo
'=> Checking for directory names containing an uppercase letter...'
echo
if
echo
"
${
FIND_UPPERCASE_DIRS
}
"
|
grep
.
&>/dev/null
then
echo
'✖ ERROR: Found one or more directories with an uppercase letter in their name. Use lowercase instead of uppercase for the directory names.'
>
&2
echo
'https://docs.gitlab.com/ee/development/documentation/site_architecture/folder_structure.html#work-with-directories-and-files'
>
&2
echo
echo
"
${
FIND_UPPERCASE_DIRS
}
"
echo
((
ERRORCODE++
))
fi
FIND_UPPERCASE_FILES
=
$(
find doc
-type
f
-name
"*[[:upper:]]*.md"
)
echo
'=> Checking for file names containing an uppercase letter...'
echo
if
echo
"
${
FIND_UPPERCASE_FILES
}
"
|
grep
.
&>/dev/null
then
echo
'✖ ERROR: Found one or more file names with an uppercase letter in their name. Use lowercase instead of uppercase for the file names.'
>
&2
echo
'https://docs.gitlab.com/ee/development/documentation/site_architecture/folder_structure.html#work-with-directories-and-files'
>
&2
echo
echo
"
${
FIND_UPPERCASE_FILES
}
"
echo
((
ERRORCODE++
))
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment