Re: Checkstyle / PMD and recent commits
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.net/) 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
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.net/) 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 : [EMAIL PROTECTED] 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
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 [EMAIL PROTECTED] 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.net/) 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
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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.net/) 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.com/
Re: Checkstyle / PMD and recent commits
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.net/) 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 ...
Checkstyle / PMD and recent commits
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.net/) 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.com/