Drop leading space, highlight empty lines, highlight whitespace errors #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #179 cc @phillipwood
Unless
--keep-plus-minus-markers
is in effect, drop the first column so that the real code starts in the first column.Highlight addition of trailing whitespace as a whitespace error (i.e. git's
blank-at-eol
). Style determined by new option--whitespace-error-style
which defaults to git'scolor.diff.whitespace
.Highlight removals and additions of empty lines with background color in the first column if these would not otherwise be visible (i.e. if the applicable style lacks a background color). Style determined by new options
--minus-empty-line-marker-style
and--plus-empty-line-marker-style
.Additions of empty lines at end-of-file are not currently highlighted as whitespace errors, but rather as normal addition-of-empty line. This is contra git's
blank-at-eof
and is a bug to be addressed in subsequent work.See git documentation: https://git-scm.com/docs/git-config#Documentation/git-config.txt-corewhitespace