Skip to content

Commit eb1cf35

Browse files
committed
ci: move lychee's .lycheeignore exclusion into the hook
The "--exclude-path .lycheeignore" arg looked redundant, since lychee reads the URL patterns from that file on its own. It was not: the arg also kept the file out of the *inputs*, and pre-commit hands the hook every changed file - so on a push touching .lycheeignore, lychee read it as plain text, pulled 26 junk URLs out of the regexes ("https://posteo/" and friends) and failed. The arg is dropped and the file is excluded through pre-commit's own "exclude" instead. Prompt: drop the noop-thing from .pre-commit-config.yaml [the "--exclude-path .lycheeignore" arg, which I had wrongly called a no-op] Assisted-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 4669f33 commit eb1cf35

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ repos:
3535
rev: lychee-v0.24.2
3636
hooks:
3737
- id: lychee
38-
args: ["--no-progress", "--timeout", "10", "--exclude-path", ".lycheeignore", "--max-cache-age=30d", "--cache"]
38+
args: ["--no-progress", "--timeout", "10", "--max-cache-age=30d", "--cache"]
3939
stages: [pre-push]
40-
exclude: ^tests/test_caldav_unit\.py$
40+
## lychee reads the URL patterns from .lycheeignore by itself. The
41+
## dropped "--exclude-path .lycheeignore" arg did something else: it
42+
## kept that file out of the *inputs*, which is needed, as lychee
43+
## otherwise reads it as text and extracts junk URLs from the regexes.
44+
exclude: ^(tests/test_caldav_unit\.py|\.lycheeignore)$

0 commit comments

Comments
 (0)