Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bring back error output for links #1521

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Link Checker
uses: lycheeverse/lychee-action@master
with:
args: --verbose --no-progress --exclude example.com -- README.md
args: --verbose --exclude-path benches --exclude-path fixtures .

- name: Create Issue From File
if: github.repository_owner == 'lycheeverse' && env.lychee_exit_code != 0
Expand Down
32 changes: 12 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,22 @@ Options:

[default: 1d]

--cache-exclude-status <CACHE_EXCLUDE_STATUS>
A list of status codes that will be ignored from the cache

The following accept range syntax is supported: [start]..[=]end|code. Some valid
examples are:

- 429
- 500..=599
- 500..

Use "lychee --cache-exclude-status '429, 500..502' <inputs>..." to provide a comma- separated
list of excluded status codes. This example will not cache results with a status code of 429, 500,
501 and 502.

[default: ]

--dump
Don't perform any link checking. Instead, dump all the links extracted from inputs that would be checked

Expand Down Expand Up @@ -674,7 +690,6 @@ We collect a list of common workarounds for various websites in our [troubleshoo
- https://github.com/papers-we-love/papers-we-love
- https://github.com/pingcap/docs
- https://github.com/microsoft/WhatTheHack
- https://github.com/Azure/ResourceModules
- https://github.com/nix-community/awesome-nix
- https://github.com/balena-io/docs
- https://github.com/launchdarkly/LaunchDarkly-Docs
Expand All @@ -686,7 +701,26 @@ We collect a list of common workarounds for various websites in our [troubleshoo
- https://github.com/sindresorhus/execa
- https://github.com/tldr-pages/tldr-maintenance
- https://github.com/git-ecosystem/git-credential-manager
- https://git-scm.com/
- https://github.com/git/git-scm.com
- https://github.com/OWASP/threat-dragon
- https://github.com/oxc-project/oxc
- https://github.com/hugsy/gef
- https://github.com/mermaid-js/mermaid
- https://github.com/hashicorp/consul
- https://github.com/Unleash/unleash
- https://github.com/fastify/fastify
- https://github.com/nuxt/nuxt
- https://github.com/containerd/containerd
- https://github.com/rolldown/rolldown
- https://github.com/rerun-io/rerun
- https://github.com/0xAX/asm
- https://github.com/mainmatter/100-exercises-to-learn-rust
- https://github.com/GoogleCloudPlatform/generative-ai
- https://github.com/DioxusLabs/dioxus
- https://github.com/ministryofjustice/modernisation-platform
- https://github.com/orhun/binsider
- https://github.com/NVIDIA/aistore
- https://github.com/gradle/gradle
- https://github.com/lycheeverse/lychee (yes, the lychee docs are checked with lychee 🤯)

If you are using lychee for your project, **please add it here**.
Expand Down
1 change: 1 addition & 0 deletions fixtures/TEST_STYLESHEET_LINK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link href="/@global/global.css" rel="stylesheet">
1 change: 1 addition & 0 deletions fixtures/configs/format.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
format = "json"
8 changes: 8 additions & 0 deletions fixtures/resolve_paths/about/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>About</title>
</head>
<body>
<h1 id="fragment">About</h1>
</body>
</html>
Empty file.
21 changes: 21 additions & 0 deletions fixtures/resolve_paths/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>Index</title>
</head>
<body>
<h1>Index Title</h1>
<p>
<ul>
<li>
<a href="/">home</a>
</li>
<li>
<a href="/about">About</a>
</li>
<li>
<a href="/another page">About</a>
</li>
</ul>
</p>
</body>
</html>
9 changes: 5 additions & 4 deletions lychee-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lychee-lib = { path = "../lychee-lib", version = "0.16.1", default-features = fa

anyhow = "1.0.89"
assert-json-diff = "2.0.2"
clap = { version = "4.5.19", features = ["env", "derive"] }
clap = { version = "4.5.20", features = ["env", "derive"] }
console = "0.15.8"
const_format = "0.2.33"
csv = "1.3.0"
Expand All @@ -45,7 +45,7 @@ reqwest_cookie_store = "0.8.0"
# This is necessary for the homebrew build
# https://github.com/Homebrew/homebrew-core/pull/70216
ring = "0.17.8"
secrecy = { version = "0.10.2", features = ["serde"] }
secrecy = { version = "0.10.3", features = ["serde"] }
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
strum = { version = "0.26.3", features = ["derive"] }
Expand All @@ -54,6 +54,7 @@ tabled = "0.16.0"
tokio = { version = "1.40.0", features = ["full"] }
tokio-stream = "0.1.16"
toml = "0.8.19"
url = "2.5.2"

[dev-dependencies]
assert_cmd = "2.0.16"
Expand Down Expand Up @@ -97,6 +98,6 @@ required-features = ["check_example_domains"]

# Metadata for cargo-binstall to get the right artifacts
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }{ archive-suffix }"
pkg-url = "{ repo }/releases/download/{ name }-v{ version }/{ name }-{ target }{ archive-suffix }"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"
pkg-fmt = "tgz"
1 change: 1 addition & 0 deletions lychee-bin/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub(crate) fn create(cfg: &Config, cookie_jar: Option<&Arc<CookieStoreMutex>>) -

ClientBuilder::builder()
.remaps(remaps)
.base(cfg.base.clone())
.includes(includes)
.excludes(excludes)
.exclude_all_private(cfg.exclude_all_private)
Expand Down
Loading