|
List Info
Thread: Checkstyle / PMD and recent commits
|
|
| Checkstyle / PMD and recent commits |

|
2007-04-11 04:02:36 |
Hi everybody !
I have recently checked in lots of changes. These are
mostly
code conventions fixes. Let me explain.
I've started to add checkstyle and pmd checks at build
time.
For those who do not know these tools, checkstyle
(http://checkstyle.
sourceforge.net/) enforces
code conventions (braces, spaces, etc ...), while PMD
(http://pmd.sourceforge.ne
t/) checks for possible bugs.
These tools are configured in the new parent module
which all other modules should inherit directly or
indirectly
when they pass these checks (the buid fails if these checks
do not pass).
Currently, only the serviceengines module inherit from
parent
so any help to migrate the other modules is welcome
The goal is to have all modules (core, common, deployables
mainly)
inherit from parent.
Btw, thanks to the CXF team which did that a few months
ago,
and where I borrowed the configuration and all ...
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.co
m/
|
|
| Re: Checkstyle / PMD and recent commits |

|
2007-04-12 08:54:51 |
Guillaume,
Just a few questions/remarks about the CheckStyle rules:
- a lot of the code seems to be written with a line length
of 132 in
mind, why change it to 120?
- the rules don't allow using this way of creating setters
public void setMBeanServer(MBeanServer mbeanServer) {
this.mbeanServer = mbeanServer;
}
Regards,
Gert Vanthienen
Guillaume Nodet wrote:
> Hi everybody !
>
> I have recently checked in lots of changes. These are
mostly
> code conventions fixes. Let me explain.
>
> I've started to add checkstyle and pmd checks at build
time.
> For those who do not know these tools, checkstyle
> (http://checkstyle.
sourceforge.net/) enforces
> code conventions (braces, spaces, etc ...), while PMD
> (http://pmd.sourceforge.ne
t/) checks for possible bugs.
>
> These tools are configured in the new parent module
> which all other modules should inherit directly or
indirectly
> when they pass these checks (the buid fails if these
checks
> do not pass).
>
> Currently, only the serviceengines module inherit from
parent
> so any help to migrate the other modules is welcome
> The goal is to have all modules (core, common,
deployables mainly)
> inherit from parent.
>
> Btw, thanks to the CXF team which did that a few months
ago,
> and where I borrowed the configuration and all ...
>
|
|
| Re: Checkstyle / PMD and recent commits |
  Germany |
2007-04-12 09:02:21 |
Gert Vanthienen wrote:
> Guillaume,
>
> Just a few questions/remarks about the CheckStyle
rules:
> - a lot of the code seems to be written with a line
length of 132 in
> mind, why change it to 120?
> - the rules don't allow using this way of creating
setters
> public void setMBeanServer(MBeanServer mbeanServer)
{
> this.mbeanServer = mbeanServer;
> }
I think it is good to do:
setMbeanServer(MBeanServer newMbeanServer) {
mbeanServer = newMbeanServer;
}
Doesn't it?
Thomas
>
> Regards,
>
> Gert Vanthienen
>
>
> Guillaume Nodet wrote:
>> Hi everybody !
>>
>> I have recently checked in lots of changes. These
are mostly
>> code conventions fixes. Let me explain.
>>
>> I've started to add checkstyle and pmd checks at
build time.
>> For those who do not know these tools, checkstyle
>> (http://checkstyle.
sourceforge.net/) enforces
>> code conventions (braces, spaces, etc ...), while
PMD
>> (http://pmd.sourceforge.ne
t/) checks for possible bugs.
>>
>> These tools are configured in the new parent
module
>> which all other modules should inherit directly or
indirectly
>> when they pass these checks (the buid fails if
these checks
>> do not pass).
>>
>> Currently, only the serviceengines module inherit
from parent
>> so any help to migrate the other modules is welcome
>> The goal is to have all modules (core, common,
deployables mainly)
>> inherit from parent.
>>
>> Btw, thanks to the CXF team which did that a few
months ago,
>> and where I borrowed the configuration and all ...
>>
>
>
--
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart
Tel : (+49) 0711 - 45 10 17 676
Fax : (+49) 0711 - 45 10 17 573
WWW : http://www.blue-
elephant-systems.com
Email : Thomas.Termin blue-elephant-systems.com
blue elephant systems GmbH
Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim
Hoernle
|
|
| Re: Checkstyle / PMD and recent commits |

|
2007-04-12 09:13:47 |
On 4/12/07, Gert Vanthienen <gert.vanthienen skynet.be> wrote:
>
> Guillaume,
>
> Just a few questions/remarks about the CheckStyle
rules:
> - a lot of the code seems to be written with a line le
>
ngth of 132 in
> mind, why change it to 120?
Well, I have only copied the CXF rules I must admit.
So it may be a good idea to increase it to 140 if needed.
- the rules don't allow using this way of creating setters
> public void setMBeanServer(MBeanServer mbeanServer)
{
> this.mbeanServer = mbeanServer;
> }
It should afaik. The only problem is that the name of the
parameter
must match the name of the property.
For example
public void setXyz(String xyz) {
this.xyz = xyz;
}
I like this syntax so I really want this to work.
I guess if the property is spelled "mBeanServer"
it will work.
Else, we can also disable this rule (not sure what the exact
rule is).
Regards,
>
> Gert Vanthienen
>
>
> Guillaume Nodet wrote:
> > Hi everybody !
> >
> > I have recently checked in lots of changes. These
are mostly
> > code conventions fixes. Let me explain.
> >
> > I've started to add checkstyle and pmd checks at
build time.
> > For those who do not know these tools, checkstyle
> > (http://checkstyle.
sourceforge.net/) enforces
> > code conventions (braces, spaces, etc ...), while
PMD
> > (http://pmd.sourceforge.ne
t/) checks for possible bugs.
> >
> > These tools are configured in the new parent
module
> > which all other modules should inherit directly or
indirectly
> > when they pass these checks (the buid fails if
these checks
> > do not pass).
> >
> > Currently, only the serviceengines module inherit
from parent
> > so any help to migrate the other modules is
welcome
> > The goal is to have all modules (core, common,
deployables mainly)
> > inherit from parent.
> >
> > Btw, thanks to the CXF team which did that a few
months ago,
> > and where I borrowed the configuration and all
...
> >
>
>
--
Cheers,
Guillaume Nodet
------------------------
LogicBlaze
Principal Engineer, IONA
Blog: http://gnodet.blogspot.co
m/
|
|
| Re: Checkstyle / PMD and recent commits |
  Germany |
2007-04-12 11:57:48 |
Gert,
I checked in the change of the line length to 140.
Thomas
Gert Vanthienen wrote:
> Guillaume,
>
> Just a few questions/remarks about the CheckStyle
rules:
> - a lot of the code seems to be written with a line
length of 132 in
> mind, why change it to 120?
> - the rules don't allow using this way of creating
setters
> public void setMBeanServer(MBeanServer mbeanServer)
{
> this.mbeanServer = mbeanServer;
> }
>
> Regards,
>
> Gert Vanthienen
>
>
> Guillaume Nodet wrote:
>> Hi everybody !
>>
>> I have recently checked in lots of changes. These
are mostly
>> code conventions fixes. Let me explain.
>>
>> I've started to add checkstyle and pmd checks at
build time.
>> For those who do not know these tools, checkstyle
>> (http://checkstyle.
sourceforge.net/) enforces
>> code conventions (braces, spaces, etc ...), while
PMD
>> (http://pmd.sourceforge.ne
t/) checks for possible bugs.
>>
>> These tools are configured in the new parent
module
>> which all other modules should inherit directly or
indirectly
>> when they pass these checks (the buid fails if
these checks
>> do not pass).
>>
>> Currently, only the serviceengines module inherit
from parent
>> so any help to migrate the other modules is welcome
>> The goal is to have all modules (core, common,
deployables mainly)
>> inherit from parent.
>>
>> Btw, thanks to the CXF team which did that a few
months ago,
>> and where I borrowed the configuration and all ...
>>
>
>
--
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart
Tel : (+49) 0711 - 45 10 17 676
Fax : (+49) 0711 - 45 10 17 573
WWW : http://www.blue-
elephant-systems.com
Email : Thomas.Termin blue-elephant-systems.com
blue elephant systems GmbH
Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim
Hoernle
|
|
| Re: Checkstyle / PMD and recent commits |

|
2007-04-12 14:51:04 |
Cool, glad you confirm that. This is something that I have
crossed while working on the SEs, but had not took the time
to detail.
On 4/12/07, Gert Vanthienen <gert.vanthienen skynet.be> wrote:
>
> Guillaume,
>
> You're right what the setter syntax is concerned. The
error message is
> a bit confusing (local variable 'mbeanServer' hides a
field or something
> like that), but once the correct case is used to match
the property to
> the setter, CheckStyle does allow this syntax...
>
> Gert
>
> Guillaume Nodet wrote:
> > On 4/12/07, Gert Vanthienen
<gert.vanthienen skynet.be> wrote:
> >>
> >> Guillaume,
> >>
> >> Just a few questions/remarks about the
CheckStyle rules:
> >> - a lot of the code seems to be written with a
line le
> >>
> > ngth of 132 in
> >> mind, why change it to 120?
> >
> >
> > Well, I have only copied the CXF rules I must
admit.
> > So it may be a good idea to increase it to 140 if
needed.
> >
> > - the rules don't allow using this way of creating
setters
> >> public void setMBeanServer(MBeanServer
mbeanServer) {
> >> this.mbeanServer = mbeanServer;
> >> }
> >
> >
> > It should afaik. The only problem is that the
name of the parameter
> > must match the name of the property.
> > For example
> > public void setXyz(String xyz) {
> > this.xyz = xyz;
> > }
> >
> > I like this syntax so I really want this to work.
> > I guess if the property is spelled
"mBeanServer" it will work.
> > Else, we can also disable this rule (not sure what
the exact rule is).
> >
> > Regards,
> >>
> >> Gert Vanthienen
> >>
> >>
> >> Guillaume Nodet wrote:
> >> > Hi everybody !
> >> >
> >> > I have recently checked in lots of
changes. These are mostly
> >> > code conventions fixes. Let me explain.
> >> >
> >> > I've started to add checkstyle and pmd
checks at build time.
> >> > For those who do not know these tools,
checkstyle
> >> > (http://checkstyle.
sourceforge.net/) enforces
> >> > code conventions (braces, spaces, etc
...), while PMD
> >> > (http://pmd.sourceforge.ne
t/) checks for possible bugs.
> >> >
> >> > These tools are configured in the new
parent module
> >> > which all other modules should inherit
directly or indirectly
> >> > when they pass these checks (the buid
fails if these checks
> >> > do not pass).
> >> >
> >> > Currently, only the serviceengines module
inherit from parent
> >> > so any help to migrate the other modules
is welcome
> >> > The goal is to have all modules (core,
common, deployables mainly)
> >> > inherit from parent.
> >> >
> >> > Btw, thanks to the CXF team which did
that a few months ago,
> >> > and where I borrowed the configuration
and all ...
> >> >
> >>
> >>
> >
> >
>
>
--
Cheers,
Guillaume Nodet
------------------------
LogicBlaze
Principal Engineer, IONA
Blog: http://gnodet.blogspot.co
m/
|
|
| Re: Checkstyle / PMD and recent commits |
  Belgium |
2007-04-12 14:51:55 |
Thomas,
Thank you for the quick response! This makes a serious
difference in
the effort to make the binding components
CheckStyle-compliant
Gert
Thomas TERMIN wrote:
> Gert,
>
> I checked in the change of the line length to 140.
>
> Thomas
>
> Gert Vanthienen wrote:
>
>> Guillaume,
>>
>> Just a few questions/remarks about the CheckStyle
rules:
>> - a lot of the code seems to be written with a line
length of 132 in
>> mind, why change it to 120?
>> - the rules don't allow using this way of creating
setters
>> public void setMBeanServer(MBeanServer
mbeanServer) {
>> this.mbeanServer = mbeanServer;
>> }
>>
>> Regards,
>>
>> Gert Vanthienen
>>
>>
>> Guillaume Nodet wrote:
>>
>>> Hi everybody !
>>>
>>> I have recently checked in lots of changes.
These are mostly
>>> code conventions fixes. Let me explain.
>>>
>>> I've started to add checkstyle and pmd checks
at build time.
>>> For those who do not know these tools,
checkstyle
>>> (http://checkstyle.
sourceforge.net/) enforces
>>> code conventions (braces, spaces, etc ...),
while PMD
>>> (http://pmd.sourceforge.ne
t/) checks for possible bugs.
>>>
>>> These tools are configured in the new parent
module
>>> which all other modules should inherit directly
or indirectly
>>> when they pass these checks (the buid fails if
these checks
>>> do not pass).
>>>
>>> Currently, only the serviceengines module
inherit from parent
>>> so any help to migrate the other modules is
welcome
>>> The goal is to have all modules (core, common,
deployables mainly)
>>> inherit from parent.
>>>
>>> Btw, thanks to the CXF team which did that a
few months ago,
>>> and where I borrowed the configuration and all
...
>>>
>>>
>>
>
>
>
|
|
| Re: Checkstyle / PMD and recent commits |
  Belgium |
2007-04-12 14:49:05 |
Guillaume,
You're right what the setter syntax is concerned. The error
message is
a bit confusing (local variable 'mbeanServer' hides a field
or something
like that), but once the correct case is used to match the
property to
the setter, CheckStyle does allow this syntax...
Gert
Guillaume Nodet wrote:
> On 4/12/07, Gert Vanthienen <gert.vanthienen skynet.be> wrote:
>>
>> Guillaume,
>>
>> Just a few questions/remarks about the CheckStyle
rules:
>> - a lot of the code seems to be written with a line
le
>>
> ngth of 132 in
>> mind, why change it to 120?
>
>
> Well, I have only copied the CXF rules I must admit.
> So it may be a good idea to increase it to 140 if
needed.
>
> - the rules don't allow using this way of creating
setters
>> public void setMBeanServer(MBeanServer
mbeanServer) {
>> this.mbeanServer = mbeanServer;
>> }
>
>
> It should afaik. The only problem is that the name of
the parameter
> must match the name of the property.
> For example
> public void setXyz(String xyz) {
> this.xyz = xyz;
> }
>
> I like this syntax so I really want this to work.
> I guess if the property is spelled
"mBeanServer" it will work.
> Else, we can also disable this rule (not sure what the
exact rule is).
>
> Regards,
>>
>> Gert Vanthienen
>>
>>
>> Guillaume Nodet wrote:
>> > Hi everybody !
>> >
>> > I have recently checked in lots of changes.
These are mostly
>> > code conventions fixes. Let me explain.
>> >
>> > I've started to add checkstyle and pmd checks
at build time.
>> > For those who do not know these tools,
checkstyle
>> > (http://checkstyle.
sourceforge.net/) enforces
>> > code conventions (braces, spaces, etc ...),
while PMD
>> > (http://pmd.sourceforge.ne
t/) checks for possible bugs.
>> >
>> > These tools are configured in the new parent
module
>> > which all other modules should inherit
directly or indirectly
>> > when they pass these checks (the buid fails if
these checks
>> > do not pass).
>> >
>> > Currently, only the serviceengines module
inherit from parent
>> > so any help to migrate the other modules is
welcome
>> > The goal is to have all modules (core, common,
deployables mainly)
>> > inherit from parent.
>> >
>> > Btw, thanks to the CXF team which did that a
few months ago,
>> > and where I borrowed the configuration and all
...
>> >
>>
>>
>
>
|
|
[1-8]
|
|