Commit Graph

141 Commits

Author SHA1 Message Date
Jonathan Plasse d6a100028c
Update docs and pre-commit after #3006 (#3038) 2023-02-19 14:23:01 -05:00
Jonathan Plasse db4c611c6f
Fix broken links and markdown style (#3017) 2023-02-19 08:46:49 -05:00
trag1c 0e53ddc2b3
Added Tables of Contents for CONTRIBUTING.md and CODE_OF_CONDUCT.md (#2824) 2023-02-12 16:38:18 -05:00
trag1c b8835c2e35
Added MkDocs section to CONTRIBUTING.md (#2803) 2023-02-12 16:07:24 +00:00
Martin Fischer 0bab642f5a Describe rule naming convention in CONTRIBUTING.md 2023-02-10 09:25:29 -05:00
Charlie Marsh d4e5639aaf
Add `flake8-pyi` to `CONTRIBUTING.md` 2023-02-09 19:04:55 -05:00
Florian Best 3862dc2626
docs: use new command line arguments (#2658) 2023-02-08 10:36:53 -05:00
Charlie Marsh 2a0927a5ef Update Discord link 2023-02-08 04:36:59 -05:00
Charlie Marsh 87d0aa5561
Move `python` into its own `ruff_python` crate (#2593) 2023-02-05 17:53:58 -05:00
Charlie Marsh f40b974206
Add a description of project structure (#2590) 2023-02-05 17:01:09 -05:00
Micha Reiser cd8be8c0be
refactor: Introduce crates folder (#2088)
This PR introduces a new `crates` directory and moves all "product" crates into that folder. 

Part of #2059.
2023-02-05 16:47:48 -05:00
Charlie Marsh b9c1a3c5c1
Move benchmarking instructions to CONTRIBUTING.md (#2554) 2023-02-03 14:53:53 -05:00
Charlie Marsh 06cbf5a2ae
Add some top-level links to the README (#2458) 2023-02-01 19:10:41 -05:00
Florian Best 7f44ffb55c
docs(CONTRIBUTING): add instructions how to update the test snapshots (#2412) 2023-02-01 07:44:20 -05:00
Simon Brugman 4f067d806e
add clippy and rust_dev to pre-commit (#2256)
I presume the reasoning for not including clippy in `pre-commit` was that it passes all files. This can be turned off with `pass_filenames`, in which case it only runs once.

`cargo +nightly dev generate-all` is also added (when excluding `target` is does not give false positives).

(The overhead of these commands is not much when the build is there. People can always choose to run only certain hooks with `pre-commit run [hook] --all-files`)
2023-01-27 18:53:44 -05:00
Charlie Marsh 0b34ca7107
Move off nightly Rust for dev workflows (#2278) 2023-01-27 18:35:19 -05:00
Martin Fischer f6fd702d41 Add #![warn(clippy::pedantic)] to lib.rs and main.rs files
We already enforced pedantic clippy lints via the
following command in .github/workflows/ci.yaml:

    cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::pedantic

Additionally adding #![warn(clippy::pedantic)] to all main.rs and lib.rs
has the benefit that violations of pedantic clippy lints are also
reported when just running `cargo clippy` without any arguments and
are thereby also picked up by LSP[1] servers such as rust-analyzer[2].
However for rust-analyzer to run clippy you'll have to configure:

    "rust-analyzer.check.command": "clippy",

in your editor.[3]

[1]: https://microsoft.github.io/language-server-protocol/
[2]: https://rust-analyzer.github.io/
[3]: https://rust-analyzer.github.io/manual.html#configuration
2023-01-25 00:40:29 -05:00
Charlie Marsh 9d2eced941 Add flake8-simplify to CONTRIBUTING.md 2023-01-22 21:46:52 -05:00
Charlie Marsh be0f6acb40 Change contributing to point to tryceratops 2023-01-22 21:45:20 -05:00
Martin Fischer 7fc42f8f85 refactor: Rename RuleOrigin to Linter
"origin" was accurate since ruff rules are currently always modeled
after one origin (except the Ruff-specific rules).

Since we however want to introduce a many-to-many mapping between codes
and rules, the term "origin" no longer makes much sense. Rules usually
don't have multiple origins but one linter implements a rule first and
then others implement it later (often inspired from another linter).
But we don't actually care much about where a rule originates from when
mapping multiple rule codes to one rule implementation, so renaming
RuleOrigin to Linter is less confusing with the many-to-many system.
2023-01-20 20:25:57 -05:00
Aarni Koskela bd2de5624e
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 😄
2023-01-20 09:23:28 -05:00
Charlie Marsh 64b398c72b Tweak some instructions in CONTRIBUTING.md 2023-01-19 17:17:39 -05:00
Edgar R. M c880d744fd
Implement `flake8-no-pep420` (#1942)
Closes https://github.com/charliermarsh/ruff/issues/1844.
2023-01-17 22:10:32 -05:00
Charlie Marsh 643cedb200
Move CONTRIBUTING.md to top-level (#1768) 2023-01-10 07:38:12 -05:00
Charlie Marsh 5ed58ae595
Add requested context to issue template (#1679) 2023-01-06 07:29:08 -05:00
Charlie Marsh 4473c7e905 Update stale references in CONTRIBUTING.md 2023-01-03 23:44:10 -05:00
Charlie Marsh 3b535fcc74
Add explicit new-rule recommendation in CONTRIBUTING.md (#1558) 2023-01-02 13:50:11 -05:00
Pedram Navid 07e47bef4b
Add flake8-simplify SIM300 check for Yoda Conditions (#1539) 2023-01-01 18:37:40 -05:00
Martin Fischer e9ec2a7b36 Add `use test_case::test_case;` to CONTRIBUTING.md
I previously tried adding the #[test_case()] attribute macro and got
confused because the Rust compilation suddenly failed with:

    error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature

which is a quite confusing error message.  The solution is to just add
`use test_case::test_case;`, so this commit adds that line to the
example in CONTRIBUTING.md to spare others this source of confusion.
2022-12-30 07:13:48 -05:00
Martin Fischer b0bb75dc1c Add --select to command suggested in CONTRIBUTING.md
By default only E* and F* lints are enabled. I previously followed the
CONTRIBUTING.md instructions to implement a TID* lint and was confused
why my lint wasn't being run.
2022-12-30 07:13:48 -05:00
Charlie Marsh b4dbe62da0
Add cargo +nightly dev generate-all (#1404) 2022-12-27 10:07:18 -05:00
Reiner Gerecke e0b39fa63e
Implement pyupgrade check for io.open alias (#1399) 2022-12-27 07:47:40 -05:00
Edgar R. M 4888afd423
Generate JSON schema for Ruff options (#1329) 2022-12-24 14:10:22 -05:00
Colin Delahunty d4290e6721
Update CONTRIBUTING.md (#1344) 2022-12-22 21:04:19 -05:00
Edgar R. M ea550abd3c
Implement `flake8-import-conventions` (#1098) 2022-12-06 16:01:17 -05:00
Edgar R. M f44fada446
Implement C901 (mccabe) (#765) 2022-11-17 17:40:50 -05:00
Charlie Marsh cea9e34942
Update CONTRIBUTING.md (#623) 2022-11-06 14:31:16 -05:00
Reiner Gerecke 1ede377402
Improve discoverability of dev commands (#621) 2022-11-06 14:25:59 -05:00
Reiner Gerecke c48c7669a8
Remove rust version from CONTRIBUTING.md (#605) 2022-11-05 15:03:10 -04:00
Adrian Garcia Badaracco a70624cd47
add instructions for setting up cargo insta (#334) 2022-10-06 08:01:11 -04:00
Charlie Marsh 5a1b6c32eb
Add CONTRIBUTING.md (#288) 2022-09-30 07:51:30 -04:00