You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jeremy Boynes <jb...@apache.org> on 2010/11/16 16:38:56 UTC

[taglibs] Tab police

As well as the tabs, there are broader inconsistencies in the style (e.g. consistent braces, missing javadoc, and the like) that lead to IDE warnings.

How about running everything through a re-formatter to clean this up? Downside is that it will make back-patching harder.
+1 from me.

On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:

> https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
> 
>           Summary: Tab police
>           Product: Taglibs
>           Version: unspecified
>          Platform: PC
>        OS/Version: Windows XP
>            Status: NEW
>          Severity: normal
>          Priority: P2
>         Component: Unknown Taglib
>        AssignedTo: dev@tomcat.apache.org
>        ReportedBy: sebb@apache.org
> 
> 
> Created an attachment (id=26301)
> --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
> Fix tabs in examples code
> 
> There are oodles of tabs in the Taglibs code.
> 
> Tabs seem to be set at 8 spaces, at least in the examples section.
> 
> I can provide patches for the other code if required.
> 
> -- 
> Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [taglibs] Tab police

Posted by sebb <se...@gmail.com>.
On 17 November 2010 07:07, Jeremy Boynes <jb...@apache.org> wrote:
> For a one-time reformat I'd probably go with the one in IDEA followed by manual review for where it messed up line breaks etc.
>
> For ongoing checks, we could add a checkstyle report to the build using the same ruleset as Tomcat (or a stricter subset if desired).

+1

> The results would look something like this:
>        https://issues.apache.org/bugzilla/attachment.cgi?id=26304

That looks good - does not seem to have messed up comments etc.
Formatters have obviously improved!

> On Nov 16, 2010, at 7:45 PM, Rex Wang wrote:
>
>> What's the formatter you plan to use? Is it public and other committer
>> obeyed? Otherwise, it will mess up again in future..
>>
>> Anyway, +1 for tab replacement with 4 spaces.
>>
>> -Rex
>>
>> 2010/11/16 Jeremy Boynes <jb...@apache.org>
>>
>>> As well as the tabs, there are broader inconsistencies in the style (e.g.
>>> consistent braces, missing javadoc, and the like) that lead to IDE warnings.
>>>
>>> How about running everything through a re-formatter to clean this up?
>>> Downside is that it will make back-patching harder.
>>> +1 from me.
>>>
>>> On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:
>>>
>>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
>>>>
>>>>          Summary: Tab police
>>>>          Product: Taglibs
>>>>          Version: unspecified
>>>>         Platform: PC
>>>>       OS/Version: Windows XP
>>>>           Status: NEW
>>>>         Severity: normal
>>>>         Priority: P2
>>>>        Component: Unknown Taglib
>>>>       AssignedTo: dev@tomcat.apache.org
>>>>       ReportedBy: sebb@apache.org
>>>>
>>>>
>>>> Created an attachment (id=26301)
>>>> --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
>>>> Fix tabs in examples code
>>>>
>>>> There are oodles of tabs in the Taglibs code.
>>>>
>>>> Tabs seem to be set at 8 spaces, at least in the examples section.
>>>>
>>>> I can provide patches for the other code if required.
>>>>
>>>> --
>>>> Configure bugmail:
>>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>>>> ------- You are receiving this mail because: -------
>>>> You are the assignee for the bug.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>
>>
>> --
>> Lei Wang (Rex)
>> rwonly AT apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [taglibs] Tab police

Posted by Jeremy Boynes <jb...@apache.org>.
For a one-time reformat I'd probably go with the one in IDEA followed by manual review for where it messed up line breaks etc.

For ongoing checks, we could add a checkstyle report to the build using the same ruleset as Tomcat (or a stricter subset if desired).

The results would look something like this:
	https://issues.apache.org/bugzilla/attachment.cgi?id=26304

On Nov 16, 2010, at 7:45 PM, Rex Wang wrote:

> What's the formatter you plan to use? Is it public and other committer
> obeyed? Otherwise, it will mess up again in future..
> 
> Anyway, +1 for tab replacement with 4 spaces.
> 
> -Rex
> 
> 2010/11/16 Jeremy Boynes <jb...@apache.org>
> 
>> As well as the tabs, there are broader inconsistencies in the style (e.g.
>> consistent braces, missing javadoc, and the like) that lead to IDE warnings.
>> 
>> How about running everything through a re-formatter to clean this up?
>> Downside is that it will make back-patching harder.
>> +1 from me.
>> 
>> On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:
>> 
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
>>> 
>>>          Summary: Tab police
>>>          Product: Taglibs
>>>          Version: unspecified
>>>         Platform: PC
>>>       OS/Version: Windows XP
>>>           Status: NEW
>>>         Severity: normal
>>>         Priority: P2
>>>        Component: Unknown Taglib
>>>       AssignedTo: dev@tomcat.apache.org
>>>       ReportedBy: sebb@apache.org
>>> 
>>> 
>>> Created an attachment (id=26301)
>>> --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
>>> Fix tabs in examples code
>>> 
>>> There are oodles of tabs in the Taglibs code.
>>> 
>>> Tabs seem to be set at 8 spaces, at least in the examples section.
>>> 
>>> I can provide patches for the other code if required.
>>> 
>>> --
>>> Configure bugmail:
>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>>> ------- You are receiving this mail because: -------
>>> You are the assignee for the bug.
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>> 
>> 
> 
> 
> -- 
> Lei Wang (Rex)
> rwonly AT apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [taglibs] Tab police

Posted by Henri Yandell <fl...@gmail.com>.
+1 for reformatting.

I've lived with the terrible code style in taglibs for years because I
felt that reformatting it just for me was over the top. Now there are
more eyes on the code; PLEASE MAKE IT READABLE! :)

I'm assuming it's a one-time only reformat to get us onto something sane.

Hen

On Tue, Nov 16, 2010 at 7:45 PM, Rex Wang <rw...@gmail.com> wrote:
> What's the formatter you plan to use? Is it public and other committer
> obeyed? Otherwise, it will mess up again in future..
>
> Anyway, +1 for tab replacement with 4 spaces.
>
> -Rex
>
> 2010/11/16 Jeremy Boynes <jb...@apache.org>
>
>> As well as the tabs, there are broader inconsistencies in the style (e.g.
>> consistent braces, missing javadoc, and the like) that lead to IDE warnings.
>>
>> How about running everything through a re-formatter to clean this up?
>> Downside is that it will make back-patching harder.
>> +1 from me.
>>
>> On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:
>>
>> > https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
>> >
>> >           Summary: Tab police
>> >           Product: Taglibs
>> >           Version: unspecified
>> >          Platform: PC
>> >        OS/Version: Windows XP
>> >            Status: NEW
>> >          Severity: normal
>> >          Priority: P2
>> >         Component: Unknown Taglib
>> >        AssignedTo: dev@tomcat.apache.org
>> >        ReportedBy: sebb@apache.org
>> >
>> >
>> > Created an attachment (id=26301)
>> > --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
>> > Fix tabs in examples code
>> >
>> > There are oodles of tabs in the Taglibs code.
>> >
>> > Tabs seem to be set at 8 spaces, at least in the examples section.
>> >
>> > I can provide patches for the other code if required.
>> >
>> > --
>> > Configure bugmail:
>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>> > ------- You are receiving this mail because: -------
>> > You are the assignee for the bug.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail: dev-help@tomcat.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>
>
> --
> Lei Wang (Rex)
> rwonly AT apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [taglibs] Tab police

Posted by sebb <se...@gmail.com>.
On 17 November 2010 03:45, Rex Wang <rw...@gmail.com> wrote:
> What's the formatter you plan to use? Is it public and other committer
> obeyed? Otherwise, it will mess up again in future..
>
> Anyway, +1 for tab replacement with 4 spaces.

The current code asumes tabs consume 8 spaces, at least in the example
code I created the patch for.

 But this is moot if one uses a reformatter.

> -Rex
>
> 2010/11/16 Jeremy Boynes <jb...@apache.org>
>
>> As well as the tabs, there are broader inconsistencies in the style (e.g.
>> consistent braces, missing javadoc, and the like) that lead to IDE warnings.
>>
>> How about running everything through a re-formatter to clean this up?
>> Downside is that it will make back-patching harder.
>> +1 from me.
>>
>> On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:
>>
>> > https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
>> >
>> >           Summary: Tab police
>> >           Product: Taglibs
>> >           Version: unspecified
>> >          Platform: PC
>> >        OS/Version: Windows XP
>> >            Status: NEW
>> >          Severity: normal
>> >          Priority: P2
>> >         Component: Unknown Taglib
>> >        AssignedTo: dev@tomcat.apache.org
>> >        ReportedBy: sebb@apache.org
>> >
>> >
>> > Created an attachment (id=26301)
>> > --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
>> > Fix tabs in examples code
>> >
>> > There are oodles of tabs in the Taglibs code.
>> >
>> > Tabs seem to be set at 8 spaces, at least in the examples section.
>> >
>> > I can provide patches for the other code if required.
>> >
>> > --
>> > Configure bugmail:
>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>> > ------- You are receiving this mail because: -------
>> > You are the assignee for the bug.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail: dev-help@tomcat.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>
>
> --
> Lei Wang (Rex)
> rwonly AT apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [taglibs] Tab police

Posted by Rex Wang <rw...@gmail.com>.
What's the formatter you plan to use? Is it public and other committer
obeyed? Otherwise, it will mess up again in future..

Anyway, +1 for tab replacement with 4 spaces.

-Rex

2010/11/16 Jeremy Boynes <jb...@apache.org>

> As well as the tabs, there are broader inconsistencies in the style (e.g.
> consistent braces, missing javadoc, and the like) that lead to IDE warnings.
>
> How about running everything through a re-formatter to clean this up?
> Downside is that it will make back-patching harder.
> +1 from me.
>
> On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:
>
> > https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
> >
> >           Summary: Tab police
> >           Product: Taglibs
> >           Version: unspecified
> >          Platform: PC
> >        OS/Version: Windows XP
> >            Status: NEW
> >          Severity: normal
> >          Priority: P2
> >         Component: Unknown Taglib
> >        AssignedTo: dev@tomcat.apache.org
> >        ReportedBy: sebb@apache.org
> >
> >
> > Created an attachment (id=26301)
> > --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
> > Fix tabs in examples code
> >
> > There are oodles of tabs in the Taglibs code.
> >
> > Tabs seem to be set at 8 spaces, at least in the examples section.
> >
> > I can provide patches for the other code if required.
> >
> > --
> > Configure bugmail:
> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> > ------- You are receiving this mail because: -------
> > You are the assignee for the bug.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: dev-help@tomcat.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


-- 
Lei Wang (Rex)
rwonly AT apache.org

Re: [taglibs] Tab police

Posted by sebb <se...@gmail.com>.
On 16 November 2010 15:38, Jeremy Boynes <jb...@apache.org> wrote:
> As well as the tabs, there are broader inconsistencies in the style (e.g. consistent braces, missing javadoc, and the like) that lead to IDE warnings.
>
> How about running everything through a re-formatter to clean this up? Downside is that it will make back-patching harder.
> +1 from me.

I have had bad experiences with auto code formatting.
It tends to mess up comments.
Or cause line
-breaks in silly places.

Not sure you would gain much compared with the downsides.

However, tabs are a particular problem, because there is no standard
setting (both 4 and 8 are common).
The wrong setting makes it harder to read the code.

> On Nov 16, 2010, at 5:28 AM, bugzilla@apache.org wrote:
>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=50279
>>
>>           Summary: Tab police
>>           Product: Taglibs
>>           Version: unspecified
>>          Platform: PC
>>        OS/Version: Windows XP
>>            Status: NEW
>>          Severity: normal
>>          Priority: P2
>>         Component: Unknown Taglib
>>        AssignedTo: dev@tomcat.apache.org
>>        ReportedBy: sebb@apache.org
>>
>>
>> Created an attachment (id=26301)
>> --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26301)
>> Fix tabs in examples code
>>
>> There are oodles of tabs in the Taglibs code.
>>
>> Tabs seem to be set at 8 spaces, at least in the examples section.
>>
>> I can provide patches for the other code if required.
>>
>> --
>> Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>> ------- You are receiving this mail because: -------
>> You are the assignee for the bug.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org