Lines Matching +full:rust +full:- +full:analyzer
13 All contributors are expected to follow the [Rust Code of Conduct].
15 - [Contributing to Clippy](#contributing-to-clippy)
16 - [The Clippy book](#the-clippy-book)
17 - [High level approach](#high-level-approach)
18 - [Finding something to fix/improve](#finding-something-to-fiximprove)
19 …- [Getting code-completion for rustc internals to work](#getting-code-completion-for-rustc-interna…
20 - [IntelliJ Rust](#intellij-rust)
21 - [Rust Analyzer](#rust-analyzer)
22 - [How Clippy works](#how-clippy-works)
23 - [Issue and PR triage](#issue-and-pr-triage)
24 - [Bors and Homu](#bors-and-homu)
25 - [Contributions](#contributions)
26 - [License](#license)
28 [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/clippy
29 [Rust Code of Conduct]: https://www.rust-lang.org/policies/code-of-conduct
36 [Clippy book]: https://doc.rust-lang.org/nightly/clippy/index.html
37 [developer guide]: https://doc.rust-lang.org/nightly/clippy/development/index.html
53 [here](https://github.com/rust-lang/rust-clippy/blob/master/triagebot.toml#L18)
55 Some issues are easier than others. The [`good-first-issue`] label can be used to find the easy
58 There are also some abandoned PRs, marked with [`S-inactive-closed`].
64 Issues marked [`T-AST`] involve simple matching of the syntax tree structure,
65 and are generally easier than [`T-middle`] issues, which involve types
68 [`T-AST`] issues will generally need you to match against a predefined syntax structure.
70 `rustc -Z unpretty=ast-tree` on an example of the structure and compare with the [nodes in the AST …
71 Usually the lint will end up to be a nested series of matches and ifs, [like so][deep-nesting].
72 But we can make it nest-less by using [let chains], [like this][nest-less].
74 [`E-medium`] issues are generally pretty easy too, though it's recommended you work on an [`good-fi…
75 first. Sometimes they are only somewhat involved code wise, but not difficult per-se.
76 Note that [`E-medium`] issues may require some knowledge of Clippy internals or some
79 [`T-middle`] issues can be more involved and require verifying types. The [`ty`] module contains a
83 [`good-first-issue`]: https://github.com/rust-lang/rust-clippy/labels/good-first-issue
84 [`S-inactive-closed`]: https://github.com/rust-lang/rust-clippy/pulls?q=is%3Aclosed+label%3AS-inact…
85 [`T-AST`]: https://github.com/rust-lang/rust-clippy/labels/T-AST
86 [`T-middle`]: https://github.com/rust-lang/rust-clippy/labels/T-middle
87 [`E-medium`]: https://github.com/rust-lang/rust-clippy/labels/E-medium
88 [`ty`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty
89 [nodes in the AST docs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/
90 [deep-nesting]: https://github.com/rust-lang/rust-clippy/blob/5e4f0922911536f80d9591180fa604229ac13…
91 [let chains]: https://github.com/rust-lang/rust/pull/94927
92 [nest-less]: https://github.com/rust-lang/rust-clippy/blob/5e4f0922911536f80d9591180fa604229ac13939…
94 ## Getting code-completion for rustc internals to work
96 ### IntelliJ Rust
97 Unfortunately, [`IntelliJ Rust`][IntelliJ_rust_homepage] does not (yet?) understand how Clippy uses…
98 using `extern crate` and it also needs to be able to read the source files of the rustc-compiler wh…
100 To work around this, you need to have a copy of the [rustc-repo][rustc_repo] available which can be…
101 `git clone https://github.com/rust-lang/rust/`.
102 Then you can run a `cargo dev` command to automatically make Clippy use the rustc-repo via path-dep…
103 which `IntelliJ Rust` will be able to understand.
104 Run `cargo dev setup intellij --repo-path <repo-path>` where `<repo-path>` is a path to the rustc r…
106 The command will add path-dependencies pointing towards rustc-crates inside the rustc repo to
107 Clippy's `Cargo.toml`s and should allow `IntelliJ Rust` to understand most of the types that Clippy…
110 [rustc_repo]: https://github.com/rust-lang/rust/
111 [IntelliJ_rust_homepage]: https://intellij-rust.github.io/
113 ### Rust Analyzer
114 For [`rust-analyzer`][ra_homepage] to work correctly make sure that in the `rust-analyzer` configur…
117 { "rust-analyzer.rustc.source": "discover" }
123 To have `rust-analyzer` also work in the `clippy_dev` and `lintcheck` crates, add the following con…
127 "rust-analyzer.linkedProjects": [
135 [ra_homepage]: https://rust-analyzer.github.io/
142 ```rust
168 ```rust
191 [lint_crate_entry]: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/lib.rs
192 [else_if_without_else]: https://github.com/rust-lang/rust-clippy/blob/4253aa7137cb7378acc96133c787e…
193 [`LintStore`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LintStore.html
194 [reg_early_pass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LintStore.html#…
195 [reg_late_pass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LintStore.html#m…
196 [early_lint_pass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.EarlyLintPass.h…
197 [late_lint_pass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.LateLintPass.html
201 Clippy is following the [Rust triage procedure][triage] for issues and pull
209 Our highest priority is fixing [crashes][l-crash] and [bugs][l-bug], for example
212 suggestions from Rust compiler errors.
214 We have prioritization labels and a sync-blocker label, which are described below.
215 - [P-low][p-low]: Requires attention (fix/response/evaluation) by a team member but isn't urgent.
216 - [P-medium][p-medium]: Should be addressed by a team member until the next sync.
217 - [P-high][p-high]: Should be immediately addressed and will require an out-of-cycle sync or a back…
218 - [L-sync-blocker][l-sync-blocker]: An issue that "blocks" a sync.
232 [triage]: https://forge.rust-lang.org/release/triage-procedure.html
233 [l-crash]: https://github.com/rust-lang/rust-clippy/labels/L-crash
234 [l-bug]: https://github.com/rust-lang/rust-clippy/labels/L-bug
235 [p-low]: https://github.com/rust-lang/rust-clippy/labels/P-low
236 [p-medium]: https://github.com/rust-lang/rust-clippy/labels/P-medium
237 [p-high]: https://github.com/rust-lang/rust-clippy/labels/P-high
238 [l-sync-blocker]: https://github.com/rust-lang/rust-clippy/labels/L-sync-blocker
239 [homu]: https://github.com/rust-lang/homu
240 [homu_instructions]: https://bors.rust-lang.org/
241 [homu_queue]: https://bors.rust-lang.org/queue/clippy
257 - New lint
261 - False positive fix
265 - Purely internal change
281 All code in this repository is under the [Apache-2.0] or the [MIT] license.
283 <!-- adapted from https://github.com/servo/servo/blob/master/CONTRIBUTING.md -->
285 [Apache-2.0]: https://www.apache.org/licenses/LICENSE-2.0