You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kerby@directory.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2015/05/01 11:02:46 UTC

PMD

Hi all,

I have finished with doing "PMD" fixes to Kerby and it is now enabled by
default. "PMD" (project mess detector) is a maven plugin which runs every
time you do a mvn compile/test/install. The build will fail if it detects a
violation (for example, unused variables etc.). It keeps the source tidy
and helps eliminate bugs.

I added two new maven profiles:

mvn -Pnochecks - This skips PMD. Useful if you are just testing some local
changes.
mvn -Pfastinstall - This skips both PMD and running the tests.

You can disable PMD in the code itself by either a "// NOPMD" comment, or
else
via an annotation "@SuppressWarnings("PMD")". This should be avoided if at
all possible. I disabled PMD on the 3rdparty stuff until we decide what to
do with it.

Let me know if there are any questions or concerns.

Colm.


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

RE: PMD

Posted by "Zheng, Kai" <ka...@intel.com>.
>> FTR, I have asked to add the Mavibot, Kerby and Fortress projects to analysis.apache.org
Thanks Emmanuel for the taking. So how is it going and any output?

Regards,
Kai

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Tuesday, May 05, 2015 4:00 AM
To: Apache Directory Developers List
Subject: Re: PMD

Le 04/05/15 19:36, Stefan Seelmann a écrit :
> On 05/04/2015 02:30 PM, Emmanuel Lécharny wrote:
>> Le 03/05/15 18:18, Shawn McKinney a écrit :
>>> Do we have an ‘official’ project position on the use of PMD?  
>> No, but we can.
>>
>>> Is it employed within the others?  
>> It has been disabled for ApacheDS.
>>
>>> I am considering adding these checks to the fortress builds.
>> I think it's valuable to have it. The key is tunning PMD correctly, 
>> otherwise you'll have potentially thousands of warnings. For 
>> instance, in the LDAP API, we have 150 critical, 1901 major, 340 
>> minor and 106 infos. For ApacheDS, it's even worse, with 172 
>> critical, 2731 major, 808 minor and 97 info. Studio is the worst, 
>> with 273 critical, 3700 major,
>> 10892 minor and 456 infos. I teave to you imagine how long it would 
>> take to get those fixed...
>>
>> Btw, we can ask for the various projects to be added to 
>> analysis.apache.org. Here are the result for some of our current projects :
>>
>> ApacheDS : https://analysis.apache.org/dashboard/index/114786
>> LDAP API : https://analysis.apache.org/dashboard/index/123841
>> Studio   : https://analysis.apache.org/dashboard/index/118180
>>
> I think it is great to add such metrics from the beginning to new 
> projects like Kerby. And let the build fail fast to keep quality high.


FTR, I have asked to add the Mavibot, Kerby and Fortress projects to analysis.apache.org :

https://issues.apache.org/jira/browse/INFRA-9587

>
> For old projects it is hard to establish, especially if developers 
> like me are lazy ;)

Well, we can establish it, but if we have to catch up with all the errors and warning, we will do only that for the next 6 months ;-)


OTOH, this is the kind of stuff I *love* to do when my brain is running slow : I feel I'm actually doing something instead of watching files flying...




Re: PMD

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 04/05/15 19:36, Stefan Seelmann a écrit :
> On 05/04/2015 02:30 PM, Emmanuel Lécharny wrote:
>> Le 03/05/15 18:18, Shawn McKinney a écrit :
>>> Do we have an ‘official’ project position on the use of PMD?  
>> No, but we can.
>>
>>> Is it employed within the others?  
>> It has been disabled for ApacheDS.
>>
>>> I am considering adding these checks to the fortress builds.
>> I think it's valuable to have it. The key is tunning PMD correctly,
>> otherwise you'll have potentially thousands of warnings. For instance,
>> in the LDAP API, we have 150 critical, 1901 major, 340 minor and 106
>> infos. For ApacheDS, it's even worse, with 172 critical, 2731 major, 808
>> minor and 97 info. Studio is the worst, with 273 critical, 3700 major,
>> 10892 minor and 456 infos. I teave to you imagine how long it would take
>> to get those fixed...
>>
>> Btw, we can ask for the various projects to be added to
>> analysis.apache.org. Here are the result for some of our current projects :
>>
>> ApacheDS : https://analysis.apache.org/dashboard/index/114786
>> LDAP API : https://analysis.apache.org/dashboard/index/123841
>> Studio   : https://analysis.apache.org/dashboard/index/118180
>>
> I think it is great to add such metrics from the beginning to new
> projects like Kerby. And let the build fail fast to keep quality high.


FTR, I have asked to add the Mavibot, Kerby and Fortress projects to
analysis.apache.org :

https://issues.apache.org/jira/browse/INFRA-9587

>
> For old projects it is hard to establish, especially if developers like
> me are lazy ;)

Well, we can establish it, but if we have to catch up with all the
errors and warning, we will do only that for the next 6 months ;-)


OTOH, this is the kind of stuff I *love* to do when my brain is running
slow : I feel I'm actually doing something instead of watching files
flying...




Re: PMD

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 05/04/2015 02:30 PM, Emmanuel Lécharny wrote:
> Le 03/05/15 18:18, Shawn McKinney a écrit :
>> Do we have an ‘official’ project position on the use of PMD?  
> 
> No, but we can.
> 
>> Is it employed within the others?  
> It has been disabled for ApacheDS.
> 
>> I am considering adding these checks to the fortress builds.
> 
> I think it's valuable to have it. The key is tunning PMD correctly,
> otherwise you'll have potentially thousands of warnings. For instance,
> in the LDAP API, we have 150 critical, 1901 major, 340 minor and 106
> infos. For ApacheDS, it's even worse, with 172 critical, 2731 major, 808
> minor and 97 info. Studio is the worst, with 273 critical, 3700 major,
> 10892 minor and 456 infos. I teave to you imagine how long it would take
> to get those fixed...
> 
> Btw, we can ask for the various projects to be added to
> analysis.apache.org. Here are the result for some of our current projects :
> 
> ApacheDS : https://analysis.apache.org/dashboard/index/114786
> LDAP API : https://analysis.apache.org/dashboard/index/123841
> Studio   : https://analysis.apache.org/dashboard/index/118180
> 

I think it is great to add such metrics from the beginning to new
projects like Kerby. And let the build fail fast to keep quality high.

For old projects it is hard to establish, especially if developers like
me are lazy ;)

Kind Regards,
Stefan


Re: PMD

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 03/05/15 18:18, Shawn McKinney a écrit :
> Do we have an ‘official’ project position on the use of PMD?  

No, but we can.

> Is it employed within the others?  
It has been disabled for ApacheDS.

> I am considering adding these checks to the fortress builds.

I think it's valuable to have it. The key is tunning PMD correctly,
otherwise you'll have potentially thousands of warnings. For instance,
in the LDAP API, we have 150 critical, 1901 major, 340 minor and 106
infos. For ApacheDS, it's even worse, with 172 critical, 2731 major, 808
minor and 97 info. Studio is the worst, with 273 critical, 3700 major,
10892 minor and 456 infos. I teave to you imagine how long it would take
to get those fixed...

Btw, we can ask for the various projects to be added to
analysis.apache.org. Here are the result for some of our current projects :

ApacheDS : https://analysis.apache.org/dashboard/index/114786
LDAP API : https://analysis.apache.org/dashboard/index/123841
Studio   : https://analysis.apache.org/dashboard/index/118180




Re: PMD

Posted by Shawn McKinney <sm...@apache.org>.
Do we have an ‘official’ project position on the use of PMD?  Is it employed within the others?  I am considering adding these checks to the fortress builds.

Thanks

Shawn
smckinney@apache.org

> On May 1, 2015, at 7:38 PM, Zheng, Kai <ka...@intel.com> wrote:
> 
> Thank you Colm for this great enabling!! It's very helpful for the young project and our contributors.
> 
> Regards,
> Kai
> 
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
> Sent: Friday, May 01, 2015 5:03 PM
> To: kerby@directory.apache.org
> Subject: PMD
> 
> Hi all,
> 
> I have finished with doing "PMD" fixes to Kerby and it is now enabled by default. "PMD" (project mess detector) is a maven plugin which runs every time you do a mvn compile/test/install. The build will fail if it detects a violation (for example, unused variables etc.). It keeps the source tidy and helps eliminate bugs.
> 
> I added two new maven profiles:
> 
> mvn -Pnochecks - This skips PMD. Useful if you are just testing some local changes.
> mvn -Pfastinstall - This skips both PMD and running the tests.
> 
> You can disable PMD in the code itself by either a "// NOPMD" comment, or else via an annotation "@SuppressWarnings("PMD")". This should be avoided if at all possible. I disabled PMD on the 3rdparty stuff until we decide what to do with it.
> 
> Let me know if there are any questions or concerns.
> 
> Colm.
> 
> 
> --
> Colm O hEigeartaigh
> 
> Talend Community Coder
> http://coders.talend.com


RE: PMD

Posted by "Zheng, Kai" <ka...@intel.com>.
Thank you Colm for this great enabling!! It's very helpful for the young project and our contributors.

Regards,
Kai

-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: Friday, May 01, 2015 5:03 PM
To: kerby@directory.apache.org
Subject: PMD

Hi all,

I have finished with doing "PMD" fixes to Kerby and it is now enabled by default. "PMD" (project mess detector) is a maven plugin which runs every time you do a mvn compile/test/install. The build will fail if it detects a violation (for example, unused variables etc.). It keeps the source tidy and helps eliminate bugs.

I added two new maven profiles:

mvn -Pnochecks - This skips PMD. Useful if you are just testing some local changes.
mvn -Pfastinstall - This skips both PMD and running the tests.

You can disable PMD in the code itself by either a "// NOPMD" comment, or else via an annotation "@SuppressWarnings("PMD")". This should be avoided if at all possible. I disabled PMD on the 3rdparty stuff until we decide what to do with it.

Let me know if there are any questions or concerns.

Colm.


--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

RE: PMD

Posted by "Zheng, Kai" <ka...@intel.com>.
Thank you Colm for this great enabling!! It's very helpful for the young project and our contributors.

Regards,
Kai

-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: Friday, May 01, 2015 5:03 PM
To: kerby@directory.apache.org
Subject: PMD

Hi all,

I have finished with doing "PMD" fixes to Kerby and it is now enabled by default. "PMD" (project mess detector) is a maven plugin which runs every time you do a mvn compile/test/install. The build will fail if it detects a violation (for example, unused variables etc.). It keeps the source tidy and helps eliminate bugs.

I added two new maven profiles:

mvn -Pnochecks - This skips PMD. Useful if you are just testing some local changes.
mvn -Pfastinstall - This skips both PMD and running the tests.

You can disable PMD in the code itself by either a "// NOPMD" comment, or else via an annotation "@SuppressWarnings("PMD")". This should be avoided if at all possible. I disabled PMD on the 3rdparty stuff until we decide what to do with it.

Let me know if there are any questions or concerns.

Colm.


--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com