Skip to content
Merged
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
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Needed SHELL since I'm using zsh
SHELL := /bin/bash
SHELL := /usr/bin/env bash
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

IMAGE_NAME := "lycheeverse/lychee"

.PHONY: help
Expand Down Expand Up @@ -36,7 +36,7 @@ run: ## Run project locally

.PHONY: docs
docs: ## Generate and show documentation
cargo doc --open
cargo doc --open

.PHONY: lint
lint: ## Run linter
Expand All @@ -55,6 +55,6 @@ doc: ## Open documentation

.PHONY: screencast
screencast: ## Create a screencast for the docs
termsvg rec --command=assets/screencast.sh recording.asc
termsvg rec --command=assets/screencast.sh recording.asc
termsvg export --minify recording.asc --output=assets/screencast.svg
rm recording.asc
rm recording.asc
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,6 @@ Options:
--exclude-loopback
Exclude loopback IP address range and localhost from checking

--exclude-mail
Exclude all mail addresses from checking (deprecated; excluded by default)

--include-mail
Also check email addresses

Expand Down
6 changes: 3 additions & 3 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ See more info about the Accept header

## Unreachable Mail Address

You can check email addresses by providing the `--include-mail` flag.
We use https://github.com/reacherhq/check-if-email-exists for email checking.
You can test your mail address with curl:

Expand All @@ -70,6 +71,5 @@ You can test your mail address with curl:

Some settings on your mail server (such as `SPF` Policy, `DNSBL`) may prevent
your email from being verified. If you have an error with checking a working
email, you can disable this check using the [commandline
parameter](https://github.com/lycheeverse/lychee#commandline-parameters)
`--exclude-mail`.
email, you can exclude specific addresses with the `--exclude` flag or skip
all email addresses by removing the `--include-mail` flag.
21 changes: 1 addition & 20 deletions lychee-bin/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,6 @@ pub(crate) fn create(cfg: &Config, cookie_jar: Option<&Arc<CookieStoreMutex>>) -
.map(|value| StatusCode::from_u16(*value))
.collect::<Result<HashSet<_>, _>>()?;

// `exclude_mail` will be removed in 1.0. Until then, we need to support it.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, technically the comment says "removed in 1.0", but I think it's fine to do so earlier. We probably even talked about it at some point. 😆

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

True and yeah we did talk about it 😄

// Therefore, we need to check if both `include_mail` and `exclude_mail` are set to `true`
// and return an error if that's the case.
if cfg.include_mail && cfg.exclude_mail {
return Err(anyhow::anyhow!(
"Cannot set both `include-mail` and `exclude-mail` to true"
));
}

// By default, clap sets `exclude_mail` to `false`.
// Therefore, we need to check if `exclude_mail` is explicitly set to
// `true`. If so, we need to set `include_mail` to `false`.
// Otherwise, we use the value of `include_mail`.
let include_mail = if cfg.exclude_mail {
false
} else {
cfg.include_mail
};

ClientBuilder::builder()
.remaps(remaps)
.base(cfg.base_url.clone())
Expand All @@ -62,7 +43,7 @@ pub(crate) fn create(cfg: &Config, cookie_jar: Option<&Arc<CookieStoreMutex>>) -
.exclude_private_ips(cfg.exclude_private)
.exclude_link_local_ips(cfg.exclude_link_local)
.exclude_loopback_ips(cfg.exclude_loopback)
.include_mail(include_mail)
.include_mail(cfg.include_mail)
.max_redirects(cfg.max_redirects)
.user_agent(cfg.user_agent.clone())
.allow_insecure(cfg.insecure)
Expand Down
5 changes: 0 additions & 5 deletions lychee-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ fn load_config() -> Result<LycheeOptions> {
warn!("WARNING: `--exclude-file` is deprecated and will soon be removed; use the `{LYCHEE_IGNORE_FILE}` file to ignore URL patterns instead. To exclude paths of files and directories, use `--exclude-path`.");
}

// TODO: Remove this warning and the parameter with 1.0
if opts.config.exclude_mail {
warn!("WARNING: `--exclude-mail` is deprecated and will soon be removed; E-Mail is no longer checked by default. Use `--include-mail` to enable E-Mail checking.");
}

// TODO: Remove this warning and the parameter with 1.0
if opts.config.base.is_some() {
warn!(
Expand Down
7 changes: 0 additions & 7 deletions lychee-bin/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,6 @@ and 501."
#[serde(default)]
pub(crate) exclude_loopback: bool,

/// Exclude all mail addresses from checking
/// (deprecated; excluded by default)
#[arg(long)]
#[serde(default)]
pub(crate) exclude_mail: bool,

/// Also check email addresses
#[arg(long)]
#[serde(default)]
Expand Down Expand Up @@ -587,7 +581,6 @@ impl Config {
exclude_private: false;
exclude_link_local: false;
exclude_loopback: false;
exclude_mail: false;
format: StatsFormat::default();
remap: Vec::<String>::new();
fallback_extensions: Vec::<String>::new();
Expand Down