Skip to content

Improve --update-data #15265

Closed
Closed

Description

@ikonst

Current --update-data is somewhat crude:

  • works by search and replace of substrings
  • handles only errors, not warnings or notices
  • only changes existing notes, does not add/remove notes
  • does not handle multiline notes

While handling all sorts of data suites is a large undertaking, I think we can do a better job for 'check' tests. I have some rudimentary code (that I used privately for a PR that caused a lot of changes) and I wanted to gauge interest on contributing it.

p.s. I agree "snapshots tests", at their worst, can result in cavalier approach to test failures. I hope code reviews can compensate for this. The downside to not having an efficient update mechanism is withholding beneficial refactors due to the cost associated.

Activity

  1. JelleZijlstra commented on May 18, 2023

    @JelleZijlstra
    Member

    Sounds like a good idea! PRs that improve error messages often need a lot of tweaks to tests, so it's good to make that easier.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions