Exclude image and development files from docs-locale link validation

What does this MR do?

Reduces noise in the docs-i18n-lint links job by excluding two categories of paths that produce 100% failure rates and will never be valid in localized builds:

  1. Image files — excluded via --exclude "\.(png|jpg|gif|svg)$". Localized docs don't host images under /doc-locale; we always serve the en-us originals, so lychee fails on every image link.
  2. Development docs anchor links (ja-jp/development) — excluded via --exclude "ja-jp/development.*#". We only ship placeholder files for development pages and never translate anchor links within them, so every anchor check fails.

These exclusions bring reported errors down from 9 to 2 — making the remaining failures meaningful and actionable.

I've also made the script output the errors in the CI log here so we can see them, and set the docs-i18n-lint links to allow failure.

Why is this needed?

Both excluded paths cause lychee to fail 100% of the time by design, not due to real link rot. Filtering them out eliminates false positives and lets the job surface genuine broken links in content we actually own and maintain.

Changes made

  • Added allow_failure: true to the docs:lint i18n markdown job in .gitlab/ci/qa.gitlab-ci.yml to prevent pipeline failures while we refine the link validation
  • Updated scripts/lint-i18n-docs to exclude image files (--exclude "\.(png|jpg|gif|svg)$") from link validation since localized docs don't host images
  • Updated scripts/lint-i18n-docs to exclude development docs anchor links (--exclude "ja-jp/development.*#") since these are placeholder files with untranslated anchors
  • Modified error handling in the script to increment ERROR_RESULTS counter instead of just echoing a message

Why was this MR needed?

Removes links flagged as broken when they are not from the error log, leaving only true errors.

What's the best way to test this MR?

  1. Run scripts/lint-i18n-docs locally to see the errors that exist today - signaling stale /docs-locale files we need to send out for translation.
  2. Remove any directory inside /docs-locle
  3. Run scripts/lint-i18n-docs again - and see more broken links - flagging the files you just removed

What are the relevant issue numbers?

  1. Related gitlab-com/localization/docs-site-localization#811 (closed)
  2. Related gitlab-com/localization/docs-site-localization#810 (closed)
Edited by Lauren Barker

Merge request reports

Loading