Skip to content

Commit 76add0f

Browse files
committed
Show total count lints
1 parent 954034b commit 76add0f

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
66

7-
[There are over 750 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
7+
[There are over 790 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
88

99
Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
1010
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.

book/src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A collection of lints to catch common mistakes and improve your
66
[Rust](https://github.com/rust-lang/rust) code.
77

8-
[There are over 750 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
8+
[There are over 790 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
99

1010
Lints are divided into categories, each with a default [lint
1111
level](https://doc.rust-lang.org/rustc/lints/levels.html). You can choose how

util/gh-pages/index_template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
<div class="container"> {# #}
5252
<div class="page-header"> {# #}
53-
<h1>Clippy Lints</h1> {# #}
53+
<h1>Clippy Lints <span id="lint-count" class="badge"></span></h1> {# #}
5454
</div> {# #}
5555

5656
<noscript> {# #}

util/gh-pages/script.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ window.searchState = {
7171
} else {
7272
window.location.hash = '';
7373
}
74+
updateLintCount();
7475
},
7576
};
7677

@@ -598,3 +599,14 @@ generateSearch();
598599
parseURLFilters();
599600
scrollToLintByURL();
600601
filters.filterLints();
602+
updateLintCount();
603+
604+
function updateLintCount() {
605+
const allLints = filters.getAllLints();
606+
const totalLints = allLints.length;
607+
608+
const countElement = document.getElementById("lint-count");
609+
if (countElement) {
610+
countElement.innerText = `Total number: ${totalLints}`;
611+
}
612+
}

0 commit comments

Comments
 (0)