Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

Re: [PATCH 1/2] War on whitespace: first, a bit of retreat.

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:46

David Symonds wrote:
On 11/2/07, Andreas Ericsson [off-list ref] wrote:
quoted
David Symonds wrote:
quoted
On 11/2/07, Junio C Hamano [off-list ref] wrote:
quoted
This introduces core.whitespace configuration variable that lets
you specify the definition of "whitespace error".

Currently there are two kinds of whitespace errors defined:

 * trailing-space: trailing whitespaces at the end of the line.

 * space-before-tab: a SP appears immediately before HT in the
   indent part of the line.
quoted
        [core]
                whitespace = -trailing-space
Could I suggest naming the option 'whitespaceError', so it's clearer
that it's a negative setting?
Which would also open the window for "WhitespaceWarning" and "WhitespaceAutofix"
later on, using the same semantics.
Maybe cut straight to the chase:

[core]
        whitespace.trailing = error
        whitespace.space-before-tab = error
        whitespace.8-spaces = warn

There'd be at least "error", "warn"; "okay" and "autofix" would be
other sensible values. I'm willing to help code this up if this sounds
good.
Nice idea, but the syntax is

[core "whitespace"]
        trailing = error
        space-before-tab = error
        indent-with-space = warn

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help