-
-
Notifications
You must be signed in to change notification settings - Fork 754
fix(diagnostic): avoid emitting dim-only indent lines #12461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspack canceled.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 128bytes from 48.19MB to 48.19MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12461 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where ANSI dim escape sequences were unnecessarily applied to whitespace-only indentation in error output. The change ensures that dim styling is only applied when there is visible content (the vertical bar character), not just spaces.
- Refactored the
rest_indentassignment to conditionally apply dim styling based on whether there's visible content - When
is_lastis true, plain whitespace is used instead of dimmed whitespace - When
is_lastis false, the vertical bar character with surrounding spaces remains dimmed as before
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This change avoids emitting ANSI dim escape sequences that contain only whitespace in error output.
Previously, the formatter could produce dimmed indentation without any visible content (
\u001b[2m \u001b[0m). This update ensures that dim is only applied when there is meaningful visible content.Checklist