288 Commits

Author SHA1 Message Date
Guillaume Gomez
102e39fa51 Remove CSS bootstrap dependency 2025-08-06 11:46:53 +02:00
Guillaume Gomez
04e794a0b9 Fix CSS indent 2025-08-06 11:30:09 +02:00
Samuel Tardieu
b98252f6ca
Generate lint count in template (#15414)
Removes the pop-in of the element on page load

changelog: none
2025-08-05 11:49:09 +00:00
Alex Macleod
0ea413fe6b Generate lint count in template 2025-08-05 11:40:05 +00:00
Alexey Semenyuk
0708b6a1e6 Fix not showing deprecated lints 2025-08-04 19:08:25 +05:00
Alexey Semenyuk
048a64a214 Remove unused option fir LEVEL_FILTERS_DEFAULT 2025-07-19 16:29:16 +05:00
klensy
016e53480c gh-pages: reduce page size by skipping spaces 2025-07-15 15:42:23 +03:00
Guillaume Gomez
b1d176235b Reduce clippy lints page size 2025-07-09 15:27:09 +02:00
Samuel Tardieu
60a978d2e9
Simplify clippy lints page further (#15208)
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
2025-07-04 12:54:02 +00:00
Guillaume Gomez
dd1a52f8b6 Simplify clippy lints page further 2025-07-04 13:57:38 +02:00
Samuel Tardieu
da2f0ad53c
Reduce page size and number of DOM elements on clippy lints page (#15140)
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
2025-07-04 10:09:34 +00:00
Philipp Krones
22c0226aff
Lint docs: Sort versions, so that stable comes first
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.
2025-06-26 19:59:04 +02:00
Guillaume Gomez
ecb397a365 Reduce page size and number of DOM elements on clippy lints page 2025-06-25 20:39:14 +02:00
Samuel Tardieu
d4aed518a5
Do not count deprecated lints in lint total
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.
2025-06-01 13:48:51 +02:00
Alexey Semenyuk
8cced0fd6f Show total count lints 2025-05-26 21:40:25 +05:00
Ada Alakbarova
2304a9cb76
remove non-existent pathspec from pre-commit hook
it was added back in 6035e050e83cc991f94797eef4d720c0b61d8955, at which
time there were some files matching it, e.g.
6035e050e8/clippy_lints/src/lib.deprecated.rs
2025-04-23 00:47:43 +02:00
lapla-cogito
ab21f716fc
fix broken CSS links 2025-03-09 21:01:59 +09:00
Alex Macleod
33bb8afd08 Fix expand/collapse all on site, make highlightjs lazier 2025-01-30 18:01:05 +00:00
lapla-cogito
e307b2f0c6
fix version search in the website 2025-01-17 18:16:40 +09:00
BD103
4907940a55 fix: various typos 2024-12-05 11:11:15 -05:00
bors
52b8324503 Auto merge of #13585 - GuillaumeGomez:no-js, r=Alexendoo
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:

![image](https://github.com/user-attachments/assets/e96039a9-e698-49b7-bf2b-70e78442b305)

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`
2024-11-02 13:49:04 +00:00
Guillaume Gomez
ac764df8ab Handle noscript style with "js" class on <html>. 2024-11-01 20:20:12 +01:00
Guillaume Gomez
ca5c6f6c26 Improve theme handling when JS is disabled 2024-11-01 20:20:12 +01:00
Guillaume Gomez
c056928af2 Improve display of clippy lints page when JS is disabled 2024-11-01 20:20:12 +01:00
Guillaume Gomez
7115404a97 Open lint when clicking on its anchor 2024-10-23 16:58:06 +02:00
Guillaume Gomez
b33977b852 Fix invalid lint ID filtering 2024-10-22 22:54:29 +02:00
Guillaume Gomez
97d13a8c0a Fix not working lint anchor 2024-10-22 22:50:17 +02:00
René Kijewski
2a5de352a1 docs: remove stray comma 2024-10-20 14:47:01 +02:00
bors
6a795887c4 Auto merge of #13539 - GuillaumeGomez:allow-no-js, 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
2024-10-18 19:24:16 +00:00
Guillaume Gomez
82969e5c4e Allow to go through clippy lints page without javascript 2024-10-18 18:03:16 +02:00
Anastasis Georgoulas
b86a48955e Fix link to source
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.
2024-10-15 22:42:51 +01:00
bors
6f1def79dd Auto merge of #13269 - GuillaumeGomez:rewrite-lints-page, r=Alexendoo
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
2024-10-11 14:18:54 +00:00
Guillaume Gomez
603934336d Greatly reduce generated HTML page size 2024-10-03 11:17:33 +02:00
Guillaume Gomez
80eb9cfa14 Run syntax highlighting only when needed 2024-10-03 11:12:19 +02:00
Guillaume Gomez
823c1246ab Move inlined CSS into style.css 2024-10-03 11:12:19 +02:00
Guillaume Gomez
8a3d4e1a70 Replace rinja custom syntax with default syntax
Since all angular code was removed, there is no conflict anymore before angular and jinja2 syntaxes so we can just use plain jinja2 syntax.
2024-10-03 11:12:19 +02:00
Guillaume Gomez
d52b9aa564 Move theme handling JS into its own file to make theme being applied before first rendering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
47f40d468a Improve rendering speed by moving settings generation after theme rendering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
e0b0851ba8 Support version filter URL parameters 2024-10-03 11:12:19 +02:00
Guillaume Gomez
4bb4cc6fcb Add support for URL arguments 2024-10-03 11:12:19 +02:00
Guillaume Gomez
00c11df107 Add support for version filtering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
59ccebe426 Support all filters except versions 2024-10-03 11:12:19 +02:00
Guillaume Gomez
aeb548a4f7 Put back interactions with settings menus 2024-10-03 11:12:11 +02:00
Philipp Krones
6c2e82496f Remove unused import from Clippy versions.py file 2024-09-24 18:13:17 +02:00
Philipp Krones
b61fcbee76 Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
Guillaume Gomez
f2193c680c Completely remove angular and generate parts of settings in JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
574e3dd922 Finish porting lint functionalities to vanilla JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
0055cebaa3 Replace search with vanilla JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
b522e7a944 Generate lint list in HTML directly instead of JS 2024-09-22 22:30:44 +02:00
Alex Macleod
d2305ff634 Generate versions HTML directly 2024-09-18 18:51:54 +00:00