Follow-up of rust-lang/rust-clippy#15140.
This time, I removed some unneeded `<span>` wrappings and some unneeded
CSS classes. As usual, no changes in the UI.
Before this PR: 1876091
With this PR: 1751097
Reduction: -6.6%
r? @samueltardieu
changelog: Reduce page size and number of DOM elements on clippy lints
page
This is the first pass of "reducing the size of the clippy lints page"
I'm currently going through. This first one reduces the size page but
mostly reduces the number of DOM elements.
Page size change:
* Before this PR: 1938957
* With this PR: 1876167
* Reduction: -3.2%
r? @Alexendoo
changelog: Reduce page size and number of DOM elements on clippy lints
page
I expect that most people use stable Clippy. So having `master` be the first
documentation link in the list is weird. Now the versions are sorted
stable->beta->master.
In order to be consistent with our documentation, deprecated lints
should not be counted when displaying the total number of lints on the
[web site](https://rust-lang.github.io/rust-clippy/master/index.html).
For example, as of 2025-06-01, there are 784 non-deprecated lints which
are referred to as "over 750 lints" in the documentation, but the web site
displays "Total number: 799". When one new lint will be added, there
will be a discrepancy ("over 750 lints" vs. "Total number: 800") if this
is not fixed.
Improve display of clippy lints page when JS is disabled
There is no point in displaying the settings menu and the filters if JS is disabled. So in this case, this PR simply hides it:

For the theme handling though, I need to send a fix to mdBook first. But once done, it'll look as expected (dark if system is in dark mode).
changelog: Improve clippy lints page display when JS is disabled.
r? `@Alexendoo`
Allow to go through clippy lints page without javascript
Fixes#13536.
This is the follow-up of https://github.com/rust-lang/rust-clippy/pull/13269.
This PR makes it possible to expand/collapse lints (individually) without JS. To achieve this result, there are two ways:
1. Use `details` and `summary` tags. Problem with this approach is that the web browser search may open the `details` tags automatically if content matching it is inside. From a previous discussion with `@Alexendoo,` it seems to not be a desired behaviour.
2. Use a little trick where you use a `label` and a checkbox where the checkbox is in fact hidden. Then it's just a matter of CSS.
r? `@Alexendoo`
changelog: Allow to go through clippy lints page without JS
The URLs contained an extra `clippy_lints`, which resulted in
broken links. Links are generated using each lint's `id_location`,
which already contains the full path inside the repository.
Rewrite lints page
This PR has multiple goals:
* Make lints page to work without needing a web server by removing the json file.
* Prepare the field to also make the page work with JS (not done in this PR but should be straightforward).
* Remove angular dependency.
r? `@Alexendoo`
changelog: make lint page work without web server