Skip to content

Commit f3449cd

Browse files
committed
Auto merge of rust-lang#12750 - cakebaker:patch-1, r=Alexendoo
`assigning_clones`: add empty line to doc changelog: none This PR adds, for consistency reasons, an empty line to the example in the doc of the `assigning_clones` lint.
2 parents 20b085d + f412f62 commit f3449cd

File tree

3,573 files changed

+351523
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,573 files changed

+351523
-0
lines changed

src/tools/clippy/.cargo/config.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[alias]
2+
uitest = "test --test compile-test"
3+
uibless = "test --test compile-test -- -- --bless"
4+
bless = "test -- -- --bless"
5+
dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
6+
lintcheck = "run --package lintcheck --bin lintcheck --manifest-path lintcheck/Cargo.toml -- "
7+
collect-metadata = "test --test dogfood --features internal -- run_metadata_collection_lint --ignored"
8+
9+
[build]
10+
# -Zbinary-dep-depinfo allows us to track which rlib files to use for compiling UI tests
11+
rustflags = ["-Zunstable-options", "-Zbinary-dep-depinfo"]
12+
target-dir = "target"
13+
14+
[unstable]
15+
binary-dep-depinfo = true
16+
17+
[profile.dev]
18+
split-debuginfo = "unpacked"

src/tools/clippy/.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
indent_style = space
13+
indent_size = 4
14+
max_line_length = 120
15+
16+
[*.md]
17+
# double whitespace at end of line
18+
# denotes a line break in Markdown
19+
trim_trailing_whitespace = false
20+
21+
[*.yml]
22+
indent_size = 2

src/tools/clippy/.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
3+
*.fixed linguist-language=Rust
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Blank Issue
2+
description: Create a blank issue.
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: Thank you for filing an issue!
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Description
11+
description: >
12+
Please provide a description of the issue, along with any information
13+
you feel relevant to replicate it.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: version
18+
attributes:
19+
label: Version
20+
description: "Rust version (`rustc -Vv`)"
21+
placeholder: |
22+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
23+
binary: rustc
24+
commit-hash: f455e46eae1a227d735091091144601b467e1565
25+
commit-date: 2020-06-20
26+
host: x86_64-unknown-linux-gnu
27+
release: 1.46.0-nightly
28+
LLVM version: 10.0
29+
render: text
30+
- type: textarea
31+
id: labels
32+
attributes:
33+
label: Additional Labels
34+
description: >
35+
Additional labels can be added to this issue by including the following
36+
command
37+
placeholder: |
38+
@rustbot label +<label>
39+
40+
Common labels for this issue type are:
41+
* C-an-interesting-project
42+
* C-enhancement
43+
* C-question
44+
* C-tracking-issue
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Bug Report
2+
description: Create a bug report for Clippy
3+
labels: ["C-bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thank you for filing a bug report! 🐛
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: Summary
12+
description: >
13+
Please provide a short summary of the bug, along with any information
14+
you feel relevant to replicate the bug.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: reproducer
19+
attributes:
20+
label: Reproducer
21+
description: Please provide the code and steps to reproduce the bug
22+
value: |
23+
I tried this code:
24+
25+
```rust
26+
<code>
27+
```
28+
29+
I expected to see this happen:
30+
31+
Instead, this happened:
32+
- type: textarea
33+
id: version
34+
attributes:
35+
label: Version
36+
description: "Rust version (`rustc -Vv`)"
37+
placeholder: |
38+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
39+
binary: rustc
40+
commit-hash: f455e46eae1a227d735091091144601b467e1565
41+
commit-date: 2020-06-20
42+
host: x86_64-unknown-linux-gnu
43+
release: 1.46.0-nightly
44+
LLVM version: 10.0
45+
render: text
46+
- type: textarea
47+
id: labels
48+
attributes:
49+
label: Additional Labels
50+
description: >
51+
Additional labels can be added to this issue by including the following
52+
command
53+
placeholder: |
54+
@rustbot label +<label>
55+
56+
Common labels for this issue type are:
57+
* `I-suggestion-causes-error`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Rust Programming Language Forum
4+
url: https://users.rust-lang.org
5+
about: Please ask and answer questions about Rust here.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Bug Report (False Negative)
2+
description: Create a bug report about missing warnings from a lint
3+
labels: ["C-bug", "I-false-negative"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thank you for filing a bug report! 🐛
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: Summary
12+
description: >
13+
Please provide a short summary of the bug, along with any information
14+
you feel relevant to replicate the bug.
15+
validations:
16+
required: true
17+
- type: input
18+
id: lint-name
19+
attributes:
20+
label: Lint Name
21+
description: Please provide the lint name.
22+
- type: textarea
23+
id: reproducer
24+
attributes:
25+
label: Reproducer
26+
description: Please provide the code and steps to reproduce the bug
27+
value: |
28+
I tried this code:
29+
30+
```rust
31+
<code>
32+
```
33+
34+
I expected to see this happen:
35+
36+
Instead, this happened:
37+
- type: textarea
38+
id: version
39+
attributes:
40+
label: Version
41+
description: "Rust version (`rustc -Vv`)"
42+
placeholder: |
43+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
44+
binary: rustc
45+
commit-hash: f455e46eae1a227d735091091144601b467e1565
46+
commit-date: 2020-06-20
47+
host: x86_64-unknown-linux-gnu
48+
release: 1.46.0-nightly
49+
LLVM version: 10.0
50+
render: text
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Bug Report (False Positive)
2+
description: Create a bug report about a wrongly emitted lint warning
3+
labels: ["C-bug", "I-false-positive"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thank you for filing a bug report! 🐛
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: Summary
12+
description: >
13+
Please provide a short summary of the bug, along with any information
14+
you feel relevant to replicate the bug.
15+
validations:
16+
required: true
17+
- type: input
18+
id: lint-name
19+
attributes:
20+
label: Lint Name
21+
description: Please provide the lint name.
22+
- type: textarea
23+
id: reproducer
24+
attributes:
25+
label: Reproducer
26+
description: >
27+
Please provide the code and steps to reproduce the bug together with the
28+
output from Clippy.
29+
value: |
30+
I tried this code:
31+
32+
```rust
33+
<code>
34+
```
35+
36+
I saw this happen:
37+
38+
```
39+
<output>
40+
```
41+
42+
I expected to see this happen:
43+
- type: textarea
44+
id: version
45+
attributes:
46+
label: Version
47+
description: "Rust version (`rustc -Vv`)"
48+
placeholder: |
49+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
50+
binary: rustc
51+
commit-hash: f455e46eae1a227d735091091144601b467e1565
52+
commit-date: 2020-06-20
53+
host: x86_64-unknown-linux-gnu
54+
release: 1.46.0-nightly
55+
LLVM version: 10.0
56+
render: text
57+
- type: textarea
58+
id: labels
59+
attributes:
60+
label: Additional Labels
61+
description: >
62+
Additional labels can be added to this issue by including the following
63+
command
64+
placeholder: |
65+
@rustbot label +<label>
66+
67+
Common labels for this issue type are:
68+
* `I-suggestion-causes-error`
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Internal Compiler Error
2+
description: Create a report for an internal compiler error (ICE) in Clippy.
3+
labels: ["C-bug", "I-ICE"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thank you for finding an Internal Compiler Error! 🧊
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: Summary
12+
description: |
13+
If possible, try to provide a minimal verifiable example. You can read ["Rust Bug Minimization Patterns"][mve] for how to create smaller examples. Otherwise, provide the crate where the ICE occurred.
14+
15+
[mve]: http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: version
20+
attributes:
21+
label: Version
22+
description: "Rust version (`rustc -Vv`)"
23+
placeholder: |
24+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
25+
binary: rustc
26+
commit-hash: f455e46eae1a227d735091091144601b467e1565
27+
commit-date: 2020-06-20
28+
host: x86_64-unknown-linux-gnu
29+
release: 1.46.0-nightly
30+
LLVM version: 10.0
31+
render: text
32+
- type: textarea
33+
id: error
34+
attributes:
35+
label: Error output
36+
description: >
37+
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in
38+
your environment. E.g. `RUST_BACKTRACE=1 cargo clippy`.
39+
value: |
40+
<details><summary>Backtrace</summary>
41+
<p>
42+
43+
```
44+
<backtrace>
45+
```
46+
47+
</p>
48+
</details>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: New lint suggestion
2+
description: Suggest a new Clippy lint.
3+
labels: ["A-lint"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thank you for your lint idea!
8+
- type: textarea
9+
id: what
10+
attributes:
11+
label: What it does
12+
description: What does this lint do?
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: advantage
17+
attributes:
18+
label: Advantage
19+
description: >
20+
What is the advantage of the recommended code over the original code?
21+
placeholder: |
22+
- Remove bounds check inserted by ...
23+
- Remove the need to duplicate/store ...
24+
- Remove typo ...
25+
- type: textarea
26+
id: drawbacks
27+
attributes:
28+
label: Drawbacks
29+
description: What might be possible drawbacks of such a lint?
30+
- type: textarea
31+
id: example
32+
attributes:
33+
label: Example
34+
description: >
35+
Include a short example showing when the lint should trigger together
36+
with the improved code.
37+
value: |
38+
```rust
39+
<code>
40+
```
41+
42+
Could be written as:
43+
44+
```rust
45+
<code>
46+
```
47+
validations:
48+
required: true

0 commit comments

Comments
 (0)