You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-9
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
Hello fellow Rustacean! Great to see your interest in compiler internals and lints!
4
4
5
+
Clippy welcomes contributions from everyone. There are many ways to contribute to Clippy and the following document explains how
6
+
you can contribute and how to get started.
7
+
If you have any questions about contributing or need help with anything, feel free to ask questions on issues or
8
+
visit the `#clippy` IRC channel on `irc.mozilla.org`.
9
+
10
+
All contributors are expected to follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html).
11
+
5
12
## Getting started
6
13
7
14
High level approach:
@@ -56,7 +63,7 @@ of this.
56
63
57
64
There is also the internal `author` lint to generate clippy code that detects the offending pattern. It does not work for all of the Rust syntax, but can give a good starting point.
58
65
59
-
Create a new UI test with the pattern you want to match:
66
+
First, create a new UI test file in the `tests/ui/` directory with the pattern you want to match:
60
67
61
68
```rust
62
69
// ./tests/ui/my_lint.rs
@@ -71,7 +78,7 @@ fn main() {
71
78
```
72
79
73
80
Now you run `TESTNAME=ui/my_lint cargo test --test compile-test` to produce
74
-
the file with the generated code:
81
+
a `.stdout` file with the generated code:
75
82
76
83
```rust
77
84
// ./tests/ui/my_lint.stdout
@@ -87,6 +94,8 @@ if_chain! {
87
94
}
88
95
```
89
96
97
+
If the command was executed successfully, you can copy the code over to where you are implementing your lint.
98
+
90
99
#### Documentation
91
100
92
101
Please document your lint with a doc comment akin to the following:
@@ -140,17 +149,10 @@ enabled as a plugin:
140
149
141
150
## Contributions
142
151
143
-
Clippy welcomes contributions from everyone.
144
-
145
152
Contributions to Clippy should be made in the form of GitHub pull requests. Each pull request will
146
153
be reviewed by a core contributor (someone with permission to land patches) and either landed in the
147
154
main tree or given feedback for changes that would be required.
148
155
149
156
All code in this repository is under the [Mozilla Public License, 2.0](https://www.mozilla.org/MPL/2.0/)
150
157
151
-
## Conduct
152
-
153
-
We follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html).
154
-
155
-
156
158
<!-- adapted from https://github.com/servo/servo/blob/master/CONTRIBUTING.md -->
0 commit comments