mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 15:15:33 +00:00
![]() Summary -- As @AlexWaygood noted on the 0.12 release blog post draft, the existing example is a bit confusing. Either `**/*.py` or just `*.py`, as I went with here, makes more sense, although the old version (`scripts/**.py`) also worked when I tested it. However, this probably shouldn't be relied upon since the [globset](https://docs.rs/globset/latest/globset/#syntax) docs say: > Using ** anywhere else is illegal where "anywhere else" comes after the listing of the three valid positions: 1. At the start of a pattern (`**/`) 2. At the end of a pattern (`/**`) 3. Or directly between two slashes (`/**/`) I think the current version is luckily treated the same as a single `*`, and the default globbing settings allow it to match subdirectories such that the new example pattern will apply to the whole `scripts` tree in a project like this: ``` . ├── README.md ├── pyproject.toml ├── scripts │ ├── matching.py │ └── sub │ └── nested.py └── src └── main.py ``` Test Plan -- Local testing of the new pattern, but the specifics of the pattern aren't as important as having a more intuitive-looking/correct example. |
||
---|---|---|
.. | ||
ruff | ||
ruff_annotate_snippets | ||
ruff_benchmark | ||
ruff_cache | ||
ruff_db | ||
ruff_dev | ||
ruff_diagnostics | ||
ruff_formatter | ||
ruff_graph | ||
ruff_index | ||
ruff_linter | ||
ruff_macros | ||
ruff_notebook | ||
ruff_options_metadata | ||
ruff_python_ast | ||
ruff_python_ast_integration_tests | ||
ruff_python_codegen | ||
ruff_python_formatter | ||
ruff_python_index | ||
ruff_python_literal | ||
ruff_python_parser | ||
ruff_python_resolver | ||
ruff_python_semantic | ||
ruff_python_stdlib | ||
ruff_python_trivia | ||
ruff_python_trivia_integration_tests | ||
ruff_server | ||
ruff_source_file | ||
ruff_text_size | ||
ruff_wasm | ||
ruff_workspace | ||
ty | ||
ty_ide | ||
ty_project | ||
ty_python_semantic | ||
ty_server | ||
ty_test | ||
ty_vendored | ||
ty_wasm |