Skip to content
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

Add option to specify custom snapshot differ #64

Merged
merged 4 commits into from Sep 14, 2022

Conversation

smitt04
Copy link
Contributor

@smitt04 smitt04 commented Jun 8, 2020

I have a go struct with a large string member and when diffed it looks pretty ugly and hard to read as the new lines are not interpreted and it thinks the file is a single line.

So I added the ability to add a custom differ as I prefer to use go-cmp.

Copy link
Owner

@bradleyjkemp bradleyjkemp left a comment

Choose a reason for hiding this comment

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

Thanks @smitt04 this looks great! You're right, difflib won't work very well for large string fields so having this flexibility would be useful 🙂

I've just suggested a small wording change to make it clear that this is purely a UI option and doesn't affect snapshot comparison.

config.go Outdated Show resolved Hide resolved
smitt04 and others added 2 commits September 13, 2022 14:00
Co-authored-by: Bradley Kemp <bradleyjkemp@users.noreply.github.com>
@bradleyjkemp bradleyjkemp merged commit bae0788 into bradleyjkemp:master Sep 14, 2022
yevgenypats pushed a commit to cloudquery/plugin-sdk that referenced this pull request Oct 4, 2022
…#215)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/bradleyjkemp/cupaloy/v2](https://togithub.com/bradleyjkemp/cupaloy)
| require | minor | `v2.7.0` -> `v2.8.0` |

---

### Release Notes

<details>
<summary>bradleyjkemp/cupaloy</summary>

###
[`v2.8.0`](https://togithub.com/bradleyjkemp/cupaloy/releases/tag/v2.8.0)

[Compare
Source](https://togithub.com/bradleyjkemp/cupaloy/compare/v2.7.0...v2.8.0)

#### What's Changed

- Add option to specify custom snapshot differ by
[@&#8203;smitt04](https://togithub.com/smitt04) in
[bradleyjkemp/cupaloy#64

#### New Contributors

- [@&#8203;smitt04](https://togithub.com/smitt04) made their first
contribution in
[bradleyjkemp/cupaloy#64

**Full Changelog**:
bradleyjkemp/cupaloy@v2.7.0...v2.8.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 3am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click
this checkbox.

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xODUuMyIsInVwZGF0ZWRJblZlciI6IjMyLjE4NS4zIn0=-->

Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
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.

None yet

2 participants