Skip to content

Add option to ignore whitespace in yaml file diff#46

Merged
kpaulisse merged 13 commits intomasterfrom
kpaulisse-yaml-diff
Jan 7, 2017
Merged

Add option to ignore whitespace in yaml file diff#46
kpaulisse merged 13 commits intomasterfrom
kpaulisse-yaml-diff

Conversation

@kpaulisse
Copy link
Contributor

@kpaulisse kpaulisse commented Jan 4, 2017

During some Puppet 3.x to 4.x updates, we've observed that YAML files we generate within Puppet using the ruby libraries can exhibit different white-space characteristics, but the parsed YAML objects are identical.

This PR adds a new option --filters YAML which will further compare the content of any changes to files with an extension .yml or .yaml and ignore the change if the files parse to the same objects. (Note: In the future, additional filtering options like this will be added to --filters instead of having their own named option.)

This should probably be used sparingly and situationally, because you'll also lose reporting on changes to comments (if you care).

@kpaulisse kpaulisse merged commit 65e4457 into master Jan 7, 2017
@kpaulisse kpaulisse deleted the kpaulisse-yaml-diff branch January 7, 2017 19:13
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.

1 participant