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

category of YAML diff? #238

Open
pavt opened this issue Aug 8, 2022 · 1 comment
Open

category of YAML diff? #238

pavt opened this issue Aug 8, 2022 · 1 comment

Comments

@pavt
Copy link

pavt commented Aug 8, 2022

Hey all, thanks for this great tool!

Can you please help me with the following questions?:

  • How can I get diff types from YAML files?
  • Is there a set of categories for this? Docs?

I have been looking for docs for this, but I didn't find it.

Thank you

@HeavyWombat
Copy link
Member

HeavyWombat commented Aug 8, 2022

Hello, I am not sure I fully understand the question. Is it about what kind of differences dyff can detect and report? So far, I have not considered documenting internals in a separate document. Mostly, because I kind of wrote the tool around use cases we had. Roughly speaking, it differentiates additions, removals, and modifications. The respective reporting style can show those differences more detailed.

Out of the top my head, the default human output has the following differences it detects:

  • new content added
  • content removed
  • type changed (i.e. from number to string), this is helpful to find accidental type changes
  • order in list changes (sometimes crucial, depends on the use case)
  • certificate changes (tool does decode the certificate to compare individual fields)
  • whitespace only changes (killer feature in the BOSH world, where such simple changes could trigger a deployment)
  • line change in multi-line strings
  • minor changes in texts (only a few characters were changed), useful for TYPO detection

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

No branches or pull requests

2 participants