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

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -