|
| 1 | +# Lychee link checker configuration |
| 2 | +# https://lychee.cli.rs/#/usage/config |
| 3 | +# |
| 4 | +# Run locally with: |
| 5 | +# lychee './**/*.md' './src/**/*.java' './pom.xml' |
| 6 | + |
| 7 | +# Include URL fragments in checks |
| 8 | +include_fragments = true |
| 9 | + |
| 10 | +# Don't allow any redirects, so links that have moved are surfaced and updated |
| 11 | +# to their canonical destination. |
| 12 | +max_redirects = 0 |
| 13 | + |
| 14 | +# Accept these HTTP status codes |
| 15 | +# 100-103: Informational responses |
| 16 | +# 200-299: Success responses |
| 17 | +# 403: Forbidden (some sites use this for rate limiting) |
| 18 | +# 429: Too Many Requests |
| 19 | +# 500-599: Server errors (temporary issues shouldn't fail CI) |
| 20 | +# 999: LinkedIn's custom status code |
| 21 | +accept = ["100..=103", "200..=299", "403", "429", "500..=599", "999"] |
| 22 | + |
| 23 | +# Exclude URL patterns from checking (treated as regular expressions) |
| 24 | +exclude = [ |
| 25 | + '^file://', |
| 26 | + # Live / auth-gated endpoints that appear as string literals or require login |
| 27 | + '^https://geoip\.maxmind\.com', |
| 28 | + '^https://geolite\.info', |
| 29 | + '^https://minfraud\.maxmind\.com', |
| 30 | + '^https://sandbox\.maxmind\.com', |
| 31 | + '^https://updates\.maxmind\.com', |
| 32 | + '^https://www\.maxmind\.com/en/accounts/', |
| 33 | + 'https://www\.maxmind\.com/en/account/login', |
| 34 | + # XML namespace identifiers in pom.xml (not real links) |
| 35 | + '^http://www\.w3\.org/', |
| 36 | + '^http://maven\.apache\.org/', |
| 37 | + '^https://maven\.apache\.org/xsd/', |
| 38 | + '^http://java\.sun\.com/', |
| 39 | + '^http://schemas\.', |
| 40 | + # Maven property placeholder in a build-time download URL (not a real link) |
| 41 | + 'japicmp\.baselineVersion', |
| 42 | + # Placeholders / local |
| 43 | + '^https?://example\.(com|org|net)', |
| 44 | + '^http://localhost', |
| 45 | + '127\.0\.0\.1', |
| 46 | +] |
| 47 | + |
| 48 | +# Exclude file paths from getting checked (treated as regular expressions) |
| 49 | +exclude_path = [ |
| 50 | + '(^|/)node_modules/', |
| 51 | + '(^|/)target/', |
| 52 | + # Test fixtures (MaxMind-DB submodule) contain example URLs, not ours |
| 53 | + '(^|/)src/test/resources/', |
| 54 | + # Changelog: historical entries are preserved as-is, not rewritten |
| 55 | + '(^|/)CHANGELOG\.md$', |
| 56 | +] |
| 57 | + |
| 58 | +# Cache results for 1 day to speed up repeated checks |
| 59 | +cache = true |
| 60 | +max_cache_age = "1d" |
| 61 | + |
| 62 | +# Skip missing input files instead of erroring |
| 63 | +skip_missing = true |
0 commit comments