Add a test for conflicting docs directories
What does this MR do and why?
Add a test for conflicting docs directories.
With the launch of the Hugo-based docs website, pages sourced from gitlab are no longer nested in the "ee" directory in the website build, they become top-level.
This introduces the possibility of conflicting directory paths with other project docs, which get moved to the same level in the website build process. So, we need to test that docs MRs do not add a directory with the same name as another docs content source project.
References
gitlab-org/technical-writing/docs-gitlab-com#161 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Create a directory with a conflicting name, like:
mkdir doc/operator - Run the script:
./scripts/lint-doc.sh
Expected behavior: Error and failure exit code if a conflicting directory is found:
INFO: Checking for restricted directory names...
ERROR: Found restricted directory name 'operator' in doc/ directory.
This directory name conflicts with existing documentation repositories.