- Updated many dependencies. Deadlinks no longer has any dependencies that fail
cargo audit
. PR#153
- Tests now pass even if the project directory is not named "cargo-deadlinks". PR#149
cargo deadlinks
anddeadlinks
now take a--forbid-http
argument which gives an error if any HTTP links are present. This can be useful for ensuring all documentation is viewable offline. PR#138
CheckError
now has anHttpForbidden
variant. PR#138- The
check_http
field ofCheckContext
is now an enum instead of a boolean PR#138 - ureq has been upgraded to 2.0. This affects the public
CheckError
API, but should otherwise have no user-facing impact. PR#134
- When a website gives 405 Method Not Supported for HEAD requests, fall back to GET. In particular, this no longer marks all links to play.rust-lang.org as broken. PR#136
- URL-encoded fragments, like
#%E2%80%A0
, are now decoded. PR#141
- Give a warning when HTTP links are present but
--check-http
wasn't passed. Previously this was only a DEBUG message. Note that this still requires opting-in to warnings withRUST_LOG=warn
. PR#137
- HTML
<meta>
redirects are now followed.
cargo deadlinks
now takes a--cargo-dir
argument, allowing you to check projects other than the current directory. This is most useful for developing deadlinks itself, but might be helpful for other use cases. PR#119cargo deadlinks
can now check for broken intra-doc links based on heuristics. This feature is still experimental and may have bugs; in particular, only links with backticks (i.e. generated as<code>
) are currently found. You can opt in with--check-intra-doc-links
.deadlinks
has not been changed. PR#126 PR#128
walk_dir
now takes&CheckContext
, notCheckContext
. PR#118CheckError
now has a newIntraDocLink
variant. PR#126parse_html_file
has been removed. Instead, useparse_a_hrefs
orbroken_intra_doc_links
(or both). PR#126Link::File
now stores aPathBuf
, not aString
. PR#127print_shortened
has been removed; usingDisplay
directly is recommended instead. PR#127 In particular, it's no longer possible to shorten files without going throughunavailable_urls
. If you were using this API, please let me know so I can help design an API that fits your use case; the previous one was a maintenance burden.
- Fragment errors are now shortened to use the directory being checked as the base, the same as normal 'file not found errors'. PR#127
- 307 and 308 redirects are now followed. Previously, they would erroneously be reported as an error. PR#129
cargo-deadlinks
now allows passing arguments tocargo doc
, usingcargo deadlinks -- <CARGO_ARGS>
. PR#116deadlinks
now allows specifying multiple directories to check. PR#116
- Warnings from cargo are no longer silenced when documenting. PR#114
cargo deadlinks
no longer ignores all directories on Windows. PR#121
- Argument parsing now uses
pico-args
, notdocopt
. PR#116 - Running
cargo-deadlinks
(notcargo deadlinks
) now gives a better error message. PR#116 - Both binaries now print the name of the binary when passed
--version
. PR#116
--ignore-fragments
CLI parameter to disable URL fagment checking. PR#108
- Empty fragments are no longer treated as broken links. This allows using
deadlinks
with unsafe functions, which have a generated fragment URL from rustdoc. PR#109
RUST_LOG
is now read, and controls logging. PR#100- There is now a separate
deadlinks
binary which doesn't depend on cargo in any way. PR#87 CheckContext
now implementsDefault
. PR#101cargo deadlinks
will now runcargo doc
automatically. You can opt-out of this behavior with--no-build
. PR#102
- Errors are now printed to stdout, not stderr. PR#100
- Logging now follows the standard
env_logger
format. PR#100 --debug
and--verbose
are deprecated in favor ofRUST_LOG
. PR#100- Published Linux binaries are now built against musl libc, not glibc. This allows running deadlinks in an alpine docker container. PR#103
doc = false
is now taken into account when runningcargo deadlinks
. It will still be ignored when running with--no-build
. PR#102CARGO_BUILD_TARGET
and other cargo configuration is now taken into account when runningcargo deadlinks
. It will still be ignored when running with--no-build
. PR#102
- If a URL points to a directory, check if index.html exists in that directory. PR#90
- Treat absolute paths as absolute with respect to the
base_url
, not with respect to the file system. PR#91 - Check link fragments, with special handling for Rustdoc ranged fragments to highlight source code lines PR#94
-
No longer try to document examples that are dynamic libraries
This was a regression introduced by PR#68. That looked at all targets to see which should be documented, but the logic for determining whether a target had docs was incorrect - it counted tests and examples if they were marked as a library. deadlinks will now ignore tests and examples even if they are not binaries.
-
No longer download dependencies from crates.io when calculating targets
Previously,
cargo metadata
would download all dependencies even though they weren't used.
- Switch from
reqwest
toureq
for HTTP-checking, cutting down the number of dependencies by almost a third. PR#95 - Switch from
html5ever
tolol_html
, making the code much easier to modify. PR#86
- Add support for cargo workspaces. Check all crates and targets in the workspaces, excluding tests, benches, and examples. PR#68, PR#73
- Add automatic binary releases. PR#64 You can find the releases at /releases on the GitHub page.
- Take
CARGO_TARGET_DIR
into account when looking for the target directory. PR#66 - Give a better error message if Cargo.toml is not present. PR#67
- Follow target renames. PR#68
- Always output all errors instead of stopping after the first error. PR#74
Previously, deadlinks would stop after the first error, but leave other threads running in parallel. This would lead to non-deterministic and incomplete output if there were broken links in many different files. Deadlinks will now output all errors before exiting.
- Update dependencies. PR#51, PR#76, 22fa61df Thanks to @Marwes!
- Use HEAD instead of GET for HTTP requests. This should decrease the time for HTTP checks slightly. PR#63 Thanks to @zummenix!
- Check all targets, not just targets with the same name as the package. In particular, this now checks both binaries and libraries. PR#68
- Shorten path names when
--debug
is not passed. PR#20
- Add checking of HTTP links via
reqwest
(Thanks to @gsquire!)- Can be used with
cargo deadlinks --check-http
- Can be used with
- Improved error message on missing docs directory. PR#33
???
???
???
???