forked from rokath/trice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlychee.toml
More file actions
108 lines (82 loc) Β· 2.94 KB
/
lychee.toml
File metadata and controls
108 lines (82 loc) Β· 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
############################
# lychee.toml
#
# Purpose:
# Lychee configuration for reproducible link checks locally and in CI.
#
# Key principles in this setup:
# 1) Do NOT use regex look-ahead / look-behind (not supported by Lychee).
# 2) Exclude unwanted directories/files via `exclude_path` (regex).
# 3) Check only HTTP(S) links by scheme to avoid failing on local file artifacts.
# 4) Accept HTTP 403 (some sites block automated link checkers).
############################
############################
# Display / Logging
############################
# Log level: "error", "warn", "info", "debug", "trace"
# Use "info" by default, switch to "debug" when troubleshooting.
verbose = "info"
# Disable interactive progress output (cleaner CI logs).
no_progress = false # false=progress bar, true=file list
# Human-readable output for logs.
format = "detailed"
############################
# Request Behavior
############################
# Per-request timeout in seconds.
# Consider increasing if you see frequent timeouts on vendor sites.
timeout = 30
# Maximum number of redirects to follow.
max_redirects = 5
# Retries help with flaky endpoints and transient failures (DNS, CDN, etc.).
max_retries = 2
retry_wait_time = 2
# Check web links AND local file links (including anchors in local Markdown/HTML).
scheme = ["http", "https", "file"]
# Do not enforce HTTPS globally (some sites still legitimately use HTTP).
require_https = false
############################
# Accepted HTTP status codes
############################
# Treat these HTTP status codes as valid.
#
# Why accept 403?
# Some sites intentionally block bots or require cookies / JS challenges.
# The link can still be valid for humans, so many teams accept 403.
accept = [
200, 203, 206,
301, 302, 303, 307, 308,
403 # Forbidden (intentionally accepted)
]
############################
# Link exclusions (URLs)
############################
# Exclude URLs from checking (regex-based).
# Use this only if you have known flaky domains or intentionally unreachable links.
exclude = [
# Local development links in documentation
"^https?://localhost(:[0-9]+)?",
"^https://www\\.st\\.com/.*",
"^https://st\\.com/.*"
]
############################
# Path exclusions (files/directories)
############################
# Exclude paths from being scanned (regex-based).
#
# Regex notes:
# - "(^|/)" matches either the start of the path or a directory separator
# - "(/|$)" ensures we match a directory boundary (or end of path)
exclude_path = [
# Legacy documentation directory (your current pain point)
"(^|/)docs/_Legacy(/|$)",
# Exclude "Drivers" directories anywhere under examples/
# (macOS paths and repo paths are typically normalized with "/")
"(^|/)examples/.*/Drivers(/|$)",
# Vendored / third-party content
"(^|/)third_party(/|$)",
# Generated artifacts
"(^|/)dist(/|$)",
# Git metadata (usually unnecessary, but harmless to exclude explicitly)
"(^|/)\\.git(/|$)"
]