Commit graph

126 commits

Author SHA1 Message Date
MichaIng
b648b5e914
Imply "localhost" when loopback IPs are excluded (#351)
as "localhost" is usually mapped via "hosts" file to a loopback IP address.

Resolves: https://github.com/lycheeverse/lychee/issues/319

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-06 11:33:23 +02:00
Daniel Doubrovkine (dB.)
df12f31f83
Fix: typo. (#350) 2021-10-02 23:53:14 +02:00
Matthias
712bdfa8cb
Make inputs required (show help if not provided) (#329) 2021-09-16 16:40:38 +02:00
Matthias
21ea0fd033
Add support for tokio-console (#318)
This allows troubleshooting and improving async Rust code.
It is an optional feature that is still
experimental (but can be quite helpful)
2021-09-12 18:10:23 +02:00
Matthias
a1acf7b0d0 Reintegrate master 2021-09-09 01:49:25 +02:00
Matthias
f3fe46a4d6 Merge branch 'master' of github.com:lycheeverse/lychee into local-files 2021-09-08 00:35:41 +02:00
Matthias
0c5dcf3aa3 whoops 2021-09-07 01:05:41 +02:00
Matthias
8353ab1071 Update docs 2021-09-07 00:53:42 +02:00
Paweł Romanowski
8fd34a7367
Add no check (dump links only) flag (#99) 2021-09-06 16:10:48 +02:00
Matthias
9163066a6b Reintegrate master 2021-09-06 15:23:10 +02:00
Matthias
b7c129c431 Fix resolving absolute paths
The previous solution didn't resolve to absolute paths
and rather removed things like `.` and `..`.
2021-09-06 15:20:18 +02:00
Matthias
185645ac81 Update docs 2021-09-06 15:15:05 +02:00
Lucius Hu
80b8a856ac
Add new flag --require-https (#195) 2021-09-04 03:21:54 +02:00
Daniel Doubrovkine (dB.)
f866abef61
Fix publish workflow (#309) 2021-09-04 01:49:29 +02:00
Matthias
a7c1eae115 Bump version to 0.7.1 2021-09-03 19:35:36 +02:00
Matthias
96c80c3647 Add changes made by @dblock in #304 2021-09-03 19:18:39 +02:00
dblock
dcee4a1058 Added support for --exclude-file. 2021-09-03 16:29:57 +02:00
Matthias
ef65067625
Use HTTPS links 2021-09-03 02:03:39 +02:00
Matthias
d36548417e
Make configuration file easier to find 2021-09-01 14:30:34 +02:00
Matthias
a72f2f6ace
Mention epub checking 2021-07-14 16:03:48 +02:00
YAKSH BARIYA
6ef121d3eb
docs: lychee is also available on Termux (#274) 2021-07-05 01:45:32 +02:00
Matthias
434ffacd30
Mention examples folder 2021-04-30 16:33:37 +02:00
Matthias
9f75f28d3d
Add example folder (#241) 2021-04-30 13:33:24 +02:00
Matthias
12c6f0496c
fix line break 2021-04-26 18:28:29 +02:00
Matthias
164e1aea7e
Add support for multiple schemes (#237) 2021-04-26 18:24:54 +02:00
Matthias
7a8bac9ac5
Update README.md 2021-04-24 19:08:57 +02:00
Matthias
952dc6a04c
Reorder sections 2021-04-24 16:23:36 +02:00
Matthias
38d162e238
Fix syntax 2021-04-24 16:04:56 +02:00
Matthias
5621a2946a
Add Arch installation instructions 2021-04-24 16:04:17 +02:00
Matthias
dfc0c16a2e
Add NixOS 2021-04-24 15:53:51 +02:00
Matthias
d3e6abed90
Extend installation instructions and move them up 2021-04-24 15:33:25 +02:00
Matthias
f7f9485be0
Bump version to 0.7 (#229) 2021-04-17 13:41:00 +02:00
Lucius Hu
f64213d58c
More refactor (#225)
- Major changes in `lychee-lib::filter` module:
  - Fields in `Excludes` except the `RegexSet` is now moved to `Filter`.
  - `Filter` contains `Option<Excludes>` and `Option<Includes>`, which are
    wrapper struct of `RegexSet` instead of `Option<RegexSet>`. As a result
    the code now looks cleaner.
  - Factored out some filtering logics to dedicated functions.
    - It's possible to write tests for those functions in addition to tests
      for the `Filter` struct.
  - Added docs to `Filter::is_excluded` and reorgnized the code.
- placed `derive_builder` by `typed_builder`:
  - The internal interface very ugly, as admitted by the author, but we no
    longer have nested `Option`s like before.
  - As a result, the `Client` building is much easier to read.
  - Main benefit of `typed_builder` is, the arguments feeded to builder is
    checked at compile time instead of run-time.
- Fixed a bug in `lychee::tests::usage` and `lychee-lib::stats::test`.
  - Now it will clear environment variable which would otherwise cause an
    issue if `GITHUB_TOKEN` is set.
- Updated dependencies.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-16 20:25:22 +02:00
Matthias
cb512dbf2e
Fix link to ClientBuilder documentation after refactor 2021-04-16 00:53:06 +02:00
Matthias
3ed06da829
Update link to docs 2021-04-15 12:42:37 +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
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
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
trevyn
1d4171328e
fix typo "continuos" -> "continuous" (#175) 2021-03-11 11:17:06 +01:00
Matthias
46263298fe
Update README.md 2021-03-04 16:01:09 +01:00
Matthias
a7168951c1
Enabled progress bar is the default now 2021-02-24 12:19:12 +01:00
Matthias Endler
2272ad1a48 Show progress bar by default (can be disabled with --no-progress) 2021-02-21 17:19:32 +01:00
Matthias Endler
e00cdbf1ae example.com -> example.org 2021-02-21 16:33:33 +01:00
Matthias Endler
fe5cea1de3 Add doc-comment tests 2021-02-18 11:14:00 +01:00
Matthias Endler
16cd67331a Add simple, standalone client
Adds a new function `lychee::check()`, which removes
a lot of boilerplate for simple cases. Adjusted the code,
tests, and documentation.
The downside is that `check` now returns a Result, so
we have to use `?` to get to the response. That's because
we have to account for the case where the given string is
not a valid URI.
2021-02-18 01:32:48 +01:00
Matthias Endler
737f6d3c3b Update help message 2021-02-17 13:54:41 +01:00
Matthias Endler
54e1d3e078 Simplify tests 2021-02-16 00:35:59 +01:00
Matthias
0b148bf5e6
Exclude e-mails from being checked (#137)
This can be useful in CI environments where SMTP is not allowed.
2021-02-10 11:58:04 +01:00
Paweł Romanowski
4d5b98978c
Mention GitHub Action in README.md (#135)
Also mention GitHub token in TROUBLESHOOTING.md
2021-02-08 12:18:50 +01:00