Commit graph

24 commits

Author SHA1 Message Date
Matthias
5a2e10799f linting 2021-09-06 15:19:24 +02:00
Daniel Doubrovkine (dB.)
b3f90f925e
Use cargo-publish-all for release. (#312) 2021-09-06 01:07:56 +02:00
Daniel Doubrovkine (dB.)
f866abef61
Fix publish workflow (#309) 2021-09-04 01:49:29 +02:00
Matthias
96c80c3647 Add changes made by @dblock in #304 2021-09-03 19:18:39 +02:00
Matthias
5a26917ba9
Add trigger for manually pushing Docker image 2021-08-20 11:15:32 +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
a6ebba6b69
Clean up exclude in link checking 2021-02-21 19:13:15 +01:00
Matthias
551c988708
Update links.yml 2021-02-21 17:27:32 +01:00
Matthias Endler
e00cdbf1ae example.com -> example.org 2021-02-21 16:33:33 +01:00
Matthias
a633afc6b9
Use lychee master for link checking 2021-02-15 11:21:29 +01:00
Matthias
5401e3a3d9
Update lychee action to latest version 2021-02-12 18:19:25 +01:00
Paweł Romanowski
fa9c5ea2cf
Run clippy for all targets, including tests (#93)
The test code should also be linted.
2021-01-03 16:41:19 +01:00
Matthias
622dc32585
exclude https://example.com/README.md from link checking 2020-12-15 00:49:27 +01:00
Matthias
534f3c2744
Use lychee for checking links in the lychee repo (#79)
How meta.
2020-12-15 00:45:28 +01:00
Matthias
c7d7c6c952
Build binaries for Linux, Windows, and macOS for every release (#74)
* Build binaries for Linux, Windows, and macOS for every release

* Add vendored-openssl feature flag

This allows us to trigger a build which
includes a static dependency to openssl by compiling it from source in a
build.rs script. It is useful for Linux, which has wildly different config
parameters for different architectures.

* Add openssl-sys as direct dependency

This allows us to pass the vendored-openssl
feature flag to this dependency and compile openssl from source

* Update Cargo.lock

* Cleanup
2020-12-11 22:13:26 +01:00
Matthias
3401999ccc
Publish releases on crates.io (#65) 2020-12-04 13:09:50 +01:00
Matthias
936c5440b1
Add official Docker image #40 2020-12-02 23:43:05 +01:00
Paweł Romanowski
96a92deffd Use more descriptive name for cargo test action 2020-10-16 14:47:54 +02:00
Paweł Romanowski
7bcf2de400 Actually run tests in GitHub actions 2020-10-16 14:38:05 +02:00
Paweł Romanowski
b2ada4746c Introduce cargo fmt and clippy checks, fix all clippy warnings 2020-10-16 14:35:38 +02:00
Xiaochuan Yu
65e8a40973
remove names 2020-10-14 19:19:14 -04:00
Xiaochuan Yu
292064ce90
Update rust.yml 2020-10-14 19:13:40 -04:00
Xiaochuan Yu
096b8756cb use action-rs Actions instead 2020-10-12 23:51:04 -04:00
Matthias
9a71b77bb2
Create rust.yml 2020-08-08 00:09:48 +02:00