lycheeverse / lychee

⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
https://lychee.cli.rs
Apache License 2.0
2k stars 119 forks source link

Disable email checking by default? #575

Open mre opened 2 years ago

mre commented 2 years ago

Most link checkers don't support checking email addresses. On top of that, it can be hard to decide what a proper email address looks like. E.g. php@7.2 would be a false-positive, which could be a valid email address.

We should consider disabling email checks by default, deprecating the --exclude-mail flag and adding an --include-mail flag instead. Alternatively we disable it in the Github action.

lebensterben commented 2 years ago

https://en.m.wikipedia.org/wiki/Jamie_Zawinski#Zawinski's_Law

Every program attempts to expand until it can read mail.

this feature sounds scary when I first saw it.

polarathene commented 2 years ago

I was surprised to see email addresses being checked by default (but I have noticed the opt-out option for this type documented). I would assume it's rare that users want those checked (especially when not mailto: values), and opt-in would make more sense?

I plan to use lychee with docs for a mail-server product, and one of the inputs had quote wrapped example addresses. lychee was capturing these as 'user@example.com (including the left quote, but ignoring the right-side one).

mre commented 2 years ago

Yeah, excluding it by default is probably the way to go. At least I lean towards that at the moment.