Skip to content

Commit a540933

Browse files
authored
Print log when formatter ecosystem checks fail (#6187)
**Summary** Print the errors when the formatter ecosystem checks failed. Im not happy that we current collect the log in the first place, but this is the less invasive change and we need it to unblock reviewing #6152. **Test Plan** https://github.com/astral-sh/ruff/actions/runs/5713112075/job/15477879403?pr=6188
1 parent 311a1f9 commit a540933

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/ruff_python_formatter/src/expression/expr_subscript.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl FormatNodeRule<ExprSubscript> for FormatExprSubscript {
2727
let dangling_comments = comments.dangling_comments(item.as_any_node_ref());
2828
debug_assert!(
2929
dangling_comments.len() <= 1,
30-
"The subscript expression must have at most a single comment, the one after the bracket"
30+
"A subscript expression can only have a single dangling comment, the one after the bracket"
3131
);
3232

3333
if let NodeLevel::Expression(Some(group_id)) = f.context().node_level() {

scripts/formatter_progress.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,9 @@ fi
5151
# for i in "$dir"/*/; do git -C "$i" switch main && git -C "$i" pull && echo "# $(basename "$i") $(git -C "$i" rev-parse HEAD)"; done
5252

5353
time cargo run --bin ruff_dev -- format-dev --stability-check --error-file "$target/progress_projects_errors.txt" \
54-
--multi-project "$dir" >"$target/progress_projects_report.txt"
54+
--multi-project "$dir" >"$target/progress_projects_report.txt" || (
55+
echo "Ecosystem check failed"
56+
cat "$target/progress_projects_report.txt"
57+
exit 1
58+
)
5559
grep "similarity index" "$target/progress_projects_report.txt" | sort

0 commit comments

Comments
 (0)