facebookarchive / codemod

Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention. Codemod was developed at Facebook and released as open source.
Apache License 2.0
4.12k stars 197 forks source link

[Formatting] Clean up extra newlines and spaces in suggested patches #86

Closed ide closed 7 years ago

ide commented 7 years ago

Cleans up the formatting of suggested patches by removing spurious newlines in unmodified lines and removing spaces in front of the first line of the contextual snippet and the green "+" line.

Before: before

After: after

Test Plan: Run python setup.py install -f and run codemod in a directory, output is noticeably cleaner.

modocache commented 7 years ago

Looks great, thanks! Looks like some unrelated linter errors are causing CI to fail, gotta take care of that sometime.