are naming our new lint `foo_functions` (lints are generally written in snake
case), and we don't need type information so it will have an early pass type
(more on this later on). To get started on this lint you can run
-`./util/dev new_lint --name=foo_functions --pass=early --category=pedantic`
+`cargo dev new_lint --name=foo_functions --pass=early --category=pedantic`
(category will default to nursery if not provided). This command will create
two files: `tests/ui/foo_functions.rs` and `clippy_lints/src/foo_functions.rs`,
-as well as run `./util/dev update_lints` to register the new lint. Next, we'll
+as well as run `cargo dev update_lints` to register the new lint. Next, we'll
open up these files and add our lint!
### Testing
lint code is. This file has already imported some initial things we will need:
```rust
-use rustc::lint::{LintArray, LintPass, EarlyLintPass, EarlyContext};
+use rustc_lint::{EarlyLintPass, EarlyContext};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use syntax::ast::*;
```
rustup component add rustfmt --toolchain=nightly
```
-Use `./util/dev fmt` to format the whole codebase. Make sure that `rustfmt` is
+Use `cargo dev fmt` to format the whole codebase. Make sure that `rustfmt` is
installed for the nightly toolchain.
### Debugging
- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
-- [ ] Executed `./util/dev update_lints`
+- [ ] Executed `cargo dev update_lints`
- [ ] Added lint documentation
-- [ ] Run `./util/dev fmt`
+- [ ] Run `cargo dev fmt`
### Cheatsheet