mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
9fa6bdd764
Add support for tidy linting via external tools for non-rust files This change adds the flag `--check-extras` to `tidy`. It accepts a comma separated list of any of the options: * py (test everything applicable for python files) * py:lint (lint python files using `ruff`) * py:fmt (check formatting for python files using `black`) * shell or shell:lint (lint shell files using `shellcheck`) Specific files to check can also be specified via positional args. Examples: * `./x test tidy --check-extras=shell,py` * `./x test tidy --check-extras=py:fmt -- src/bootstrap/bootstrap.py` * `./x test tidy --check-extras=shell -- src/ci/*.sh` * Python formatting can be applied with bless: `./x test tidy --ckeck-extras=py:fmt --bless` `ruff` and `black` need to be installed via pip; this tool manages these within a virtual environment at `build/venv`. `shellcheck` needs to be installed on the system already. --- This PR doesn't fix any of the errors that show up (I will likely go through those at some point) and it doesn't enforce anything new in CI. Relevant zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Other.20linters.20in.20CI |
||
---|---|---|
.. | ||
completions | ||
installer | ||
natvis | ||
test-float-parse | ||
third-party | ||
cat-and-grep.sh | ||
CONFIGS.md | ||
cpu-usage-over-time-plot.sh | ||
ctags.rust | ||
dec2flt_table.py | ||
gdb_load_rust_pretty_printers.py | ||
gdb_lookup.py | ||
gdb_providers.py | ||
generate-deriving-span-tests.py | ||
generate-keyword-tests.py | ||
htmldocck.py | ||
indenter | ||
lldb_batchmode.py | ||
lldb_commands | ||
lldb_lookup.py | ||
lldb_providers.py | ||
pre-push.sh | ||
rust_analyzer_settings.json | ||
rust_types.py | ||
rust-gdb | ||
rust-gdbgui | ||
rust-lldb | ||
rust-windbg.cmd | ||
wasm32-shim.js |