Commit graph

206 commits

Author SHA1 Message Date
Matthias
a981472eda Bump version to 0.14.1 2024-01-10 00:24:57 +01:00
Matthias Endler
2b30e001a5
Mention anchor/fragment support in docs 2024-01-07 00:22:12 +01:00
mre
bcc00441eb chore(docs): update TOC 2024-01-05 15:36:28 +00:00
Matthias
b37d255d45 fix docs after release 2024-01-05 16:36:14 +01:00
Everett Pompeii
449539f2e2
Add Bencher to Lychee users list (#1315)
Bencher uses Lychee to check links in CI. Thank you!
2023-12-04 00:38:00 +01:00
Thomas Zahner
11d8d44895
Update README.md with exit code 3 (#1281) 2023-10-27 13:28:33 +02:00
mre
36c34f271c chore(docs): update TOC 2023-09-17 19:39:13 +00:00
Techassi
1b1fd0c707
feat: Add support for ranges in the --accept option / config field (#1167)
Adds support for accept ranges discussed in #1157. This allows the user to specify custom HTTP status codes accepted during checking and thus will report as valid (not broken). The accept option only supports specifying status codes as a comma-separated list. With this PR, the option will accept a list of status code ranges formatted like this:

```toml
accept = ["100..=103", "200..=299", "403"]
```

These combinations will be supported: `..<end>`, ` ..=<end>`, `<start>..<end>` and `<start>..=<end>`.
The behavior is copied from the Rust Range like concepts:

```
    ..<end>, includes 0 to <end> (exclusive)
    ..=<end>, includes 0 to <end> (inclusive)
    <start>..<end>, includes <start> to <end> (exclusive)
    <start>..=<end>, includes <start> to <end> (inclusive)
```


- Foundation and enhancements for accept ranges, including support for comma-separated strings and integration into the CLI.
- Implementations and updates for AcceptSelector, including Default, Display, and serde defaults.
- Address and fix various errors: clippy, cargo fmt, and tests.
- Add more tests, address edge cases, and enhance error messaging, especially for TOML config parsing.
- Update dependencies.
2023-09-17 21:39:01 +02:00
mre
f5fe25a1c8 chore(docs): update TOC 2023-09-14 23:27:58 +00:00
Matthias Endler
0711112841
Mention supported schemes (#1255)
Fixes https://github.com/lycheeverse/lycheeverse.github.io/issues/7
2023-09-15 01:27:44 +02:00
Hugo McNally
8e6369377c
Introduce fragment checking for links to markdown files. (#1126)
- Implemented enhancements to include fragments in file links
- Checked links to markdown files with fragments, generating unique kebab case and heading attributes.
- Made code more idiomatic and added an integration test.
- Updated documentation.
- Fixed issues with heading attributes fragments and ensured proper handling of file errors.
2023-07-31 16:04:00 +02:00
Matthias Endler
04887ee293
Make checking email addresses optional (#1171)
E-Mail checks cause too many false-postives,
so we put them behind a flag.

* `--exclude-mail` is deprecated (to be removed in 1.0)
* `--include-mail` is the new flag

This PR also removes the obsolete tests for `--exclude-file`, which was superseded by `.lycheeignore`.

Fixes #1089
2023-07-19 19:58:38 +02:00
Techassi
f53619a455
feat: Add support for --dump-inputs (#1159)
* Add support for --dump-inputs
* Add integration tests
* Fix usage guide in README
2023-07-16 18:08:14 +02:00
mre
f1817ead5e chore(docs): update TOC 2023-07-15 14:19:16 +00:00
mre
d69be812ef chore(docs): update TOC 2023-07-15 14:18:07 +00:00
github-actions[bot]
030353537b
docs: Update TOC 2023-07-15 14:15:50 +00:00
github-actions[bot]
48e7f257b2
docs: Update TOC 2023-07-15 14:09:13 +00:00
Manish Kuniyal
8341ab8ec6
Added TOC-generator (#1151) 2023-07-15 16:08:51 +02:00
Matthias Endler
14e748793e
Cookie Support (#1146)
This is a very conservative and limited implementation of cookie support.

The goal is to ship an MVP, which covers 80% of the use-cases.
When you run lychee with --cookie-jar cookies.json, all cookies will be stored in cookies.json, one cookie per line.
This makes cookies easy to edit by hand if needed, although this is an advanced use-case and the API for the format is not guaranteed to be stable.

Fixes: #645, #715
Partially fixes: #1108
2023-07-13 17:32:41 +02:00
Manish Kuniyal
692ac31734
Added Back-to-Top Button in the Readme file (#1142) 2023-07-07 12:15:33 +02:00
Techassi
67af7ef6d3
feat: add support for basic auth per URI (#1110)
* Add support for basic auth per domain
* Move URI matching to link collection phase
* Allow AsRef for BasicAuthExtractor::new to avoid clone
* Add tests

---------

Co-authored-by: Matthias Endler <matthias@endler.dev>
2023-06-26 12:06:24 +02:00
Stefan Kreutz
7dd84f6b7c
Add optional Rustls support (#1099)
* Add optional Rustls support

This commit adds a non-default feature flag to use Rustls instead of OpenSSL.

My personal motivation is to use Lychee on OpenBSD -current, where the
`openssl` crate frequently fails to link against the unreleased system
LibreSSL. Using the `vendored-openssl` feature helps with compilation, but
segfaults at runtime.

The commit adds three feature flags to the library, binary, benchmark, and all
examples:

- The `native-tls` feature flag toggles the `openssl` crate.
- The `rustls-tls` feature flag toggles the `rustls` crate.
- The `email-check` feature flag toggles the `check-if-email-exists` crate,
  which is the only existing functionality currently incompatible with Rustls.

By default, `native-tls` and `email-check` are enabled. Thus, Lychee (bin and
lib) can be used as before unless default features are disabled.

To use the Rustls feature, pass `--no-default-features --features rustls` to
cargo check/build/test/..., e.g.,

    $ cargo clippy --workspace --all-targets --no-default-features \ --features
    rustls-tls -- --deny warnings

Checking email addresses requires both, `native-tls` and `email-check`, to be
enabled. Otherwise, email addresses are excluded.

The `email-check` feature flag is technically not necessary. I preferred it
over `not(rustls-tls)` because it's clearer and it addresses the AGPL license
issue #594. As far as I understand, a Lychee binary compiled without the
`email-check` feature could be distributed with file-based copyleft for the
MPL-licensed dependencies only. But that's out of scope here.

The benchmark shows a performance regression varying between 2% and 4.4% when
using Rustls instead of OpenSSL on my machine.

PS: The `ring` crate needs to be patched on OpenBSD 7.3 and later until the new
xonly patches have been upstreamed, see the `rust-ring` port.

* Use platform native certificates with Rustls

By default, reqwest uses the webpki-roots crate with Rustls, effectively
bundling Mozilla's root certificates.

This commit uses the rustls-native-certs crate instead to use locally
installed root certificates, to minimize the difference between the
native-tls and rustls-tls features.

* Document feature flags
2023-06-16 02:21:57 +02:00
Dariusz Porowski
7a35a655d2
Alpine Docker Image Support (#1074) 2023-05-22 12:36:22 +02:00
Matthias
75e80190fb bump version 2023-05-15 00:25:32 +02:00
Matthias
a7ddcac502 prepare for release 2023-04-17 23:24:11 +02:00
Thomas
994b2852cd
Wayback integration (#1003)
Adds support for suggesting archived URLs for broken links.
Uses Wayback Machine as the archive provider.
2023-03-28 00:45:06 +02:00
Matthias
49d1d3accb update help message 2023-03-03 12:13:09 +01:00
Daniel M. Capella
bd30e0d739
Update name of Arch package (#959) 2023-02-23 10:31:44 +01:00
Matthias Endler
b653a0a1ec
Fix cached 200 status code handling (#958)
* Fix cached 200 status code handling

Assert that code 200 never needs to be explicitly accepted for cached response
to match the behavior of uncached checks

* Bump version to v0.11.1
2023-02-23 00:25:53 +01:00
Matthias Endler
123742a8b4
Bump to v0.11.0 (#957) 2023-02-22 21:35:38 +01:00
dependabot[bot]
6743edd887
Bump clap from 4.0.32 to 4.1.1 (#917)
* Bump clap from 4.0.32 to 4.1.1

Bumps [clap](https://github.com/clap-rs/clap) from 4.0.32 to 4.1.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.32...v4.1.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update docs

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias <matthias-endler@gmx.net>
2023-01-17 15:08:12 +01:00
Matthias Endler
81fc8608f6
Add scoop (Windows) installation instructions 2022-12-13 00:09:38 +01:00
Matthias
982d978e47
Add different verbosity levels (#824)
More granular verbosity levels have been asked
for repeatedly.
To enable that we're moving to [env_logger] and [clap-verbosity-flag]
to provide more flexible verbosity settings.

Also tackles #661, #709
Lays the groundwork for tackling #268

https://github.com/rust-cli/env_logger
https://github.com/clap-rs/clap-verbosity-flag
2022-11-28 23:25:33 +01:00
dependabot[bot]
2ce1a9ae06
Bump clap from 3.2.23 to 4.0.22 (#813)
* Bump clap from 3.2.23 to 4.0.22

Bumps [clap](https://github.com/clap-rs/clap) from 3.2.23 to 4.0.22.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.23...v4.0.22)

* The `headers` option got renamed to `header` to align with the rest
   of the options, which are singular.
* The short option for `header` (`-h`) was removed to avoid a conflict with
  help (`lychee -h`).
* Update and simplify readme check

Co-authored-by: Matthias <matthias-endler@gmx.net>
2022-11-13 21:10:32 +01:00
Matthias
fbf0e9faea
Fix typo 2022-11-13 13:50:11 +01:00
Petr Ruzicka
6bb5525abb
Add note about lychee.toml and exclude_path to README.md (#823)
Fix #822
2022-11-11 18:27:26 +01:00
Matthias
0e929f9b4c Bump version 2022-11-08 23:48:21 +01:00
Matthias
5ebb3fff6e
Bump Version (#811) 2022-11-06 00:21:00 +01:00
Matthias
9315aa0a8a
Update badge name 2022-11-03 11:12:24 +01:00
Jakub Wilk
ffb57fa202
Fix syntax highlighting in README (#792)
The help message was highlighted as if it was a gitignore file.
Let's disable this spurious syntax highlighting.
2022-10-24 15:59:04 +02:00
Andy Grunwald
a67b513238
Extend description of "--exclude" to also exclude email addresses, not only URLs (#801) 2022-10-23 12:17:20 +02:00
Matthias
3c22d41cc3
Mention CONTRIBUTING.md in README 2022-08-14 02:10:11 +02:00
Matthias
34d3955140
Add link to new homepage 2022-08-14 00:51:42 +02:00
Matthias
cbd936960a
Move from structopt to clap (#732)
Structopt was subsumed by clap. See
https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating
2022-08-12 22:53:13 +02:00
Sebastian Spier
bccb082759
Listing InnerSourceCommons/InnerSourcePatterns as user (#730)
The repo https://github.com/InnerSourceCommons/InnerSourcePatterns is using lychee as a link checker since a couple of days.
(we found the recommendation for it in the liche repo)

I wasn't clear if we should add the new user/repo at top or bottom of the list.
Went for the top :)

Thank you for this great tool!
2022-08-12 13:54:05 +02:00
Matthias
601adcefd3
Add new SVG-based screencast (#693)
This is taken from https://github.com/sharkdp/fd, so all credits
go to the original authors.

The demo was a bit dated. We've since added more features and
changed the output. On top of that, the gif was a bit blurry.

The new version is in SVG and the commands can be scripted, so
we can change them with a PR and render them through CI.

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2022-08-10 17:35:50 +02:00
Matthias
b76285c193
Bump version (#703) 2022-07-27 10:48:36 +02:00
Matthias
aa931b8c00
Mention other file formats 2022-07-21 00:04:53 +02:00
Matthias
c89911d161
Update documentation around excluding links 2022-05-31 17:48:56 +02:00
Matthias
b40aacd459
Prepare for release v0.10.0 (#629) 2022-05-30 23:02:18 +02:00