Skip to content

Conversation

@satorstefan
Copy link
Contributor

@satorstefan satorstefan commented Jan 29, 2026

This should be small

Small pull requests are great and easy for me to understand and accept
Please try prefix every commits in the pull request with Arlo's git notation

Prefix Meaning
e development enviroment only - not production
d documentation only
t tests only
R!! Refactoring
B!! Bug Fix
F!! New Feature

But it's not small!

Then you should setup a remote pairing session with Llewellyn ( llewellyn.falco@gmail.com )
Usually the sessions are between 45-90 minutes.

assuming you still feel it is small, please include

Description

A description of what the PR achieves.

The solution

Outline the implementation.
Any tests that are affected.

Notation

I prefer lots of very small commits prefixed with Arlo's git notation

Summary by Sourcery

Improve DateScrubber’s error message when a date format is not found and add test coverage for the new message.

Enhancements:

  • Refine DateScrubber’s no-match error message to clearly list supported date format patterns on separate lines.

Tests:

  • Add a regression test and approved output file to verify the DateScrubber no-match error message.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 29, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Improves the error/help message produced by DateScrubber when no matching date format is found, and adds a focused test to lock in the new message formatting.

File-Level Changes

Change Details Files
Improve DateScrubber 'no match found' exception message formatting to be more readable and list supported formats line-by-line.
  • Adjust exception message text to remove unnecessary leading spaces after newlines.
  • Change supported formats section to include a header line followed by each regex on its own indented line.
  • Use Query.select(...).join("\n\t") so the supported format regexes are joined with newlines and indentation for display.
approvaltests/src/main/java/org/approvaltests/scrubbers/DateScrubber.java
Add test coverage to verify the new 'date format not found' exception message.
  • Add a JUnit test method that calls DateScrubber.getScrubberFor with a non-existent format and verifies the thrown exception via Approvals.verifyException.
  • Configure the test to use AutoApproveReporter for easier approval workflow.
  • Introduce a new approved text file capturing the expected exception message output.
approvaltests-tests/src/test/java/org/approvaltests/scrubbers/DateScrubberTest.java
approvaltests-tests/src/test/java/org/approvaltests/scrubbers/DateScrubberTest.testDateFormatNotFoundMessage.approved.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@isidore isidore merged commit 4e97bea into approvals:master Jan 29, 2026
14 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The exception message hard-codes a specific GitHub issue URL (issues/112), which may become outdated; consider linking to a more stable contribution/docs page or a generic "new issue" URL instead so the guidance remains valid over time.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The exception message hard-codes a specific GitHub issue URL (`issues/112`), which may become outdated; consider linking to a more stable contribution/docs page or a generic "new issue" URL instead so the guidance remains valid over time.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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