From d4aed518a51d74a12f0664ea4ed7891cf2315800 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sun, 1 Jun 2025 13:35:13 +0200 Subject: [PATCH] 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. --- util/gh-pages/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js index fec883938d6a..285aa34e7018 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");