Skip to content

Add --ignore-errors option to spoom srb tc#879

Open
Morriar wants to merge 1 commit into
mainfrom
at-tc-ignore-errors
Open

Add --ignore-errors option to spoom srb tc#879
Morriar wants to merge 1 commit into
mainfrom
at-tc-ignore-errors

Conversation

@Morriar
Copy link
Copy Markdown
Contributor

@Morriar Morriar commented Mar 30, 2026

Summary

  • Add --ignore-errors option to spoom srb tc to ignore known errors by matching error_code:file:line from an ignore file
  • Default ignore file location: sorbet/ignored_errors.cfg (auto-detected when present)
  • Ignored errors are hidden from output, shown as a count in the summary (e.g. Errors: 2 ignored, 7 total), and don't cause a non-zero exit code
  • Supports # comments and blank lines in the ignore file

Ignore file format

# Comments supported
5002:errors/errors.rb:5
7003:errors/errors.rb:11

Test plan

  • All errors ignored → exit 0, summary shows X ignored, Y total
  • Partial match → exit 1, only non-ignored errors displayed
  • Custom path via --ignore-errors=path
  • Comments and blank lines in ignore file
  • No ignore file → existing behavior unchanged (29 tests pass)

@Morriar Morriar force-pushed the at-tc-ignore-errors branch 5 times, most recently from e9a6a1d to 2860bfe Compare March 30, 2026 20:53
Allow ignoring known errors by matching error_code:file:line from an
ignore file (default: sorbet/ignored_errors.cfg). Ignored errors are
hidden from output, shown as a count in the summary, and don't cause
a non-zero exit code.
@Morriar Morriar force-pushed the at-tc-ignore-errors branch from 2860bfe to 95dfd76 Compare March 30, 2026 20:56
@amomchilov amomchilov marked this pull request as ready for review May 19, 2026 15:53
@amomchilov amomchilov requested a review from a team as a code owner May 19, 2026 15:53
@amomchilov amomchilov added enhancement New feature or request feature New feature labels May 19, 2026
Comment thread lib/spoom/cli/srb/tc.rb
stale = ignored_errors - matched
unless stale.empty?
stale.each do |entry|
say_error("Stale entry in ignore file: #{entry[0]}:#{entry[1]}:#{entry[2]}", status: nil)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like we exit early if result.status above. So stale information is only printed if there are errors, is this intentional? I feel like we should always try to keep the list up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants