Move readme dev details to CONTRIBUTING.md and fix contradictions (#2030)

Following up on #2018/#2019 discussion, this moves the readme's development-related bits to `CONTRIBUTING.md` to avoid duplication, and fixes up the commands accordingly 😄
This commit is contained in:
Aarni Koskela 2023-01-20 16:23:28 +02:00 committed by GitHub
parent 3a81f893cc
commit bd2de5624e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 28 deletions

View File

@ -37,13 +37,16 @@ After cloning the repository, run Ruff locally with:
cargo run resources/test/fixtures --no-cache cargo run resources/test/fixtures --no-cache
``` ```
Prior to opening a pull request, ensure that your code has been auto-formatted, and that it passes Prior to opening a pull request, ensure that your code has been auto-formatted,
both the lint and test validation checks: and that it passes both the lint and test validation checks.
For rustfmt and Clippy, we use [nightly Rust][nightly], as it is stricter than stable Rust.
(However, tests and builds use stable Rust.)
```shell ```shell
cargo +nightly fmt --all # Auto-formatting... cargo +nightly fmt --all # Auto-formatting...
cargo +nightly clippy --all # Linting... cargo +nightly clippy --fix --workspace --all-targets --all-features -- -W clippy::pedantic # Linting...
cargo +nightly test --all # Testing... cargo test --all # Testing...
``` ```
These checks will run on GitHub Actions when you open your Pull Request, but running them locally These checks will run on GitHub Actions when you open your Pull Request, but running them locally
@ -127,3 +130,5 @@ them to [PyPI](https://pypi.org/project/ruff/).
Ruff follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software, Ruff follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software,
even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4).
[nightly]: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust

View File

@ -141,12 +141,11 @@ developer of [Zulip](https://github.com/zulip/zulip):
1. [Ruff-specific rules (RUF)](#ruff-specific-rules-ruf)<!-- End auto-generated table of contents. --> 1. [Ruff-specific rules (RUF)](#ruff-specific-rules-ruf)<!-- End auto-generated table of contents. -->
1. [Editor Integrations](#editor-integrations) 1. [Editor Integrations](#editor-integrations)
1. [FAQ](#faq) 1. [FAQ](#faq)
1. [Development](#development) 1. [Contributing](#contributing)
1. [Releases](#releases) 1. [Releases](#releases)
1. [Benchmarks](#benchmarks) 1. [Benchmarks](#benchmarks)
1. [Reference](#reference) 1. [Reference](#reference)
1. [License](#license) 1. [License](#license)
1. [Contributing](#contributing)
## Installation and Usage ## Installation and Usage
@ -1641,24 +1640,10 @@ matter how they're provided, which avoids accidental incompatibilities and simpl
Run `ruff /path/to/code.py --show-settings` to view the resolved settings for a given file. Run `ruff /path/to/code.py --show-settings` to view the resolved settings for a given file.
## Development ## Contributing
Ruff is written in Rust (1.65.0). You'll need to install the [Rust toolchain](https://www.rust-lang.org/tools/install) Contributions are welcome and hugely appreciated. To get started, check out the
for development. [contributing guidelines](https://github.com/charliermarsh/ruff/blob/main/CONTRIBUTING.md).
Assuming you have `cargo` installed, you can run:
```shell
cargo run resources/test/fixtures
```
For rustfmt and Clippy, we use [nightly Rust](https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust):
```shell
cargo +nightly fmt
cargo +nightly clippy --fix --workspace --all-targets --all-features -- -W clippy::pedantic
cargo test --all
```
## Releases ## Releases
@ -3458,8 +3443,3 @@ keep-runtime-typing = true
## License ## License
MIT MIT
## Contributing
Contributions are welcome and hugely appreciated. To get started, check out the
[contributing guidelines](https://github.com/charliermarsh/ruff/blob/main/CONTRIBUTING.md).