You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jeremy Boynes <jb...@apache.org> on 2006/06/22 03:40:21 UTC

Checkstyle and PMD

I like the idea of running these but remain concerned by the time it
takes on *every* build. They seem to add 10-15 seconds per module which
is a long time compared to the 2-5 seconds it takes to run the unit
tests. This is an impact for people like me who frequently build from
the command line rather than from inside an IDE.

To make things worse, I can't seem to build individual modules - I get:

[INFO] An error has occurred in Checkstyle report generation.
Embedded error: failed to load suppressions location:
tuscany-suppressions.xml
/home/jeremy/tuscany/sandbox/jboynes/sca/core2/suppressions_1_0.dtd (No
such file or directory)

I assume this is a working-directory problem but it does make testing a
single module problematic.

We had talked originally about just running these before checking in -
Jim/Dan do you know how to set up mvn to do that or should I start to
dig into it?

--
Jeremy

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


Re: Checkstyle and PMD

Posted by Jim Marino <jm...@myromatours.com>.
On Jun 21, 2006, at 7:10 PM, Daniel Kulp wrote:

>
> Jeremy,
>
>
> On Wednesday June 21 2006 9:40 pm, Jeremy Boynes wrote:
>> I like the idea of running these but remain concerned by the time it
>> takes on *every* build. They seem to add 10-15 seconds per module  
>> which
>> is a long time compared to the 2-5 seconds it takes to run the unit
>> tests. This is an impact for people like me who frequently build from
>> the command line rather than from inside an IDE.
>>
>> To make things worse, I can't seem to build individual modules - I  
>> get:
>>
>> [INFO] An error has occurred in Checkstyle report generation.
>> Embedded error: failed to load suppressions location:
>> tuscany-suppressions.xml
>> /home/jeremy/tuscany/sandbox/jboynes/sca/core2/ 
>> suppressions_1_0.dtd (No
>> such file or directory)
>>

>> I assume this is a working-directory problem but it does make  
>> testing a
>> single module problematic.
>
> That one I'm not sure about.   The easiest thing to do is remove  
> the DOCTYPE
> header from the two xml files so the dtd isn't required.   They aren't
> needed, but it may make editing the file with a true xml editor a  
> bit more
> difficult.   Really, the tuscany-checks.xml and tuscany- 
> suppressions.xml file
> in the root should be removed (and the dtds).    The ones in the  
> buildtools
> dir are the ones that are picked up.   The one in binding.celtix  
> definitely
> should go.
>
I tried removing the doctype and it gave me validation errors so I  
stuck local ones in.

>
>> We had talked originally about just running these before checking  
>> in -
>> Jim/Dan do you know how to set up mvn to do that or should I start to
>> dig into it?
>
> It's pretty easy to do with a profile, but it's much easier to do  
> if ALL the
> code in all the submodules pass.     If you build in tuscany/java,  
> you can
> see.   By default, it doesn't have checkstyle.   But if you
> do "mvn -Psourcecheck", it does checkstyle (but doesn't fail on  
> error due to
> the fact that the trunk is in pretty bad shape checkstyle wise).   For
> celtix, we kind of have the reverse.   The "sourcecheck" profile is
> autoactivated, but we have an "empty"  "nochecks" profile that  
> developers can
> use.   (mvn -Pnochecks)
>
> If all the submodules pass, the profile just needs to be in the top  
> level pom.
> However, if "some do, some don't", it's quite a bit more complex.    
> You
>
The "some do, some don't" is just because we haven't converted all of  
the projects yet. I would prefer we have the default profile set to  
run the tests and then create a "dev build" one that people can run  
as they develop. This way, it is more certain PMD and Checkstyle will  
be run prior to checkin. I do agree running these when developing is  
adding a lot of overhead (~ 15 to 20 seconds per project).

> probably would need to copy the profile to each subproject or do  
> what I did
> in trunk and have a property that control whether it fails or not.
>
>
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194   F:781-902-8001
> daniel.kulp@iona.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


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


Re: Checkstyle and PMD

Posted by Daniel Kulp <da...@iona.com>.
Jeremy,


On Wednesday June 21 2006 9:40 pm, Jeremy Boynes wrote:
> I like the idea of running these but remain concerned by the time it
> takes on *every* build. They seem to add 10-15 seconds per module which
> is a long time compared to the 2-5 seconds it takes to run the unit
> tests. This is an impact for people like me who frequently build from
> the command line rather than from inside an IDE.
>
> To make things worse, I can't seem to build individual modules - I get:
>
> [INFO] An error has occurred in Checkstyle report generation.
> Embedded error: failed to load suppressions location:
> tuscany-suppressions.xml
> /home/jeremy/tuscany/sandbox/jboynes/sca/core2/suppressions_1_0.dtd (No
> such file or directory)
>
> I assume this is a working-directory problem but it does make testing a
> single module problematic.

That one I'm not sure about.   The easiest thing to do is remove the DOCTYPE 
header from the two xml files so the dtd isn't required.   They aren't 
needed, but it may make editing the file with a true xml editor a bit more 
difficult.   Really, the tuscany-checks.xml and tuscany-suppressions.xml file 
in the root should be removed (and the dtds).    The ones in the buildtools 
dir are the ones that are picked up.   The one in binding.celtix definitely 
should go.


> We had talked originally about just running these before checking in -
> Jim/Dan do you know how to set up mvn to do that or should I start to
> dig into it?

It's pretty easy to do with a profile, but it's much easier to do if ALL the 
code in all the submodules pass.     If you build in tuscany/java, you can 
see.   By default, it doesn't have checkstyle.   But if you 
do "mvn -Psourcecheck", it does checkstyle (but doesn't fail on error due to 
the fact that the trunk is in pretty bad shape checkstyle wise).   For 
celtix, we kind of have the reverse.   The "sourcecheck" profile is 
autoactivated, but we have an "empty"  "nochecks" profile that developers can 
use.   (mvn -Pnochecks)    

If all the submodules pass, the profile just needs to be in the top level pom.   
However, if "some do, some don't", it's quite a bit more complex.   You 
probably would need to copy the profile to each subproject or do what I did 
in trunk and have a property that control whether it fails or not.


-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194   F:781-902-8001
daniel.kulp@iona.com

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