about summary refs log tree commit diff
path: root/src/tools/linkchecker
AgeCommit message (Collapse)AuthorLines
2022-11-03Remove reference from the intra-doc link checker.Eric Huss-24/+10
2022-11-03Move intra-doc link checks to a separate function.Eric Huss-6/+17
2022-08-29Ignore mailto links in linkcheckerJethro Beekman-0/+1
2022-07-25Fix some broken link fragments.Eric Huss-5/+0
2022-03-09Also take in account mdbook redirect in linkcheckerLoïc BRANSTETT-7/+13
2022-02-11linkchecker: fix panic on directory symlinksSimon Chopin-2/+3
In Debian and Ubuntu, there are some patches that change the rustc/fonts directory to a symlink to the system fonts. This triggers a latent bug in linkchecker, as the DirEntry filetype isn't a dir but later on the file itself, when opened, is one, triggering an unreachable!() clause. This patch fixes the situation by using std::fs::metadata, which goes through symlinks. I'd have added a test case but `tidy` doesn't seem to like symlinks, and moreover I'm not sure how Git deals with symlinks on Windows. Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
2021-10-22docs: Escape brackets to satisfy the linkcheckerNoah Lev-0/+2
My change to use `Type::def_id()` (formerly `Type::def_id_full()`) in more places caused some docs to show up that used to be missed by rustdoc. Those docs contained unescaped square brackets, which triggered linkcheck errors. This commit escapes the square brackets and adds this particular instance to the linkcheck exception list.
2021-09-20Migrate to 2021Mark Rousskov-1/+1
2021-09-12Fix linkcheck issuesJoshua Nelson-0/+26
Most of these are because alloc uses `#[lang_item]` to define methods, but core documents primitives before those methods are available. - Fix rustdoc-js-std test For some reason this change made CStr not show up in the results for `str,u8`. Since it still shows up for str, and since it wasn't a great match for that query anyway, I think this is ok to let slide. - Add test that all primitives can be linked to - Enable `doc(primitive)` in `core` as well - Add linkcheck exception specifically for Windows Ideally this would be done automatically by the linkchecker by replacing `\\` with forward slashes, but this PR is already a ton of work ... - Don't forcibly fail linkchecking if there's a broken intra-doc link on Windows Previously, it would exit with a hard error if a missing file had `::` in it. This changes it to report a missing file instead, which allows adding an exception.
2021-08-06Fix typo -- "The" -> "They"await Marsha-1/+1
I was reading through source code to try to learn more about the language and how to make the most of it when I ran into a small typo, so I figured I'd offer up a fix! I'm pretty new now, but hopefully I can offer up more substantial changes later. :D
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-06-09linkchecker: Fix bug where fragment errors printed the wrong path.Eric Huss-2/+3
2021-06-09Change the linkchecker self-tests to validate more output.Eric Huss-7/+42
2021-06-08Fix linkchecker redirection tests.Eric Huss-0/+4
These were changed in #84703.
2021-06-03Build linkcheck script as release to run faster.Eric Huss-1/+1
2021-06-03Fix linkcheck script from getting out of sync.Eric Huss-4/+4
2021-06-01Replace h3 and h4 containing invalid DOMGuillaume Gomez-1/+1
2021-05-24Add some tests for the linkchecker.Eric Huss-0/+187
2021-05-24Optimize linkchecker by caching all filesystem access.Eric Huss-172/+214
This should improve performance 2-3x depending on the system.
2021-05-22linkchecker: Organize state into a struct, and add report.Eric Huss-208/+257
Moves all the state into a struct so it doesn't need to be passed around as much. Also adds a report showing how long it took and what it found. This includes a minor change: a failure to load a file is now an error, instead of being ignored. This should only happen if there is a permission error or some other shenanigans going on.
2021-04-04Bump cfgsMark Rousskov-2/+0
2021-03-10remove slice linkcheck exceptionsFrançois Mockers-5/+0
2021-02-09Stabilize str_split_onceJacob Pratt-1/+1
2021-01-17Remove unused linkcheck exceptionsJoshua Nelson-10/+1
2020-12-07Dogfood 'str_split_once() with linkcheckerEric Arellano-5/+8
2020-10-18Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkcheckerYuki Okushi-0/+3
2020-10-15Deny broken intra-doc links in linkcheckerJoshua Nelson-0/+66
Since rustdoc isn't warning about these links, check for them manually.
2020-09-13Ignore rustc_private items from std docsLzu Tao-0/+10
Apply suggestions from code review Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-09-04Auto merge of #75207 - dylni:add-slice-check-range, r=KodrAusbors-0/+1
Add `slice::check_range` This method is useful for [`RangeBounds`] parameters. It's even been [rewritten](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/src/librustc_data_structures/sorted_map.rs#L214) [many](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/library/alloc/src/vec.rs#L1299) [times](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/library/core/src/slice/mod.rs#L2441) in the standard library, sometimes assuming that the bounds won't be [`usize::MAX`]. For example, [`Vec::drain`] creates an empty iterator when [`usize::MAX`] is used as an inclusive end bound: ```rust assert!(vec![1].drain(..=usize::max_value()).eq(iter::empty())); ``` If this PR is merged, I'll create another to use it for those methods. [`RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html [`usize::MAX`]: https://doc.rust-lang.org/std/primitive.usize.html#associatedconstant.MAX [`Vec::drain`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.drain
2020-08-23linkcheckr: fix clippy::redundant_static_lifetimes and ↵Matthias Krüger-7/+7
clippy::single_char_pattern
2020-08-06Fix links againdylni-0/+1
2020-07-18primitive impls are weirdManish Goregaokar-1/+1
2020-07-18Update src/tools/linkchecker/main.rsManish Goregaokar-0/+1
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-07-18Add explicit exception list to linkcheckerManish Goregaokar-22/+40
2020-07-18Use intra-doc links on HashMapManish Goregaokar-1/+0
2020-07-18Use intra-doc links in alloc::StringManish Goregaokar-5/+1
2020-07-10Avoid "whitelist"Tamir Duberstein-3/+3
Other terms are more inclusive and precise.
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-2/+0
2020-04-26linkchecker: fix typo in main.rsUjjwal Sharma-1/+1
2020-02-13Add shared script for linkchecking books.Eric Huss-0/+113
2020-01-01Cleanup linkchecker whitelistOliver Middleton-20/+9
linkchecker is no longer run on the compiler docs so they can be removed from the whitelist.
2019-12-22Format the worldMark Rousskov-83/+85
2019-10-21Remove `InternedString`.Nicholas Nethercote-1/+0
By using `LocalInternedString` instead for the few remaining uses.
2019-09-23Add `#![deny(warnings)]` to internal toolsAlex Crichton-0/+2
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-04-27Stabilized vectored IOSteven Fackler-2/+2
This renames `std::io::IoVec` to `std::io::IoSlice` and `std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes `std::io::IoSlice`, `std::io::IoSliceMut`, `std::io::Read::read_vectored`, and `std::io::Write::write_vectored`. Closes #58452
2019-02-13Whitelist iovec types in linkcheckerSteven Fackler-1/+3
2019-02-03Transition linkchecker to 2018 editionHirokazu Hata-1/+4
2019-01-20linkchecker: Update deprecated trim_left_matches usageIgor Matuszewski-3/+3
2018-12-25Remove licensesMark Rousskov-10/+0