migra icon indicating copy to clipboard operation
migra copied to clipboard

Add --ignore-newlines option

Open pferreir opened this issue 5 years ago • 4 comments

I apologize for opening a PR directly, but this was simple enough that it would be easier to explain it with an actual example. This is an attempt at solving the issue described in https://github.com/djrobstep/schemainspect/pull/33. I'm adding an --ignore-newlines option as suggested by @djrobstep, which is propagated down to the function comparison function (done by https://github.com/djrobstep/schemainspect/pull/37).

I'm willing to improve the PR, if you wish to follow this route.

pferreir avatar Dec 10 '19 11:12 pferreir

Thanks for making a start on this! IMO this would be better named --normalise-newlines, since newlines are still significant to the comparison, they're just normalised to a standard entity.

gregplaysguitar avatar Dec 13 '19 04:12 gregplaysguitar

Yep, I agree that normalise is more accurate as a description

djrobstep avatar Dec 13 '19 05:12 djrobstep

what about normalize? I think in almost all other programs CLI options use the en_US versions, so users are likely to get it wrong if migra expects en_GB

ThiefMaster avatar Dec 13 '19 08:12 ThiefMaster

Yep, -ize definitely the preferred spelling

djrobstep avatar Dec 13 '19 10:12 djrobstep