You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Matt Benson <gu...@yahoo.com> on 2008/04/03 19:21:11 UTC

[functor] checkstyle

I added checkstyle with a clone from Lang, which is
pretty permissive.  It'd be nice since the project is
being revived with all new blood, as it were, if we
could agree on a style that might be a little less
idiosyncratic (IMO anyway) than the current codebase. 
I propose the following changes, at least to start
with (my svn diff):

Index: checkstyle.xml
===================================================================
--- checkstyle.xml      (revision 644344)
+++ checkstyle.xml      (working copy)
@@ -39,5 +39,29 @@
     <module name="JavadocMethod">
       <property name="allowUndeclaredRTE"
value="true"/>
     </module>
- </module>
+
+    <!-- Checks for whitespace                       
       -->
+    <!-- See
http://checkstyle.sf.net/config_whitespace.html -->
+    <module name="EmptyForIteratorPad"/>
+    <module name="NoWhitespaceAfter"/>
+    <module name="NoWhitespaceBefore"/>
+    <module name="OperatorWrap"/>
+    <module name="TabCharacter"/>
+    <module name="WhitespaceAfter"/>
+    <module name="WhitespaceAround"/>
+
+    <module name="GenericIllegalRegexp">
+      <property name="format" value="\s+$"/>
+      <property name="message" value="Line has
trailing spaces."/>
+    </module>
+    <module name="UpperEll"/>
+
+    <module name="DeclarationOrder" />
+    <module name="ModifierOrder" />
+
+  </module>
+
 </module>

This triples the error count, perhaps not
surprisingly.  :)
Any consensus?

-Matt


      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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


Re: [functor] checkstyle

Posted by James Carman <ja...@carmanconsulting.com>.
On Thu, Apr 3, 2008 at 2:37 PM, sebb <se...@gmail.com> wrote:
>  > Wow, you -are- a weirdo.  ;)  I prefer end-of-line
>  >  myself, though admittedly one thing that
>  >  (irrationally) motivates many of my Java coding
>  >  preferences is raw file size.  Objectively speaking I
>  >  still get the idea that you're in the minority on this
>  >  one, but I could be wrong.
>
>  I prefer EOL - mainly because one can see more of the code on a single screen.

File size?  Screen size?  Wow, you folks are livin' in the 60s!  :)

I don't really care.  I'll just set up IDEA to format it the way you
folks like it.  I realize that I am a minority when it comes to code
format, but it's just what I'm used to.  I wonder if checkstyle has a
thing to spit out an IDEA code format file?

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


Re: [functor] checkstyle

Posted by sebb <se...@gmail.com>.
On 03/04/2008, Matt Benson <gu...@yahoo.com> wrote:
>
>  --- James Carman <ja...@carmanconsulting.com> wrote:
>
>  > On Thu, Apr 3, 2008 at 1:44 PM, sebb
>  > <se...@gmail.com> wrote:
>  > > On 03/04/2008, Matt Benson <gu...@yahoo.com>
>  > wrote:
>  > >  > I added checkstyle with a clone from Lang,
>  > which is
>  > >  >  pretty permissive.  It'd be nice since the
>  > project is
>  > >  >  being revived with all new blood, as it were,
>  > if we
>  > >  >  could agree on a style that might be a little
>  > less
>  > >  >  idiosyncratic (IMO anyway) than the current
>  > codebase.
>  > >  >  I propose the following changes, at least to
>  > start
>  > >  >  with (my svn diff):
>  > >  >
>  >
>  > The only thing I don't like about the current code
>  > is that it uses
>  > end-of-line left braces.  I'm one of the weirdos who
>  > likes next-line
>  > always.  I'm not really familiar with the checkstyle
>  > rules, but I can
>  > just configure IntelliJ idea accordingly to always
>  > format based on
>  > those rules.
>
>
> Wow, you -are- a weirdo.  ;)  I prefer end-of-line
>  myself, though admittedly one thing that
>  (irrationally) motivates many of my Java coding
>  preferences is raw file size.  Objectively speaking I
>  still get the idea that you're in the minority on this
>  one, but I could be wrong.

I prefer EOL - mainly because one can see more of the code on a single screen.

>
>  -Matt
>
>
>  >
>  >
>  ---------------------------------------------------------------------
>  > To unsubscribe, e-mail:
>  > dev-unsubscribe@commons.apache.org
>  > For additional commands, e-mail:
>  > dev-help@commons.apache.org
>  >
>  >
>
>
>
>
>       ____________________________________________________________________________________
>  You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
>  http://tc.deals.yahoo.com/tc/blockbuster/text5.com
>
>  ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


Re: [functor] checkstyle

Posted by Matt Benson <gu...@yahoo.com>.
--- James Carman <ja...@carmanconsulting.com> wrote:

> On Thu, Apr 3, 2008 at 1:44 PM, sebb
> <se...@gmail.com> wrote:
> > On 03/04/2008, Matt Benson <gu...@yahoo.com>
> wrote:
> >  > I added checkstyle with a clone from Lang,
> which is
> >  >  pretty permissive.  It'd be nice since the
> project is
> >  >  being revived with all new blood, as it were,
> if we
> >  >  could agree on a style that might be a little
> less
> >  >  idiosyncratic (IMO anyway) than the current
> codebase.
> >  >  I propose the following changes, at least to
> start
> >  >  with (my svn diff):
> >  >
> 
> The only thing I don't like about the current code
> is that it uses
> end-of-line left braces.  I'm one of the weirdos who
> likes next-line
> always.  I'm not really familiar with the checkstyle
> rules, but I can
> just configure IntelliJ idea accordingly to always
> format based on
> those rules.

Wow, you -are- a weirdo.  ;)  I prefer end-of-line
myself, though admittedly one thing that
(irrationally) motivates many of my Java coding
preferences is raw file size.  Objectively speaking I
still get the idea that you're in the minority on this
one, but I could be wrong.

-Matt

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



      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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


Re: [functor] checkstyle

Posted by James Carman <ja...@carmanconsulting.com>.
On Thu, Apr 3, 2008 at 1:44 PM, sebb <se...@gmail.com> wrote:
> On 03/04/2008, Matt Benson <gu...@yahoo.com> wrote:
>  > I added checkstyle with a clone from Lang, which is
>  >  pretty permissive.  It'd be nice since the project is
>  >  being revived with all new blood, as it were, if we
>  >  could agree on a style that might be a little less
>  >  idiosyncratic (IMO anyway) than the current codebase.
>  >  I propose the following changes, at least to start
>  >  with (my svn diff):
>  >

The only thing I don't like about the current code is that it uses
end-of-line left braces.  I'm one of the weirdos who likes next-line
always.  I'm not really familiar with the checkstyle rules, but I can
just configure IntelliJ idea accordingly to always format based on
those rules.

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


Re: [functor] checkstyle

Posted by Matt Benson <gu...@yahoo.com>.
--- sebb <se...@gmail.com> wrote:

> On 03/04/2008, Matt Benson <gu...@yahoo.com>
> wrote:
> > I added checkstyle with a clone from Lang, which
> is
> >  pretty permissive.  It'd be nice since the
> project is
> >  being revived with all new blood, as it were, if
> we
> >  could agree on a style that might be a little
> less
> >  idiosyncratic (IMO anyway) than the current
> codebase.
> >  I propose the following changes, at least to
> start
> >  with (my svn diff):
> >
> >  Index: checkstyle.xml
> > 
>
===================================================================
> >  --- checkstyle.xml      (revision 644344)
> >  +++ checkstyle.xml      (working copy)
> >  @@ -39,5 +39,29 @@
> >      <module name="JavadocMethod">
> >        <property name="allowUndeclaredRTE"
> >  value="true"/>
> >      </module>
> >  - </module>
> >  +
> >  +    <!-- Checks for whitespace
> >        -->
> >  +    <!-- See
> >  http://checkstyle.sf.net/config_whitespace.html
> -->
> >  +    <module name="EmptyForIteratorPad"/>
> 
> Dunno
> 
> >  +    <module name="NoWhitespaceAfter"/>
> 
> Seems a bit drastic. I think it makes sense to ban
> WS after some of
> the tokens mentioned - e.g. DOT - but perhaps not
> ARRAY_INIT BNOT
> LNOT.

Actually I had excluded ARRAY_INIT but undid it for
simplicity's sake.  I have no problem with that one. 
I'm unconvinced on the NOTs, but would be interested
to know what the majority think about it.

-Matt

> 
> >  +    <module name="NoWhitespaceBefore"/>
> 
> OK
> 
> >  +    <module name="OperatorWrap"/>
> 
> OK
> 
> >  +    <module name="TabCharacter"/>
> 
> +1
> 
> >  +    <module name="WhitespaceAfter"/>
> 
> OK
> 
> >  +    <module name="WhitespaceAround"/>
> 
> ?
> 
> >  +    <module name="GenericIllegalRegexp">
> >  +      <property name="format" value="\s+$"/>
> >  +      <property name="message" value="Line has
> >  trailing spaces."/>
> 
> OK
> 
> >  +    </module>
> >  +    <module name="UpperEll"/>
> 
> +1
> 
> >  +    <module name="DeclarationOrder" />
> 
> OK
> 
> >  +    <module name="ModifierOrder" />
> 
> OK
> 
> >  +
> >  +  </module>
> >  +
> >   </module>
> >
> >  This triples the error count, perhaps not
> >  surprisingly.  :)
> >  Any consensus?
> >
> >
> >  -Matt
> >
> >
> >
> >      
>
____________________________________________________________________________________
> >  You rock. That's why Blockbuster's offering you
> one month of Blockbuster Total Access, No Cost.
> > 
> http://tc.deals.yahoo.com/tc/blockbuster/text5.com
> >
> > 
>
---------------------------------------------------------------------
> >  To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> >  For additional commands, e-mail:
> dev-help@commons.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> For additional commands, e-mail:
> dev-help@commons.apache.org
> 
> 



      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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


Re: [functor] checkstyle

Posted by sebb <se...@gmail.com>.
On 03/04/2008, Matt Benson <gu...@yahoo.com> wrote:
> I added checkstyle with a clone from Lang, which is
>  pretty permissive.  It'd be nice since the project is
>  being revived with all new blood, as it were, if we
>  could agree on a style that might be a little less
>  idiosyncratic (IMO anyway) than the current codebase.
>  I propose the following changes, at least to start
>  with (my svn diff):
>
>  Index: checkstyle.xml
>  ===================================================================
>  --- checkstyle.xml      (revision 644344)
>  +++ checkstyle.xml      (working copy)
>  @@ -39,5 +39,29 @@
>      <module name="JavadocMethod">
>        <property name="allowUndeclaredRTE"
>  value="true"/>
>      </module>
>  - </module>
>  +
>  +    <!-- Checks for whitespace
>        -->
>  +    <!-- See
>  http://checkstyle.sf.net/config_whitespace.html -->
>  +    <module name="EmptyForIteratorPad"/>

Dunno

>  +    <module name="NoWhitespaceAfter"/>

Seems a bit drastic. I think it makes sense to ban WS after some of
the tokens mentioned - e.g. DOT - but perhaps not ARRAY_INIT BNOT
LNOT.

>  +    <module name="NoWhitespaceBefore"/>

OK

>  +    <module name="OperatorWrap"/>

OK

>  +    <module name="TabCharacter"/>

+1

>  +    <module name="WhitespaceAfter"/>

OK

>  +    <module name="WhitespaceAround"/>

?

>  +    <module name="GenericIllegalRegexp">
>  +      <property name="format" value="\s+$"/>
>  +      <property name="message" value="Line has
>  trailing spaces."/>

OK

>  +    </module>
>  +    <module name="UpperEll"/>

+1

>  +    <module name="DeclarationOrder" />

OK

>  +    <module name="ModifierOrder" />

OK

>  +
>  +  </module>
>  +
>   </module>
>
>  This triples the error count, perhaps not
>  surprisingly.  :)
>  Any consensus?
>
>
>  -Matt
>
>
>
>       ____________________________________________________________________________________
>  You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
>  http://tc.deals.yahoo.com/tc/blockbuster/text5.com
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

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