diff options
| author | Alexey Semenyuk <alexsemenyuk88@gmail.com> | 2025-05-26 21:30:20 +0500 |
|---|---|---|
| committer | Alexey Semenyuk <alexsemenyuk88@gmail.com> | 2025-05-26 21:40:25 +0500 |
| commit | 8cced0fd6fd9c2b434ac08c09c160b026ed6b691 (patch) | |
| tree | 5e4e843a75f60a0355cff653a6f226761e599f6d | |
| parent | 954034b4973fca154a346b39c8a8e628e31a146b (diff) | |
| download | rust-8cced0fd6fd9c2b434ac08c09c160b026ed6b691.tar.gz rust-8cced0fd6fd9c2b434ac08c09c160b026ed6b691.zip | |
Show total count lints
| -rw-r--r-- | util/gh-pages/index_template.html | 2 | ||||
| -rw-r--r-- | util/gh-pages/script.js | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/util/gh-pages/index_template.html b/util/gh-pages/index_template.html index 19dc1ec0b0c..865b9523c39 100644 --- a/util/gh-pages/index_template.html +++ b/util/gh-pages/index_template.html @@ -50,7 +50,7 @@ Otherwise, have a great day =^.^= <div class="container"> {# #} <div class="page-header"> {# #} - <h1>Clippy Lints</h1> {# #} + <h1>Clippy Lints <span id="lint-count" class="badge"></span></h1> {# #} </div> {# #} <noscript> {# #} diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js index c942a6a05a1..fec883938d6 100644 --- a/util/gh-pages/script.js +++ b/util/gh-pages/script.js @@ -71,6 +71,7 @@ window.searchState = { } else { window.location.hash = ''; } + updateLintCount(); }, }; @@ -598,3 +599,14 @@ generateSearch(); parseURLFilters(); scrollToLintByURL(); filters.filterLints(); +updateLintCount(); + +function updateLintCount() { + const allLints = filters.getAllLints(); + const totalLints = allLints.length; + + const countElement = document.getElementById("lint-count"); + if (countElement) { + countElement.innerText = `Total number: ${totalLints}`; + } +} |
