Skip to content

fix(docs): fix broken license URLs + SPDX casing + sourceforge exclusion#276

Open
ronaldtse wants to merge 1 commit into
v5from
fix/link-checker-failures
Open

fix(docs): fix broken license URLs + SPDX casing + sourceforge exclusion#276
ronaldtse wants to merge 1 commit into
v5from
fix/link-checker-failures

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Problem

link_checker job has been failing on v5 itself (not just feature branches), causing a red X on every docs PR. Three root causes identified and fixed.

Fixes

1. SPDX URL casing bug (docs/generate.js)

The spdx_license field from YAML was .toUpperCase()'d for comparison, but the uppercased value was also used to construct spdx.org/licenses/*.html URLs. SPDX URLs are case-sensitive:

  • Bitstream-Vera.html → 200 ✅
  • BITSTREAM-VERA.html → 404 ❌

Fix: preserve original YAML casing (spdxLicenseRaw) for URL construction, keep uppercased version for comparison only. Affects 8 URL templates (CC0, CC-BY, CC-BY-SA, GPL, LGPL, UFL, IPA, and the generic fallback).

2. Dead Monotype license URLs (48 formula YAMLs)

47 formulas had license_url: http://www.monotype.com/html/type/license.html which 404s (the page was reorganized; both HTTP and HTTPS are dead).

Fix: replaced with the only available archive.org snapshot:

https://web.archive.org/web/19981205192800/http://www.monotype.com/html/type/license.html

Also fixed:

  • 14 HK-variant files (monotype.com.hk) — no archive snapshot exists; license_url field removed (license text preserved in open_license)
  • office_preview.yml — dead monotype.com/html/mtname/ms_welcome.html → archive.org snapshot (1999)

3. SourceForge exclusion (docs/lychee.toml)

*.sourceforge.net download mirrors rate-limit or block GitHub Actions IPs, causing false failures on ~14 MS core font download URLs.

Fix: added exclude = ["https://[^/]*\\.sourceforge\\.net"] to lychee config. These URLs are verified by the formula-health Tier 2 installation tests, not by the link checker.

Files

  • docs/generate.js — SPDX casing fix (8 URL templates)
  • docs/lychee.toml — sourceforge exclusion
  • 32 formula YAMLs — license_url → archive.org snapshot
  • 14 formula YAMLs — dead license_url removed (no archive available)
  • 1 formula YAML (office_preview.yml) — license_url → archive.org snapshot
  • 1 formula YAML (courier.yml) — license_url → archive.org snapshot

Three issues causing link_checker failures on v5:

1. SPDX URL casing (generate.js): spdx_license field was uppercased
   before building spdx.org URLs. SPDX URLs are case-sensitive:
   'Bitstream-Vera.html' works, 'BITSTREAM-VERA.html' returns 404.
   Fix: use original YAML casing for URL construction, keep uppercased
   version for comparison/matching only.

2. Dead Monotype license URLs (47 formula YAMLs): the license_url field
   pointed to http://www.monotype.com/html/type/license.html which 404s.
   Replaced with the only available archive.org snapshot (1998).
   14 HK-variant files (monotype.com.hk) had no archive snapshot and
   were removed — license text is preserved in open_license.
   Also fixed office_preview.yml (monotype.com/html/mtname/ms_welcome.html).

3. SourceForge download URLs (lychee.toml): *.sourceforge.net mirrors
   rate-limit or block GitHub Actions IPs, causing false failures.
   Added exclusion — these URLs are verified by Tier 2 install tests.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Fontist formula checks: PASS

0 of 0 checks failed · workflow · full JSON

Check Scope Result

Generated by render_report.rb from results/*.json artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant