google / google/go-cmp

Automatically increase diff verbosity up to some threshold budget

Open
#264 15 comments 16 reactions 0 assignees View on GitHub
reporter
Dominant language
Go
Stars
4.7k
Forks
243
PR merge metrics
No merged PRs in 30d

Description

Hi there!

First off, thanks for this project, it is super helpful when writing tests!

One thing that regularly bothers me though is that the generated diff gets pruned. One example I have right now is this:

```
- nil,
+ {
+ {
+ Added: []*api.ReleaseBuildConfiguration{&{...}},
+ Removed: []*api.ReleaseBuildConfiguration{&{...}},
+ },
+ },
)
```

This is somewhat useless. In order to get a more helpful output, I need to change one of the two variables I am comparing to be more similiar to the other, otherwise I won't even see the ouput. What I would like is an option to tell cmp "Do not prune anything from output, just show me the full diff"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.