Matthias Endler
970d978657
Fix Dockerfile after refactor
2021-04-15 02:36:01 +02:00
Lucius Hu
228e5df6a3
Major refactor of codebase ( #208 )
...
- The binary component and library component are separated as two
packages in the same workspace.
- `lychee` is the binary component, in `lychee-bin/*`.
- `lychee-lib` is the library component, in `lychee-lib/*`.
- Users can now install only the `lychee-lib`, instead of both
components, that would require fewer dependencies and faster
compilation.
- Dependencies for each component are adjusted and updated. E.g.,
no CLI dependencies for `lychee-lib`.
- CLI tests are only moved to `lychee`, as it has nothing to do
with the library component.
- `Status::Error` is refactored to contain dedicated error enum,
`ErrorKind`.
- The motivation is to delay the formatting of errors to strings.
Note that `e.to_string()` is not necessarily cheap (though
trivial in many cases). The formatting is no delayed until the
error is needed to be displayed to users. So in some cases, if
the error is never used, it means that it won't be formatted at
all.
- Replaced `regex` based matching with one of the following:
- Simple string equality test in the case of 'false positivie'.
- URL parsing based test, in the case of extracting repository and
user name for GitHub links.
- Either cases would be much more efficient than `regex` based
matching. First, there's no need to construct a state machine for
regex. Second, URL is already verified and parsed on its creation,
and extracting its components is fairly cheap. Also, this removes
the dependency on `lazy-static` in `lychee-lib`.
- `types` module now has a sub-directory, and its components are now
separated into their own modules (in that sub-directory).
- `lychee-lib::test_utils` module is only compiled for tests.
- `wiremock` is moved to `dev-dependency` as it's only needed for
`test` modules.
- Dependencies are listed in alphabetical order.
- Imports are organized in the following fashion:
- Imports from `std`
- Imports from 3rd-party crates, and `lychee-lib`.
- Imports from `crate::*` or `super::*`.
- No glob import.
- I followed suggestion from `cargo clippy`, with `clippy::all` and
`clippy:pedantic`.
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-15 01:24:11 +02:00
dependabot-preview[bot]
a3f62fc558
Bump tokio from 1.4.0 to 1.5.0
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.4.0...tokio-1.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 07:15:51 +00:00
dependabot-preview[bot]
6278964536
Bump reqwest from 0.11.2 to 0.11.3
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.2...v0.11.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 07:07:45 +00:00
Matthias
2d2009ffe0
Assume HTML in case there is no extension (e.g. for URLs) ( #217 )
...
This is not entirely correct, but covers more use-cases
than previously. Eventually we have to revisit this
and implement a proper solution
2021-04-12 16:46:37 +02:00
Matthias
f66aaecf0f
Assume HTML in case there is no extension (e.g. for URLs) ( #197 )
2021-04-12 14:40:39 +02:00
dependabot-preview[bot]
c62a44aa30
Bump futures from 0.3.13 to 0.3.14
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.13...0.3.14 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-12 07:23:45 +00:00
dependabot-preview[bot]
45b40a3e06
Bump linkify from 0.5.0 to 0.6.0 ( #212 )
...
Bumps [linkify](https://github.com/robinst/linkify ) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/robinst/linkify/releases )
- [Changelog](https://github.com/robinst/linkify/blob/main/CHANGELOG.md )
- [Commits](https://github.com/robinst/linkify/compare/0.5.0...0.6.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-09 10:56:09 +02:00
dependabot-preview[bot]
840e1c753d
Bump http from 0.2.3 to 0.2.4
...
Bumps [http](https://github.com/hyperium/http ) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/hyperium/http/releases )
- [Changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hyperium/http/compare/v0.2.3...v0.2.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 07:44:45 +00:00
dependabot-preview[bot]
5aeea1d3f7
Bump derive_builder from 0.9.0 to 0.10.0 ( #205 )
...
Bumps [derive_builder](https://github.com/colin-kiegel/rust-derive-builder ) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/colin-kiegel/rust-derive-builder/releases )
- [Commits](https://github.com/colin-kiegel/rust-derive-builder/compare/v0.9.0...v0.10.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-05 18:38:41 +02:00
Yiyao Wei
43860b329d
Improve example configuration file ( #206 )
...
* no need of double quote here
* update example configuration file
2021-04-04 16:59:22 +02:00
Matthias
33e952b428
Only use oembed on YT video links ( fixes #198 ) ( #204 )
2021-04-01 16:12:26 +02:00
Paweł Romanowski
e6f11c381b
Bump check-if-email-exists to latest ( #203 )
2021-04-01 10:43:50 +02:00
Matthias
97aaadf97c
Only allow true Github links to be checked through the Github API ( #201 )
2021-03-31 01:38:21 +02:00
Matthias
036145eb98
Fix comments about exclusion
2021-03-30 13:58:49 +02:00
Matthias
76fa56de1b
Merge pull request #200 from lycheeverse/exclude-mail-fix
...
Fix exclude mail, add tests
2021-03-29 23:36:29 +02:00
Matthias Endler
2b044a6f5b
Fix exclude mail, add tests
2021-03-29 23:28:17 +02:00
Matthias
bcb3933b22
Add support for website quirks
2021-03-29 00:42:25 +02:00
Matthias Endler
5af7164409
typo
2021-03-29 00:41:34 +02:00
Matthias Endler
e28132b8a9
Add comments, reactivate integration test
2021-03-29 00:29:29 +02:00
Matthias Endler
0c0b91a727
Fix YouTube quirk, add test
2021-03-29 00:14:08 +02:00
Matthias Endler
1e49df2e03
Change Quirks::init() to Quirks::default()
2021-03-29 00:05:05 +02:00
Matthias Endler
ddac9a138e
Merge branch 'master' of github.com:lycheeverse/lychee into quirks
2021-03-28 23:59:41 +02:00
Matthias
8fc7ddae11
Define set of well-known false-positives ( fixes #169 )
...
Some URIs will be excluded by default.
This can be overwritten by the user by
explicitly using `--include`.
2021-03-28 23:25:47 +02:00
Lucius Hu
9f07d1f594
fixed issues in Cargo.toml that blocks publishing ( #196 )
...
The solution is simple, add `[patch]` section.
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-03-28 22:32:59 +02:00
Matthias
72c01df6fb
Merge "failed" status into "error" status ( #191 )
...
I think that the separation between Status::Failed and Status::Error is a
bit misleading. It was easier to implement, but from a user's perspective
they are more or less the same: something unexpected happened.
So I merged both into one: Status::Error. Still not 100% happy with the
semantics, but it's an improvement I'd say.
2021-03-28 17:20:03 +02:00
Matthias
00bce9d84e
Update banner.svg
2021-03-18 11:32:51 +01:00
Timo Freiberg
c3513e21ad
Fix usage test after README.md code fence change ( #186 )
2021-03-17 23:54:29 +01:00
Matthias
2d724c2d38
Don't format help output as shell script in README.md
2021-03-17 02:07:05 +01:00
Matthias
52853a961b
Use new svg logo
2021-03-15 23:27:42 +01:00
Matthias
9b2b51159c
Update banner.svg
2021-03-15 23:27:11 +01:00
Matthias
f29477cb28
Update banner
2021-03-15 23:22:02 +01:00
Matthias Endler
39497e05cc
Refresh logo
2021-03-15 23:17:26 +01:00
dependabot-preview[bot]
df53b80e67
Bump console from 0.14.0 to 0.14.1 ( #179 )
...
Bumps [console](https://github.com/mitsuhiko/console ) from 0.14.0 to 0.14.1.
- [Release notes](https://github.com/mitsuhiko/console/releases )
- [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/console/compare/0.14.0...0.14.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:03:16 +01:00
dependabot-preview[bot]
068270dc5a
Bump check-if-email-exists from 1b0ecfc to 387ce62 ( #180 )
...
Bumps [check-if-email-exists](https://github.com/reacherhq/check-if-email-exists ) from `1b0ecfc` to `387ce62`.
- [Release notes](https://github.com/reacherhq/check-if-email-exists/releases )
- [Commits](1b0ecfcbe1...387ce62aeb )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:02:51 +01:00
dependabot-preview[bot]
ba7d0cca33
Bump regex from 1.4.4 to 1.4.5 ( #182 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.4.4...1.4.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:02:33 +01:00
dependabot-preview[bot]
462879d7b0
Bump openssl-sys from 0.9.60 to 0.9.61 ( #181 )
...
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl ) from 0.9.60 to 0.9.61.
- [Release notes](https://github.com/sfackler/rust-openssl/releases )
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:02:20 +01:00
Paweł Romanowski
a45e781d47
Fix URLs with '@' parsing as emails ( #177 )
...
* Fix URLs with '@' parsing as emails
Only consider a link an email if it fails to parse as URL.
Also use a proper email validation instead of a simple '@' check.
This uses the fast_chemail crate which parses email links according
to the HTML specification (which is much more practical than checking
for RFC 5322 formatted emails). It's also worth noting that
fast_chemail is used internally (albeit indirectly) by the
check_if_email_exists crate. This means that email addresses
not considered valid by fast_chemail wouldn't pass link checks
anyway.
* Fix comment in test
2021-03-14 20:10:36 +01:00
Paweł Romanowski
b4de8e0983
Avoid extra newlines in output ( #178 )
...
Ensure that no extra newlines are printed in the output.
2021-03-14 19:59:52 +01:00
dependabot-preview[bot]
5a775b5801
Bump regex from 1.4.3 to 1.4.4 ( #176 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.4.3...1.4.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-12 13:03:12 +01:00
trevyn
1d4171328e
fix typo "continuos" -> "continuous" ( #175 )
2021-03-11 11:17:06 +01:00
dependabot-preview[bot]
694e75fa22
Bump reqwest from 0.11.1 to 0.11.2 ( #173 )
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.1...v0.11.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-10 10:19:49 +01:00
dependabot-preview[bot]
64ec9ec44a
Bump tokio from 1.2.0 to 1.3.0 ( #174 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.2.0...tokio-1.3.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-10 10:19:34 +01:00
dependabot-preview[bot]
afa8782acf
Bump check-if-email-exists from c61a1ea to 1b0ecfc ( #172 )
...
Bumps [check-if-email-exists](https://github.com/reacherhq/check-if-email-exists ) from `c61a1ea` to `1b0ecfc`.
- [Release notes](https://github.com/reacherhq/check-if-email-exists/releases )
- [Commits](c61a1ea427...1b0ecfcbe1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-08 10:41:14 +01:00
Matthias
46263298fe
Update README.md
2021-03-04 16:01:09 +01:00
Matthias
b7e641636c
Fix author mail in Cargo.toml
2021-03-04 14:59:48 +01:00
dependabot-preview[bot]
5506f9da17
Bump headers from 0.3.3 to 0.3.4 ( #170 )
...
Bumps [headers](https://github.com/hyperium/headers ) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/hyperium/headers/releases )
- [Commits](https://github.com/hyperium/headers/compare/headers-v0.3.3...headers-v0.3.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-04 12:30:59 +01:00
dependabot-preview[bot]
1d596c8244
Bump check-if-email-exists from aac0586 to c61a1ea ( #167 )
...
Bumps [check-if-email-exists](https://github.com/reacherhq/check-if-email-exists ) from `aac0586` to `c61a1ea`.
- [Release notes](https://github.com/reacherhq/check-if-email-exists/releases )
- [Commits](aac0586fb0...c61a1ea427 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 10:05:34 +01:00
dependabot-preview[bot]
3b05d79190
Bump hubcaps from 324d02f to a9e6616 ( #166 )
...
Bumps [hubcaps](https://github.com/softprops/hubcaps ) from `324d02f` to `a9e6616`.
- [Release notes](https://github.com/softprops/hubcaps/releases )
- [Commits](324d02fbb3...a9e6616ecc )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 10:05:25 +01:00
dependabot-preview[bot]
af188d5eb7
Bump serde_json from 1.0.63 to 1.0.64 ( #168 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.63 to 1.0.64.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.63...v1.0.64 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 10:05:08 +01:00