File tree 4 files changed +0
-92
lines changed
crates/ruff_python_formatter 4 files changed +0
-92
lines changed Original file line number Diff line number Diff line change 59
59
- "!crates/ruff_python_formatter/**"
60
60
- "!crates/ruff_formatter/**"
61
61
- "!crates/ruff_dev/**"
62
- - "!crates/ruff_shrinking/**"
63
62
- scripts/*
64
63
- python/**
65
64
- .github/workflows/ci.yaml
Original file line number Diff line number Diff line change @@ -133,21 +133,6 @@ python scripts/check_ecosystem.py --checkouts target/checkouts --projects github
133
133
cargo run --bin ruff_dev -- format-dev --stability-check --error-file target/formatter-ecosystem-errors.txt --multi-project target/checkouts
134
134
```
135
135
136
- ** Shrinking** To shrink a formatter error from an entire file to a minimal reproducible example,
137
- you can use ` ruff_shrinking ` :
138
-
139
- ``` shell
140
- cargo run --bin ruff_shrinking -- < your_file> target/shrinking.py " Unstable formatting" " target/debug/ruff_dev format-dev --stability-check target/shrinking.py"
141
- ```
142
-
143
- The first argument is the input file, the second is the output file where the candidates
144
- and the eventual minimized version will be written to. The third argument is a regex matching the
145
- error message, e.g. "Unstable formatting" or "Formatter error". The last argument is the command
146
- with the error, e.g. running the stability check on the candidate file. The script will try various
147
- strategies to remove parts of the code. If the output of the command still matches, it will use that
148
- slightly smaller code as starting point for the next iteration, otherwise it will revert and try
149
- a different strategy until all strategies are exhausted.
150
-
151
136
## Helper structs
152
137
153
138
To abstract formatting something into a helper, create a new struct with the data you want to
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -106,6 +106,5 @@ version_files = [
106
106
" docs/integrations.md" ,
107
107
" crates/ruff/Cargo.toml" ,
108
108
" crates/ruff_linter/Cargo.toml" ,
109
- " crates/ruff_shrinking/Cargo.toml" ,
110
109
" scripts/benchmarks/pyproject.toml" ,
111
110
]
You can’t perform that action at this time.
0 commit comments