|
1 | | -# WHY: Configures Lychee link checker behavior for CI/CD |
2 | | -# OBS: Flat structure required by lychee v0.22+; no nested sections |
| 1 | +# ============================================================ |
| 2 | +# lychee.toml (Lychee link checker configuration) |
| 3 | +# ============================================================ |
| 4 | + |
| 5 | +# REQ.PROJECT: Automatic link checking using GitHub Actions and Lychee. |
| 6 | +# WHY-FILE: Shared Lychee configuration (lychee.toml) for documentation-heavy repositories. |
| 7 | +# REQ: Link checking MUST be reliable and CI-safe. |
| 8 | +# WHY: Configures Lychee link checker behavior for CI/CD. |
| 9 | +# OBS: Flat structure required by lychee v0.22+; no nested sections. |
| 10 | +# OBS: No path exclusions; all documentation files are expected to be link-clean. |
| 11 | +# OBS: Link integrity preserves stable, reconstructible references over time. |
| 12 | +# OBS: Link integrity maintains connections to external resources. |
3 | 13 |
|
4 | 14 | # WHY: Control verbosity and CI-friendly output |
5 | | -verbose = "info" # WHY: Balance between detail and noise |
6 | | -no_progress = true # WHY: Progress bars don't work well in CI logs |
| 15 | +verbose = "info" # WHY: Balance between detail and noise |
| 16 | +no_progress = true # WHY: Progress bars don't work well in CI logs |
7 | 17 |
|
8 | 18 | # WHY: Performance tuning for link checking |
9 | | -max_concurrency = 6 # WHY: Parallel requests without overwhelming servers |
10 | | -max_retries = 3 # WHY: Retry flaky connections before failing |
11 | | -retry_wait_time = 8 # WHY: Wait 8 seconds between retries |
12 | | -timeout = 30 # WHY: 30 seconds per request before timeout |
| 19 | +max_concurrency = 6 # WHY: Parallel requests without overwhelming servers |
| 20 | +max_retries = 3 # WHY: Retry flaky connections before failing |
| 21 | +retry_wait_time = 8 # WHY: Wait 8 seconds between retries |
| 22 | +timeout = 30 # WHY: 30 seconds per request before timeout |
13 | 23 |
|
14 | 24 | # WHY: Accept common status codes that don't indicate broken links |
15 | 25 | # OBS: 403 and 429 reduce false positives |
16 | 26 | accept = [ |
17 | | - 200, # OK |
18 | | - 206, # Partial content |
19 | | - 301, # Moved permanently |
20 | | - 302, # Found (temporary redirect) |
21 | | - 307, # Temporary redirect |
22 | | - 308, # Permanent redirect |
23 | | - 403, # Forbidden (often false positive) |
24 | | - 429, # Too many requests (rate limiting) |
25 | | - 503, # Service unavailable (temporary) |
| 27 | + 200, # OK |
| 28 | + 206, # Partial content |
| 29 | + 301, # Moved permanently |
| 30 | + 302, # Found (temporary redirect) |
| 31 | + 307, # Temporary redirect |
| 32 | + 308, # Permanent redirect |
| 33 | + 403, # Forbidden (often false positive) |
| 34 | + 429, # Too many requests (rate limiting) |
| 35 | + 503, # Service unavailable (temporary) |
26 | 36 | ] |
27 | 37 |
|
28 | 38 | # WHY: Exclude patterns that shouldn't be checked |
29 | 39 | exclude = [ |
30 | | - "example\\.com", # WHY: Exclude example domains in documentation |
31 | | - "localhost", # WHY: Exclude local development URLs |
32 | | - "127\\.0\\.0\\.1", # WHY: Exclude local loopback |
33 | | - "\\.local", # WHY: Exclude local network domains |
| 40 | + "example\\.com", # WHY: Exclude example domains in documentation |
| 41 | + "localhost", # WHY: Exclude local development URLs |
| 42 | + "127\\.0\\.0\\.1", # WHY: Exclude local loopback |
| 43 | + "\\.local", # WHY: Exclude local network domains |
34 | 44 | ] |
0 commit comments