|
2 | 2 |
|
3 | 3 | 1. Fork it!
|
4 | 4 | 2. Create your feature branch: `git checkout -b my-new-feature`
|
5 |
| -3. Commit your changes: `git commit -am 'Add some feature'` |
6 |
| -4. Push to the branch: `git push origin my-new-feature` |
7 |
| -5. Submit a pull request :D |
| 5 | +3. Test it: `cargo test` |
| 6 | +4. Lint it: `cargo +nightly clippy --all-targets -- -D warnings` |
| 7 | +5. Commit your changes: `git commit -am 'Add some feature'` |
| 8 | +6. Push to the branch: `git push origin my-new-feature` |
| 9 | +7. Submit a pull request :D |
8 | 10 |
|
9 | 11 | For developing on `rustup` itself, you may want to install into a temporary
|
10 | 12 | directory, with a series of commands similar to this:
|
@@ -60,6 +62,34 @@ The `rustup::currentprocess` module abstracts the global state that is
|
60 | 62 | `std::env::current_dir` and `std::process::exit` permitting threaded tests of
|
61 | 63 | the CLI logic; use `process()` rather than those APIs directly.
|
62 | 64 |
|
| 65 | +### Clippy lints |
| 66 | + |
| 67 | +We do not enforce lint status in the checks done by GitHub Actions, because |
| 68 | +clippy is a moving target that can make it hard to merge for little benefit. |
| 69 | + |
| 70 | +We do ask that contributors keep the clippy status clean themselves. |
| 71 | + |
| 72 | +Minimally, run `cargo +nightly clippy --all-targets -- -D warnings` before |
| 73 | +submitting code. |
| 74 | + |
| 75 | +Regular contributors or contributors to particularly OS-specific code should |
| 76 | +also make sure that their clippy checking is done on at least Linux and Windows, |
| 77 | +as OS-conditional code is a common source of unused imports and other small |
| 78 | +lints, which can build up over time. |
| 79 | + |
| 80 | +For developers using BSD/Linux/Mac OS, there are Windows VM's suitable for such |
| 81 | +development tasks for use with virtualbox and other hypervisors are downloadable |
| 82 | +from |
| 83 | +[Microsoft](https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/). |
| 84 | +Similarly, there are many Linux and Unix operating systems images available for |
| 85 | +developers whose usual operating system is Windows. Currently Rustup has no Mac |
| 86 | +OS specific code, so there should be no need to worry about Mac VM images. |
| 87 | + |
| 88 | +Clippy is also run in GitHub Actions, in the 'General Checks / Checks` build |
| 89 | +task, but not currently run per-platform, which means there is no way to find |
| 90 | +out the status of clippy per platform without running it on that platform as a |
| 91 | +developer. |
| 92 | + |
63 | 93 | ## Version numbers
|
64 | 94 |
|
65 | 95 | If you ever see a released version of rustup which has `::` in its version string
|
|
0 commit comments