Skip to content

Add support for custom file extensions in link checking.#1559

Merged
mre merged 12 commits intomasterfrom
extensions
Mar 2, 2025
Merged

Add support for custom file extensions in link checking.#1559
mre merged 12 commits intomasterfrom
extensions

Conversation

@mre
Copy link
Member

@mre mre commented Nov 7, 2024

This adds support for overwriting extensions:

lychee . --extensions md,html,txt,json,yaml

The above would only check these extensions.

This was enabled by moving to ignore (#1500 by @thomas-zahner).

I'm not 100% convinced about the design yet. Feedback welcome!
Guess we should use whatever ignore::types::Types for file extension matching as it's well-maintained and more exhaustive. Switching this would remove some custom code we have in FileType.

Fixes #410

@thomas-zahner
Copy link
Member

@mre looks good overall. Does this mean that non Markdown/HTML files are no longer checked when the new argument isn't specified?

@mre
Copy link
Member Author

mre commented Nov 8, 2024

Yeah, good point. I think plaintext is missing to be compatible with what we had before. That's the only missing format, or? Was considering to extend it to other formats like JSON or YAML as well.

mre and others added 2 commits February 24, 2025 22:36
This adds support for overwriting extensions:

```
lychee . --extensions md,html,txt,json,yaml
```

The above would only check these extensions.

This was enabled by moving to `ignore` (#1500 by @thomas-zahner).

Fixes #410
Co-authored-by: Thomas Zahner <thomas.zahner@protonmail.ch>
@mre mre requested a review from thomas-zahner February 26, 2025 00:23
@mre
Copy link
Member Author

mre commented Feb 26, 2025

@thomas-zahner, I made all changes. Can you check again?

Copy link
Member

@thomas-zahner thomas-zahner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it yet but it looks good, I like the new type 👍

@mre mre merged commit 85263df into master Mar 2, 2025
6 checks passed
@mre mre deleted the extensions branch March 2, 2025 16:47
@mre mre mentioned this pull request Feb 24, 2025
@mre mre mentioned this pull request May 13, 2025
@mre mre mentioned this pull request May 25, 2025
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.

Don't require <input>; Find all supported files in cwd automatically

2 participants