Re: [PATCH 1/2] War on whitespace: first, a bit of retreat.
Show 32 quoted lines
> On 11/2/07, Andreas Ericsson <ae@op5.se> wrote:
>> David Symonds wrote:
>>> On 11/2/07, Junio C Hamano <gitster@pobox.com> wrote:
>>>> 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.
>>>
>>>> [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