File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,7 @@ fn ui_cargo_toml_metadata() {
433433#[ derive( Template ) ]
434434#[ template( path = "index_template.html" ) ]
435435struct Renderer < ' a > {
436+ count : usize ,
436437 lints : & ' a Vec < LintMetadata > ,
437438}
438439
@@ -512,7 +513,12 @@ impl DiagnosticCollector {
512513
513514 fs:: write (
514515 "util/gh-pages/index.html" ,
515- Renderer { lints : & metadata } . render ( ) . unwrap ( ) ,
516+ Renderer {
517+ count : LINTS . len ( ) ,
518+ lints : & metadata,
519+ }
520+ . render ( )
521+ . unwrap ( ) ,
516522 )
517523 . unwrap ( ) ;
518524 } ) ;
Original file line number Diff line number Diff line change 4949 < script src ="theme.js "> </ script > {# #}
5050
5151 < div class ="container "> {# #}
52- < h1 class ="page-header "> Clippy Lints < span id =" lint-count " class ="badge "> </ span > </ h1 > {# #}
52+ < h1 class ="page-header "> Clippy Lints < span class ="badge "> Total number: {{+ count }} </ span > </ h1 > {# #}
5353
5454 < noscript > {# #}
5555 < div class ="alert alert-danger " role ="alert "> {# #}
Original file line number Diff line number Diff line change @@ -593,20 +593,8 @@ disableShortcutsButton.checked = disableShortcuts;
593593
594594addListeners ( ) ;
595595highlightLazily ( ) ;
596-
597- function updateLintCount ( ) {
598- const allLints = filters . getAllLints ( ) . filter ( lint => lint . group != "deprecated" ) ;
599- const totalLints = allLints . length ;
600-
601- const countElement = document . getElementById ( "lint-count" ) ;
602- if ( countElement ) {
603- countElement . innerText = `Total number: ${ totalLints } ` ;
604- }
605- }
606-
607596generateSettings ( ) ;
608597generateSearch ( ) ;
609598parseURLFilters ( ) ;
610599scrollToLintByURL ( ) ;
611600filters . filterLints ( ) ;
612- updateLintCount ( ) ;
You can’t perform that action at this time.
0 commit comments