Skip to content

Commit

Permalink
Mention supported schemes (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
mre authored Sep 14, 2023
1 parent 1cdc5bf commit 0711112
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Available as a command-line utility, a library and a [GitHub Action](https://git

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [Installation](#installation)
Expand Down Expand Up @@ -120,7 +121,7 @@ This comparison is made on a best-effort basis. Please create a PR to fix
outdated information.

| | lychee | [awesome_bot] | [muffet] | [broken-link-checker] | [linkinator] | [linkchecker] | [markdown-link-check] | [fink] |
|----------------------|---------|---------------|----------|-----------------------|--------------|----------------------|-----------------------|--------|
| -------------------- | ------- | ------------- | -------- | --------------------- | ------------ | -------------------- | --------------------- | ------ |
| Language | Rust | Ruby | Go | JS | TypeScript | Python | JS | PHP |
| Async/Parallel | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] | ![yes] |
| JSON output | ![yes] | ![no] | ![yes] | ![yes] | ![yes] | ![maybe]<sup>1</sup> | ![yes] | ![yes] |
Expand Down Expand Up @@ -341,7 +342,7 @@ Options:
Proceed for server connections considered insecure (invalid TLS)
-s, --scheme <SCHEME>
Only test links with the given schemes (e.g. http and https)
Only test links with the given schemes (e.g. https). Omit to check links with any other scheme. At the moment, we support http, https, file, and mailto
--offline
Only check local files and block network requests
Expand Down Expand Up @@ -575,6 +576,7 @@ If you find a way to make lychee faster, please do reach out.
We collect a list of common workarounds for various websites in our [troubleshooting guide](./docs/TROUBLESHOOTING.md).

## Users

- https://github.com/InnerSourceCommons/InnerSourcePatterns
- https://github.com/opensearch-project/OpenSearch
- https://github.com/ramitsurana/awesome-kubernetes
Expand Down Expand Up @@ -610,6 +612,5 @@ lychee is licensed under either of

at your option.


<br><hr>
[🔼 Back to top](#back-to-top)
11 changes: 6 additions & 5 deletions fixtures/configs/smoketest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ accept = [200, 429]
insecure = false

# Only test links with the given schemes (e.g. https).
# Omit to check links with any scheme.
scheme = [ "https" ]
# Omit to check links with any other scheme.
# At the moment, we support http, https, file, and mailto.
scheme = ["https"]

# When links are available using HTTPS, treat HTTP links as errors.
require_https = false
Expand All @@ -66,7 +67,7 @@ headers = []

# Remap URI matching pattern to different URI.
# This also supports (named) capturing groups.
remap = [
remap = [
"https://example.com http://example.invalid",
"https://example.com/(.*) http://example.org/$1",
"https://github.com/(?P<org>.*)/(?P<repo>.*) https://gitlab.com/$org/$repo",
Expand All @@ -93,13 +94,13 @@ include_verbatim = false
glob_ignore_case = false

# Exclude URLs and mail addresses from checking (supports regex).
exclude = [ '.*\.github.com\.*' ]
exclude = ['.*\.github.com\.*']

# Exclude these filesystem paths from getting checked.
exclude_path = ["file/path/to/Ignore", "./other/file/path/to/Ignore"]

# URLs to check (supports regex). Has preference over all excludes.
include = [ 'gist\.github\.com.*' ]
include = ['gist\.github\.com.*']

# Exclude all private IPs from checking.
# Equivalent to setting `exclude_private`, `exclude_link_local`, and
Expand Down
4 changes: 3 additions & 1 deletion lychee-bin/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ pub(crate) struct Config {
#[serde(default)]
pub(crate) insecure: bool,

/// Only test links with the given schemes (e.g. http and https)
/// Only test links with the given schemes (e.g. https).
/// Omit to check links with any other scheme.
/// At the moment, we support http, https, file, and mailto.
#[arg(short, long)]
#[serde(default)]
pub(crate) scheme: Vec<String>,
Expand Down
14 changes: 6 additions & 8 deletions lychee.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ accept = [200, 429]
insecure = false

# Only test links with the given schemes (e.g. https).
# Omit to check links with any scheme.
scheme = [ "https" ]
# Omit to check links with any other scheme.
# At the moment, we support http, https, file, and mailto.
scheme = ["https"]

# When links are available using HTTPS, treat HTTP links as errors.
require_https = false
Expand All @@ -65,7 +66,7 @@ method = "get"
headers = []

# Remap URI matching pattern to different URI.
remap = [ "https://example.com http://example.invalid" ]
remap = ["https://example.com http://example.invalid"]

# Base URL or website root directory to check relative URLs.
base = "https://example.com"
Expand All @@ -88,16 +89,13 @@ include_verbatim = false
glob_ignore_case = false

# Exclude URLs and mail addresses from checking (supports regex).
exclude = [
'^https://www\.linkedin\.com',
'^https://web\.archive\.org/web/',
]
exclude = ['^https://www\.linkedin\.com', '^https://web\.archive\.org/web/']

# Exclude these filesystem paths from getting checked.
exclude_path = ["file/path/to/Ignore", "./other/file/path/to/Ignore"]

# URLs to check (supports regex). Has preference over all excludes.
include = [ 'gist\.github\.com.*' ]
include = ['gist\.github\.com.*']

# Exclude all private IPs from checking.
# Equivalent to setting `exclude_private`, `exclude_link_local`, and
Expand Down

0 comments on commit 0711112

Please sign in to comment.