Checkstyle

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Checkstyle

Hiram Chirino
Hi folks,

We have never really discussed trying to use a single formatting style
for activemq and camel code.  But I think if we did it would make the
code easier to read / maintain..  I don't really care much what they
style is as long as it's consistent.

To that end, I saw that the CXF project has done a good job defining a
style in a format that check style can use and integrated that with
maven eclipse and idea.. see:
https://svn.apache.org/repos/asf/incubator/cxf/trunk/etc/

So I'm going to use that style and start trying to get our code to
adhere to it.  I'm just going to do this for the trunk of camel and
activemq.  If you guys have objections please let me know.

--
Regards,
Hiram

Blog: http://hiramchirino.com
Reply | Threaded
Open this post in threaded view
|

Re: Checkstyle

jstrachan
On 8/7/07, Hiram Chirino <[hidden email]> wrote:

> Hi folks,
>
> We have never really discussed trying to use a single formatting style
> for activemq and camel code.  But I think if we did it would make the
> code easier to read / maintain..  I don't really care much what they
> style is as long as it's consistent.
>
> To that end, I saw that the CXF project has done a good job defining a
> style in a format that check style can use and integrated that with
> maven eclipse and idea.. see:
> https://svn.apache.org/repos/asf/incubator/cxf/trunk/etc/
>
> So I'm going to use that style and start trying to get our code to
> adhere to it.  I'm just going to do this for the trunk of camel and
> activemq.  If you guys have objections please let me know.

I think it'll be good to get this done ASAP (though I'd rather not
hold back the ActiveMQ 5.0 release or the Camel 1.1 release - so lets
see how close to the Sun standards we can get ASAP).

Going forward, particularly on ActiveMQ - I'm really looking forward
to having the IDE auto-format everything :)

--
James
-------
http://macstrac.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Checkstyle

Hiram Chirino
Roger.. Just cause I'm lazy and the CXF project did most of the work
of setting up the the rules, I 'm doing the changes based on those
rules which is like 99% of the sun rules.

I have had to relax some of the CXF rules tho.  For example, they flag
declaring local variables that match field variables.  And we tend to
do that allot and I don't consider it bad form at all.

Also we tend to have very long lines.. CXF set the limit at 110, and
after a while of trying to get the IDE to auto-wrap stuff at 110, I
noticed that lots of lines just looked but ugly so I increased that
bit to 200.

I'm almost done with camel-core and it should be committed in a bit.
I'll see if i can finish off the rest of the camel modules tonight.
Then on to amq.

Regards,
Hiram

On 8/7/07, James Strachan <[hidden email]> wrote:

> On 8/7/07, Hiram Chirino <[hidden email]> wrote:
> > Hi folks,
> >
> > We have never really discussed trying to use a single formatting style
> > for activemq and camel code.  But I think if we did it would make the
> > code easier to read / maintain..  I don't really care much what they
> > style is as long as it's consistent.
> >
> > To that end, I saw that the CXF project has done a good job defining a
> > style in a format that check style can use and integrated that with
> > maven eclipse and idea.. see:
> > https://svn.apache.org/repos/asf/incubator/cxf/trunk/etc/
> >
> > So I'm going to use that style and start trying to get our code to
> > adhere to it.  I'm just going to do this for the trunk of camel and
> > activemq.  If you guys have objections please let me know.
>
> I think it'll be good to get this done ASAP (though I'd rather not
> hold back the ActiveMQ 5.0 release or the Camel 1.1 release - so lets
> see how close to the Sun standards we can get ASAP).
>
> Going forward, particularly on ActiveMQ - I'm really looking forward
> to having the IDE auto-format everything :)
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>


--
Regards,
Hiram

Blog: http://hiramchirino.com
Reply | Threaded
Open this post in threaded view
|

Re: Checkstyle

jstrachan
Sounds great!

On 8/7/07, Hiram Chirino <[hidden email]> wrote:

> Roger.. Just cause I'm lazy and the CXF project did most of the work
> of setting up the the rules, I 'm doing the changes based on those
> rules which is like 99% of the sun rules.
>
> I have had to relax some of the CXF rules tho.  For example, they flag
> declaring local variables that match field variables.  And we tend to
> do that allot and I don't consider it bad form at all.
>
> Also we tend to have very long lines.. CXF set the limit at 110, and
> after a while of trying to get the IDE to auto-wrap stuff at 110, I
> noticed that lots of lines just looked but ugly so I increased that
> bit to 200.
>
> I'm almost done with camel-core and it should be committed in a bit.
> I'll see if i can finish off the rest of the camel modules tonight.
> Then on to amq.
>
> Regards,
> Hiram
>
> On 8/7/07, James Strachan <[hidden email]> wrote:
> > On 8/7/07, Hiram Chirino <[hidden email]> wrote:
> > > Hi folks,
> > >
> > > We have never really discussed trying to use a single formatting style
> > > for activemq and camel code.  But I think if we did it would make the
> > > code easier to read / maintain..  I don't really care much what they
> > > style is as long as it's consistent.
> > >
> > > To that end, I saw that the CXF project has done a good job defining a
> > > style in a format that check style can use and integrated that with
> > > maven eclipse and idea.. see:
> > > https://svn.apache.org/repos/asf/incubator/cxf/trunk/etc/
> > >
> > > So I'm going to use that style and start trying to get our code to
> > > adhere to it.  I'm just going to do this for the trunk of camel and
> > > activemq.  If you guys have objections please let me know.
> >
> > I think it'll be good to get this done ASAP (though I'd rather not
> > hold back the ActiveMQ 5.0 release or the Camel 1.1 release - so lets
> > see how close to the Sun standards we can get ASAP).
> >
> > Going forward, particularly on ActiveMQ - I'm really looking forward
> > to having the IDE auto-format everything :)
> >
> > --
> > James
> > -------
> > http://macstrac.blogspot.com/
> >
>
>
> --
> Regards,
> Hiram
>
> Blog: http://hiramchirino.com
>


--
James
-------
http://macstrac.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Checkstyle

jstrachan
FWIW unfortunately the IDEA settings don't work for me with the latest
IDEA (#7087 of the EAP); I import the settings, then CXF Style never
shows up as an importable code style :(



On 8/7/07, James Strachan <[hidden email]> wrote:

> Sounds great!
>
> On 8/7/07, Hiram Chirino <[hidden email]> wrote:
> > Roger.. Just cause I'm lazy and the CXF project did most of the work
> > of setting up the the rules, I 'm doing the changes based on those
> > rules which is like 99% of the sun rules.
> >
> > I have had to relax some of the CXF rules tho.  For example, they flag
> > declaring local variables that match field variables.  And we tend to
> > do that allot and I don't consider it bad form at all.
> >
> > Also we tend to have very long lines.. CXF set the limit at 110, and
> > after a while of trying to get the IDE to auto-wrap stuff at 110, I
> > noticed that lots of lines just looked but ugly so I increased that
> > bit to 200.
> >
> > I'm almost done with camel-core and it should be committed in a bit.
> > I'll see if i can finish off the rest of the camel modules tonight.
> > Then on to amq.
> >
> > Regards,
> > Hiram
> >
> > On 8/7/07, James Strachan <[hidden email]> wrote:
> > > On 8/7/07, Hiram Chirino <[hidden email]> wrote:
> > > > Hi folks,
> > > >
> > > > We have never really discussed trying to use a single formatting style
> > > > for activemq and camel code.  But I think if we did it would make the
> > > > code easier to read / maintain..  I don't really care much what they
> > > > style is as long as it's consistent.
> > > >
> > > > To that end, I saw that the CXF project has done a good job defining a
> > > > style in a format that check style can use and integrated that with
> > > > maven eclipse and idea.. see:
> > > > https://svn.apache.org/repos/asf/incubator/cxf/trunk/etc/
> > > >
> > > > So I'm going to use that style and start trying to get our code to
> > > > adhere to it.  I'm just going to do this for the trunk of camel and
> > > > activemq.  If you guys have objections please let me know.
> > >
> > > I think it'll be good to get this done ASAP (though I'd rather not
> > > hold back the ActiveMQ 5.0 release or the Camel 1.1 release - so lets
> > > see how close to the Sun standards we can get ASAP).
> > >
> > > Going forward, particularly on ActiveMQ - I'm really looking forward
> > > to having the IDE auto-format everything :)
> > >
> > > --
> > > James
> > > -------
> > > http://macstrac.blogspot.com/
> > >
> >
> >
> > --
> > Regards,
> > Hiram
> >
> > Blog: http://hiramchirino.com
> >
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>


--
James
-------
http://macstrac.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Checkstyle

Hiram Chirino
perhaps you should try this idea plugin out:
http://code.google.com/p/checkstyle-idea


On 8/8/07, James Strachan <[hidden email]> wrote:

> FWIW unfortunately the IDEA settings don't work for me with the latest
> IDEA (#7087 of the EAP); I import the settings, then CXF Style never
> shows up as an importable code style :(
>
>
>
> On 8/7/07, James Strachan <[hidden email]> wrote:
> > Sounds great!
> >
> > On 8/7/07, Hiram Chirino <[hidden email]> wrote:
> > > Roger.. Just cause I'm lazy and the CXF project did most of the work
> > > of setting up the the rules, I 'm doing the changes based on those
> > > rules which is like 99% of the sun rules.
> > >
> > > I have had to relax some of the CXF rules tho.  For example, they flag
> > > declaring local variables that match field variables.  And we tend to
> > > do that allot and I don't consider it bad form at all.
> > >
> > > Also we tend to have very long lines.. CXF set the limit at 110, and
> > > after a while of trying to get the IDE to auto-wrap stuff at 110, I
> > > noticed that lots of lines just looked but ugly so I increased that
> > > bit to 200.
> > >
> > > I'm almost done with camel-core and it should be committed in a bit.
> > > I'll see if i can finish off the rest of the camel modules tonight.
> > > Then on to amq.
> > >
> > > Regards,
> > > Hiram
> > >
> > > On 8/7/07, James Strachan <[hidden email]> wrote:
> > > > On 8/7/07, Hiram Chirino <[hidden email]> wrote:
> > > > > Hi folks,
> > > > >
> > > > > We have never really discussed trying to use a single formatting style
> > > > > for activemq and camel code.  But I think if we did it would make the
> > > > > code easier to read / maintain..  I don't really care much what they
> > > > > style is as long as it's consistent.
> > > > >
> > > > > To that end, I saw that the CXF project has done a good job defining a
> > > > > style in a format that check style can use and integrated that with
> > > > > maven eclipse and idea.. see:
> > > > > https://svn.apache.org/repos/asf/incubator/cxf/trunk/etc/
> > > > >
> > > > > So I'm going to use that style and start trying to get our code to
> > > > > adhere to it.  I'm just going to do this for the trunk of camel and
> > > > > activemq.  If you guys have objections please let me know.
> > > >
> > > > I think it'll be good to get this done ASAP (though I'd rather not
> > > > hold back the ActiveMQ 5.0 release or the Camel 1.1 release - so lets
> > > > see how close to the Sun standards we can get ASAP).
> > > >
> > > > Going forward, particularly on ActiveMQ - I'm really looking forward
> > > > to having the IDE auto-format everything :)
> > > >
> > > > --
> > > > James
> > > > -------
> > > > http://macstrac.blogspot.com/
> > > >
> > >
> > >
> > > --
> > > Regards,
> > > Hiram
> > >
> > > Blog: http://hiramchirino.com
> > >
> >
> >
> > --
> > James
> > -------
> > http://macstrac.blogspot.com/
> >
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>


--
Regards,
Hiram

Blog: http://hiramchirino.com