|
| 1 | +<!DOCTYPE html> |
| 2 | +<!-- |
| 3 | +Welcome to a Clippy's lint list, at least the source code of it. If you are |
| 4 | +interested in contributing to this website checkout `util/gh-pages/index_template.html` |
| 5 | +inside the rust-clippy repository. |
| 6 | +
|
| 7 | +Otherwise, have a great day =^.^= |
| 8 | +--> |
| 9 | +<html lang="en"> {# #} |
| 10 | +<head> {# #} |
| 11 | + <meta charset="UTF-8"/> {# #} |
| 12 | + <meta name="viewport" content="width=device-width, initial-scale=1"/> {# #} |
| 13 | + <meta name="description" content="A collection of lints to catch common mistakes and improve your Rust code."> {# #} |
| 14 | + |
| 15 | + <title>Clippy Lints</title> {# #} |
| 16 | + |
| 17 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/> {# #} |
| 18 | + <link id="githubLightHighlight" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github.min.css" disabled="true" /> {# #} |
| 19 | + <link id="githubDarkHighlight" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github-dark.min.css" disabled="true" /> {# #} |
| 20 | + |
| 21 | + <!-- The files are not copied over into the Clippy project since they use the MPL-2.0 License --> |
| 22 | + <link rel="stylesheet" href="https://rust-lang.github.io/mdBook/css/variables.css"/> {# #} |
| 23 | + <link id="styleHighlight" rel="stylesheet" href="https://rust-lang.github.io/mdBook/highlight.css"> {# #} |
| 24 | + <link id="styleNight" rel="stylesheet" href="https://rust-lang.github.io/mdBook/tomorrow-night.css" disabled="true"> {# #} |
| 25 | + <link id="styleAyu" rel="stylesheet" href="https://rust-lang.github.io/mdBook/ayu-highlight.css" disabled="true"> {# #} |
| 26 | + <link rel="stylesheet" href="style.css"> {# #} |
| 27 | +</head> {# #} |
| 28 | +<body> {# #} |
| 29 | + <script src="theme.js"></script> {# #} |
| 30 | + <div id="settings-dropdown"> {# #} |
| 31 | + <button class="settings-icon" tabindex="-1"></button> {# #} |
| 32 | + <div class="settings-menu" tabindex="-1"> {# #} |
| 33 | + <div class="setting-radio-name">Theme</div> {# #} |
| 34 | + <select id="theme-choice" onchange="setTheme(this.value, true)"> {# #} |
| 35 | + <option value="ayu">Ayu</option> {# #} |
| 36 | + <option value="coal">Coal</option> {# #} |
| 37 | + <option value="light">Light</option> {# #} |
| 38 | + <option value="navy">Navy</option> {# #} |
| 39 | + <option value="rust">Rust</option> {# #} |
| 40 | + </select> {# #} |
| 41 | + <label> {# #} |
| 42 | + <input type="checkbox" id="disable-shortcuts" onchange="changeSetting(this)"> {#+ #} |
| 43 | + <span>Disable keyboard shortcuts</span> {# #} |
| 44 | + </label> {# #} |
| 45 | + </div> {# #} |
| 46 | + </div> {# #} |
| 47 | + |
| 48 | + <div class="container"> {# #} |
| 49 | + <div class="page-header"> {# #} |
| 50 | + <h1>Clippy Lints</h1> {# #} |
| 51 | + </div> {# #} |
| 52 | + |
| 53 | + <noscript> {# #} |
| 54 | + <div class="alert alert-danger" role="alert"> {# #} |
| 55 | + Sorry, this site only works with JavaScript! :( {# #} |
| 56 | + </div> {# #} |
| 57 | + </noscript> {# #} |
| 58 | + |
| 59 | + <div> {# #} |
| 60 | + <div class="panel panel-default"> {# #} |
| 61 | + <div class="panel-body row"> {# #} |
| 62 | + <div id="upper-filters" class="col-12 col-md-5"> {# #} |
| 63 | + <div class="btn-group" id="lint-levels" tabindex="-1"> {# #} |
| 64 | + <button type="button" class="btn btn-default dropdown-toggle"> {# #} |
| 65 | + Lint levels <span class="badge">4</span> <span class="caret"></span> {# #} |
| 66 | + </button> {# #} |
| 67 | + <ul class="dropdown-menu" id="lint-levels-selector"> {# #} |
| 68 | + <li class="checkbox"> {# #} |
| 69 | + <button onclick="toggleElements('levels_filter', true)">All</button> {# #} |
| 70 | + </li> {# #} |
| 71 | + <li class="checkbox"> {# #} |
| 72 | + <button onclick="toggleElements('levels_filter', false)">None</button> {# #} |
| 73 | + </li> {# #} |
| 74 | + <li role="separator" class="divider"></li> {# #} |
| 75 | + </ul> {# #} |
| 76 | + </div> {# #} |
| 77 | + <div class="btn-group" id="lint-groups" tabindex="-1"> {# #} |
| 78 | + <button type="button" class="btn btn-default dropdown-toggle"> {# #} |
| 79 | + Lint groups <span class="badge">9</span> <span class="caret"></span> {# #} |
| 80 | + </button> {# #} |
| 81 | + <ul class="dropdown-menu" id="lint-groups-selector"> {# #} |
| 82 | + <li class="checkbox"> {# #} |
| 83 | + <button onclick="toggleElements('groups_filter', true)">All</button> {# #} |
| 84 | + </li> {# #} |
| 85 | + <li class="checkbox"> {# #} |
| 86 | + <button onclick="resetGroupsToDefault()">Default</button> {# #} |
| 87 | + </li> {# #} |
| 88 | + <li class="checkbox"> {# #} |
| 89 | + <button onclick="toggleElements('groups_filter', false)">None</button> {# #} |
| 90 | + </li> {# #} |
| 91 | + <li role="separator" class="divider"></li> {# #} |
| 92 | + </ul> {# #} |
| 93 | + </div> {# #} |
| 94 | + <div class="btn-group" id="version-filter" tabindex="-1"> {# #} |
| 95 | + <button type="button" class="btn btn-default dropdown-toggle"> {# #} |
| 96 | + Version {#+ #} |
| 97 | + <span id="version-filter-count" class="badge">0</span> {#+ #} |
| 98 | + <span class="caret"></span> {# #} |
| 99 | + </button> {# #} |
| 100 | + <ul id="version-filter-selector" class="dropdown-menu"> {# #} |
| 101 | + <li class="checkbox"> {# #} |
| 102 | + <button onclick="clearVersionFilters()">Clear filters</button> {# #} |
| 103 | + </li> {# #} |
| 104 | + <li role="separator" class="divider"></li> {# #} |
| 105 | + </ul> {# #} |
| 106 | + </div> {# #} |
| 107 | + <div class="btn-group", id="lint-applicabilities" tabindex="-1"> {# #} |
| 108 | + <button type="button" class="btn btn-default dropdown-toggle"> {# #} |
| 109 | + Applicability {#+ #} |
| 110 | + <span class="badge">4</span> {#+ #} |
| 111 | + <span class="caret"></span> {# #} |
| 112 | + </button> {# #} |
| 113 | + <ul class="dropdown-menu" id="lint-applicabilities-selector"> {# #} |
| 114 | + <li class="checkbox"> {# #} |
| 115 | + <button onclick="toggleElements('applicabilities_filter', true)">All</button> {# #} |
| 116 | + </li> {# #} |
| 117 | + <li class="checkbox"> {# #} |
| 118 | + <button onclick="toggleElements('applicabilities_filter', false)">None</button> {# #} |
| 119 | + </li> {# #} |
| 120 | + <li role="separator" class="divider"></li> {# #} |
| 121 | + </ul> {# #} |
| 122 | + </div> {# #} |
| 123 | + </div> {# #} |
| 124 | + <div class="col-12 col-md-5 search-control"> {# #} |
| 125 | + <div class="input-group"> {# #} |
| 126 | + <label class="input-group-addon" id="filter-label" for="search-input">Filter:</label> {# #} |
| 127 | + <input type="text" class="form-control filter-input" placeholder="Keywords or search string (`S` or `/` to focus)" id="search-input" /> {# #} |
| 128 | + <span class="input-group-btn"> {# #} |
| 129 | + <button class="filter-clear btn" type="button" onclick="searchState.clearInput(event)"> {# #} |
| 130 | + Clear {# #} |
| 131 | + </button> {# #} |
| 132 | + </span> {# #} |
| 133 | + </div> {# #} |
| 134 | + </div> {# #} |
| 135 | + <div class="col-12 col-md-2 btn-group expansion-group"> {# #} |
| 136 | + <button title="Collapse All" class="btn btn-default expansion-control" type="button" onclick="toggleExpansion(false)"> {# #} |
| 137 | + <span class="glyphicon glyphicon-collapse-up"></span> {# #} |
| 138 | + </button> {# #} |
| 139 | + <button title="Expand All" class="btn btn-default expansion-control" type="button" onclick="toggleExpansion(true)"> {# #} |
| 140 | + <span class="glyphicon glyphicon-collapse-down"></span> {# #} |
| 141 | + </button> {# #} |
| 142 | + </div> {# #} |
| 143 | + </div> {# #} |
| 144 | + </div> |
| 145 | + {% for lint in lints %} |
| 146 | + <article class="panel panel-default collapsed" id="{{lint.id}}"> {# #} |
| 147 | + <header class="panel-heading" onclick="expandLint('{{lint.id}}')"> {# #} |
| 148 | + <h2 class="panel-title"> {# #} |
| 149 | + <div class="panel-title-name" id="lint-{{lint.id}}"> {# #} |
| 150 | + <span>{{lint.id}}</span> {#+ #} |
| 151 | + <a href="#{{lint.id}}" class="anchor label label-default" onclick="openLint(event)">¶</a> {#+ #} |
| 152 | + <a href="" class="anchor label label-default" onclick="copyToClipboard(event)"> {# #} |
| 153 | + 📋 {# #} |
| 154 | + </a> {# #} |
| 155 | + </div> {# #} |
| 156 | + |
| 157 | + <div class="panel-title-addons"> {# #} |
| 158 | + <span class="label label-lint-group label-default label-group-{{lint.group}}">{{lint.group}}</span> {#+ #} |
| 159 | + |
| 160 | + <span class="label label-lint-level label-lint-level-{{lint.level}}">{{lint.level}}</span> {#+ #} |
| 161 | + |
| 162 | + <span class="label label-doc-folding">+</span> {# #} |
| 163 | + </div> {# #} |
| 164 | + </h2> {# #} |
| 165 | + </header> {# #} |
| 166 | + |
| 167 | + <div class="list-group lint-docs"> {# #} |
| 168 | + <div class="list-group-item lint-doc-md">{{Self::markdown(lint.docs)}}</div> {# #} |
| 169 | + <div class="lint-additional-info-container"> |
| 170 | + {# Applicability #} |
| 171 | + <div class="lint-additional-info-item"> {# #} |
| 172 | + <span> Applicability: </span> {# #} |
| 173 | + <span class="label label-default label-applicability">{{ lint.applicability_str() }}</span> {# #} |
| 174 | + <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a> {# #} |
| 175 | + </div> |
| 176 | + {# Clippy version #} |
| 177 | + <div class="lint-additional-info-item"> {# #} |
| 178 | + <span>{% if lint.group == "deprecated" %}Deprecated{% else %} Added{% endif +%} in: </span> {# #} |
| 179 | + <span class="label label-default label-version">{{lint.version}}</span> {# #} |
| 180 | + </div> |
| 181 | + {# Open related issues #} |
| 182 | + <div class="lint-additional-info-item"> {# #} |
| 183 | + <a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+{{lint.id}}">Related Issues</a> {# #} |
| 184 | + </div> |
| 185 | + |
| 186 | + {# Jump to source #} |
| 187 | + {% if let Some(id_location) = lint.id_location %} |
| 188 | + <div class="lint-additional-info-item"> {# #} |
| 189 | + <a href="https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/{{id_location}}">View Source</a> {# #} |
| 190 | + </div> |
| 191 | + {% endif %} |
| 192 | + </div> {# #} |
| 193 | + </div> {# #} |
| 194 | + </article> |
| 195 | + {% endfor %} |
| 196 | + </div> {# #} |
| 197 | + </div> {# #} |
| 198 | + |
| 199 | + <a {#+ #} |
| 200 | + aria-label="View source on GitHub" {#+ #} |
| 201 | + class="github-corner" {#+ #} |
| 202 | + href="https://github.com/rust-lang/rust-clippy" {#+ #} |
| 203 | + rel="noopener noreferrer" {#+ #} |
| 204 | + target="_blank" {# #} |
| 205 | + > {# #} |
| 206 | + <svg {#+ #} |
| 207 | + width="80" {#+ #} |
| 208 | + height="80" {#+ #} |
| 209 | + viewBox="0 0 250 250" {#+ #} |
| 210 | + style="position: absolute; top: 0; border: 0; right: 0" {#+ #} |
| 211 | + aria-hidden="true" {# #} |
| 212 | + > {# #} |
| 213 | + <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" fill="var(--theme-color)"></path> {# #} |
| 214 | + <path {#+ #} |
| 215 | + d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" {#+ #} |
| 216 | + fill="currentColor" {#+ #} |
| 217 | + style="transform-origin: 130px 106px" {#+ #} |
| 218 | + class="octo-arm" {# #} |
| 219 | + ></path> {# #} |
| 220 | + <path {#+ #} |
| 221 | + d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" {#+ #} |
| 222 | + fill="currentColor" {#+ #} |
| 223 | + class="octo-body" {# #} |
| 224 | + ></path> {# #} |
| 225 | + </svg> {# #} |
| 226 | + </a> {# #} |
| 227 | + |
| 228 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script> {# #} |
| 229 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/rust.min.js"></script> {# #} |
| 230 | + <script src="script.js"></script> {# #} |
| 231 | +</body> {# #} |
| 232 | +</html> {# #} |
0 commit comments