Skip to content

fix: show unfixable rubocop offenses on format failure#1897

Open
jar-stripe wants to merge 1 commit into
masterfrom
jar/format-diagnostic
Open

fix: show unfixable rubocop offenses on format failure#1897
jar-stripe wants to merge 1 commit into
masterfrom
jar/format-diagnostic

Conversation

@jar-stripe

@jar-stripe jar-stripe commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Why?

When codegen runs just format and rubocop can't autocorrect everything (e.g. a string literal exceeds the 120-char line limit), the format step fails with no useful output. This is because rubocop's autocorrect report is suppressed with -o /dev/null to avoid crashing sdk-codegen with its overwhelming output.

What?

  • Modifies justfile to remove -o /dev/null and adds --display-only-fail-level-offenses to format recipe

See Also

Replace `-o /dev/null` with `--display-only-fail-level-offenses`. This
suppresses the ~1.5MB report of corrected offenses (which would overflow
the caller's buffer) while still showing uncorrectable offenses directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
@jar-stripe jar-stripe force-pushed the jar/format-diagnostic branch from 19b603f to 7a93f78 Compare June 24, 2026 19:21
@jar-stripe jar-stripe marked this pull request as ready for review June 24, 2026 20:20
@jar-stripe jar-stripe requested a review from a team as a code owner June 24, 2026 20:20
@jar-stripe jar-stripe requested review from Copilot and justiny-stripe and removed request for a team June 24, 2026 20:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves diagnostics from just format when RuboCop autocorrect can’t fix everything, aiming to surface the remaining unfixable offenses instead of failing with little/no output.

Changes:

  • Updates the format recipe to run RuboCop autocorrect with a flag intended to suppress non-failing output and show only fail-level offenses.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread justfile
@jar-stripe jar-stripe enabled auto-merge (squash) June 24, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants