ruff/crates
Micha Reiser 0c65d0c8a6
Add `lint` section to Ruff configuration
## Summary

This PR adds a new `lint` section to the configuration that groups all linter-specific settings. The existing top-level configurations continue to work without any warning because the `lint.*` settings are experimental. 

The configuration merges the top level and `lint.*` settings where the settings in `lint` have higher precedence (override the top-level settings). The reasoning behind this is that the settings in `lint.` are more specific and more specific settings should override less specific settings.

I decided against showing the new `lint.*` options on our website because it would make the page extremely long (it's technically easy to do, just attribute `lint` with `[option_group`]). We may want to explore adding an `alias` field to the `option` attribute and show the alias on the website along with its regular name. 

## Test Plan

* I added new integration tests
* I verified that the generated `options.md` is identical
* Verified the default settings in the playground

![Screenshot from 2023-09-22 13-52-23](https://github.com/astral-sh/ruff/assets/1203881/7b4d9689-aa88-402e-9199-9c43c8d8cc2d)
2023-09-27 08:46:27 +02:00
..
flake8_to_ruff Add `lint` section to Ruff configuration 2023-09-27 08:46:27 +02:00
ruff_benchmark Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
ruff_cache Introduce `FormatterSettings` (#7545) 2023-09-21 08:01:24 +02:00
ruff_cli Add `lint` section to Ruff configuration 2023-09-27 08:46:27 +02:00
ruff_dev Add `lint` section to Ruff configuration 2023-09-27 08:46:27 +02:00
ruff_diagnostics Create `ruff_notebook` crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_formatter Add most formatter options to `ruff.toml` / `pyproject.toml` (#7566) 2023-09-22 15:47:57 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_linter Improvement documentation around `ignore-names` globbing (#7674) 2023-09-27 04:49:41 +00:00
ruff_macros Add `lint` section to Ruff configuration 2023-09-27 08:46:27 +02:00
ruff_notebook chore: Upgrade pyproject-toml crate (#7335) 2023-09-13 17:55:03 +02:00
ruff_python_ast Allow named expressions in `__all__` assignments (#7673) 2023-09-27 00:36:55 -04:00
ruff_python_codegen Remove `Int` wrapper type from parser (#7577) 2023-09-21 17:01:44 +00:00
ruff_python_formatter Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
ruff_python_index Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
ruff_python_literal Implement our own small-integer optimization (#7584) 2023-09-25 15:13:21 +00:00
ruff_python_parser Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
ruff_python_resolver Replace `.map_or(false, $closure)` with `.is_some_and(closure)` (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic Implement our own small-integer optimization (#7584) 2023-09-25 15:13:21 +00:00
ruff_python_stdlib Use `u8` to represent version segments (#7578) 2023-09-21 14:24:51 -04:00
ruff_python_trivia Treat form feed as whitespace in `SimpleTokenizer` (#7626) 2023-09-25 14:34:59 +00:00
ruff_shrinking Bump shlex from 1.1.0 to 1.2.0 (#7381) 2023-09-14 09:40:05 -05:00
ruff_source_file Skip BOM when inserting start-of-file imports (#7622) 2023-09-23 19:36:50 +00:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Add `lint` section to Ruff configuration 2023-09-27 08:46:27 +02:00
ruff_workspace Add `lint` section to Ruff configuration 2023-09-27 08:46:27 +02:00