lint - Is there a GIT api that can tell if a specific line of a file has a whitespace only change -
is there git api can tell if specific line (say given line no.) of file has whitespace change? i'm writing rule in lint (arcanistlinter) alert if lines have whitespace changes, , they're not adjacent real change (say got modified editor).
not exactly. there is, however, way request diff omits whitespace-only changes:
git diff --ignore-space-change
this omit lines whitespace changed (with exception of creating whitespace in between 2 non-whitespace tokens adjacent, e.g. foobar
-> foo bar
).
you compare diff result regular diff find items present in latter not former.
Comments
Post a Comment