Add option to ignore whitespace in yaml file diff #46

Merged
merged 13 commits into from Jan 7, 2017

Projects

None yet

1 participant

@kpaulisse
Contributor
kpaulisse commented Jan 4, 2017 edited

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 added some commits Jan 4, 2017
@kpaulisse kpaulisse Stub integration test and fixture for YAML comparison code 651cb88
@kpaulisse kpaulisse Finish integration test and corresponding feature 6b4f9f2
@kpaulisse kpaulisse Add command line option for ignoring equivalent YAML files ac7d548
@kpaulisse kpaulisse Update fixtures to break the YAML parser b6ad7e3
@kpaulisse kpaulisse Implement feature to ignore YAML files that parse to equivalent objects 2eccbab
@kpaulisse kpaulisse Add spec test coverage for YAML ignorer
f70192d
@kpaulisse kpaulisse Auto-update options reference document
7f680c5
kpaulisse added some commits Jan 7, 2017
@kpaulisse kpaulisse Rewrite YAML feature as a more modular filter
afbd14f
@kpaulisse kpaulisse Fix const_get naming and write test for filter 8253f79
@kpaulisse kpaulisse Add coverage for YAML option in differ spec
fbeb740
@kpaulisse kpaulisse Move the YAML parsing option to `--filters`
557c88f
@kpaulisse kpaulisse Bump version and tweak documents 2212536
@kpaulisse kpaulisse Update changelog too
40cfc74
@kpaulisse kpaulisse merged commit 65e4457 into master Jan 7, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@kpaulisse kpaulisse deleted the kpaulisse-yaml-diff branch Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment