about summary refs log tree commit diff
diff options
context:
space:
mode:
authorllogiq <bogusandre@gmail.com>2025-06-01 13:00:06 +0000
committerGitHub <noreply@github.com>2025-06-01 13:00:06 +0000
commit466e0fb1549e6eeee1571579308268af58639b2a (patch)
tree8fd7e1d46b5d36481c049b0a29f5157ba3ab0550
parent3f48a2b01e7210b82fefc82dbaf6dbe753ca38e4 (diff)
parentd4aed518a51d74a12f0664ea4ed7891cf2315800 (diff)
downloadrust-466e0fb1549e6eeee1571579308268af58639b2a.tar.gz
rust-466e0fb1549e6eeee1571579308268af58639b2a.zip
Do not count deprecated lints in lint total (#14948)
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.

changelog: none

r? @llogiq
-rw-r--r--util/gh-pages/script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js
index fec883938d6..285aa34e701 100644
--- a/util/gh-pages/script.js
+++ b/util/gh-pages/script.js
@@ -602,7 +602,7 @@ filters.filterLints();
 updateLintCount();
 
 function updateLintCount() {
-    const allLints = filters.getAllLints();
+    const allLints = filters.getAllLints().filter(lint => lint.group != "deprecated");
     const totalLints = allLints.length;
     
     const countElement = document.getElementById("lint-count");