According to LF, they have already installed the Checkstyle plugin for Jenkins. 
 Let me know if there are changes required to oparent to enable the output.

I agree that FindBugs and PMD both seem like good additions.

Thanks,
Gary

From: Alexis de Talhouët [mailto:adetalhoue...@gmail.com]
Sent: Friday, July 14, 2017 5:28 AM
To: Lefevre, Catherine <cl6...@intl.att.com>
Cc: Gary Wu <gary.i...@huawei.com>; onap-discuss@lists.onap.org
Subject: Re: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent

Catherine,

I believe FindBugs and PMD can be good addition. IIRC, in ODL, FindBugs does 
the following 
https://wiki.opendaylight.org/view/BestPractices/Coding_Guidelines#FindBugs and 
PMD check for copy-paste code (configured for 10 LoC c/p)  
https://github.com/opendaylight/odlparent/blob/ac464f6a253fcc7dc615ee145927dbf4834b9d5d/odlparent/pom.xml#L1512-L1542

Regards,
Alexis

On Jul 14, 2017, at 2:58 AM, Lefevre, Catherine 
<cl6...@intl.att.com<mailto:cl6...@intl.att.com>> wrote:

Thank you Gary.
Concerning CheckStyle plug-in, the CLAMP  team will submit a change to 
ci-management project so LF can review and merge the change.
The CLAMP team will also change the CLAMP pom file in order to inherit from 
o-parent as previously suggested.


Alexis,
When you run Checkstyle plug-in for Jenkins as part of your build job then 
Jenkins will display the number of warnings found from your build.

I was wondering if we should also consider FindBugs plug-in and PMD plug-in.
FindBugs - It is an open source program which uses static analysis to look for 
bugs in Java code.
PMD- It checks the code for unused fields, empty, try / catch / if / while / 
finally, block, unused method parameters and stuff like that.

Here are additional information – let me know what you think.
https://wiki.jenkins.io/display/JENKINS/FindBugs+Plugin
http://www.treselle.com/blog/static-code-analysis-jenkins/

Let me know what you think

Best regards
Catherine

From: Gary Wu [mailto:gary.i...@huawei.com]
Sent: Thursday, July 13, 2017 6:04 PM
To: Lefevre, Catherine <cl6...@intl.att.com<mailto:cl6...@intl.att.com>>; 
Alexis de Talhouët <adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com>>; 
onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org>
Subject: RE: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent

I’ve not seen the Jenkins Checkstyle plugin used by LF before, but I’ll follow 
up with LF to see if they can set it up.

Thanks,
Gary

From: Lefevre, Catherine [mailto:cl6...@intl.att.com]
Sent: Thursday, July 13, 2017 5:28 AM
To: Gary Wu 
<gary.i...@huawei.com<mailto:gary.i...@huawei.com<mailto:gary.i...@huawei.com%3cmailto:gary.i...@huawei.com>>>;
 Alexis de Talhouët 
<adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com%3cmailto:adetalhoue...@gmail.com>>>;
 
onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org%3cmailto:onap-discuss@lists.onap.org>>
Subject: RE: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent

Alexis, Gary,

We should also consider the following reference since ONAP is not only Java 
code base.

 *   Google Python Style Guideline: 
https://google.github.io/styleguide/pyguide.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__google.github.io_styleguide_pyguide.html&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=KX3AafyfxKw95Z9kMPL_eCRgyiQQRSCd9fEI4jHZJYo&s=6q5us07m_Wu6DvRE-ARfMmovQyoqKSBMKw6kvFdnTYw&e<https://google.github.io/styleguide/pyguide.html%3chttps:/urldefense.proofpoint.com/v2/url?u=https-3A__google.github.io_styleguide_pyguide.html&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=KX3AafyfxKw95Z9kMPL_eCRgyiQQRSCd9fEI4jHZJYo&s=6q5us07m_Wu6DvRE-ARfMmovQyoqKSBMKw6kvFdnTYw&e>=>
Here is another one concerning Check style Coverage.

 *   Google's Java Style Check style Coverage: 
http://checkstyle.sourceforge.net/google_style.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__checkstyle.sourceforge.net_google-5Fstyle.html&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=KX3AafyfxKw95Z9kMPL_eCRgyiQQRSCd9fEI4jHZJYo&s=px7wftOLSxi_9c5u0RXpSuW60DX3KjBiejvNtVV3YSM&e<http://checkstyle.sourceforge.net/google_style.html%3chttps:/urldefense.proofpoint.com/v2/url?u=http-3A__checkstyle.sourceforge.net_google-5Fstyle.html&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=KX3AafyfxKw95Z9kMPL_eCRgyiQQRSCd9fEI4jHZJYo&s=px7wftOLSxi_9c5u0RXpSuW60DX3KjBiejvNtVV3YSM&e>=>
These have been added as a comment to the ONAP wiki page
https://wiki.onap.org/display/DW/Java+code+style<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Java-2Bcode-2Bstyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=KX3AafyfxKw95Z9kMPL_eCRgyiQQRSCd9fEI4jHZJYo&s=aDFh1UsGf0ic4k7ghHUZ_t9gudIFo8Ixo-YU7TvsAcU&e<https://wiki.onap.org/display/DW/Java+code+style%3chttps:/urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Java-2Bcode-2Bstyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=KX3AafyfxKw95Z9kMPL_eCRgyiQQRSCd9fEI4jHZJYo&s=aDFh1UsGf0ic4k7ghHUZ_t9gudIFo8Ixo-YU7TvsAcU&e>=>

Best regards
Catherine

From: 
onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org%3cmailto:onap-discuss-boun...@lists.onap.org>>
 [mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of Lefevre, Catherine
Sent: Thursday, July 13, 2017 2:18 PM
To: Gary Wu 
<gary.i...@huawei.com<mailto:gary.i...@huawei.com<mailto:gary.i...@huawei.com%3cmailto:gary.i...@huawei.com>>>;
 Alexis de Talhouët 
<adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com%3cmailto:adetalhoue...@gmail.com>>>;
 
onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org%3cmailto:onap-discuss@lists.onap.org>>
Subject: Re: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent

Good morning Alexis, Gary,

I confirm that we can use CLAMP to do a pilot.
Will you also contact LF to integrate the Checkstyle plug-in to Jenkins as 
discussed during the Integration meeting?

Many thanks & regards
Catherine

From: 
onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org<mailto:onap-discuss-boun...@lists.onap.org%3cmailto:onap-discuss-boun...@lists.onap.org>>
 [mailto:onap-discuss-boun...@lists.onap.org] On Behalf Of Gary Wu
Sent: Wednesday, July 12, 2017 7:31 PM
To: Alexis de Talhouët 
<adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com<mailto:adetalhoue...@gmail.com%3cmailto:adetalhoue...@gmail.com>>>
Cc: 
onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org%3cmailto:onap-discuss@lists.onap.org>>
Subject: Re: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent

Looks like the Java code style was already documented by Gildas here:

1.     Developer 
Wiki<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Developer-2BWiki-3Fsrc-3Dbreadcrumbs-2Dexpanded&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=tQXxdbvC0p5VCQody6GiUzT2TKwgHvlqIqkuwjKbelY&e=>
 > Getting 
Involved<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Getting-2BInvolved-3Fsrc-3Dbreadcrumbs-2Dexpanded&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=mP6EAdoDsTZFzO8BTgXz9BUOgAqPE0LKdomBqQor3cM&e=>
 > Developer Best 
Practices<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Developer-2BBest-2BPractices-3Fsrc-3Dbreadcrumbs-2Dparent&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=gafwynFsHuSwTyYCpXl9A1TDUefYkXhbqsqCe9uOlHg&e=>
 > Java code style
https://wiki.onap.org/display/DW/Java+code+style<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Java-2Bcode-2Bstyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=7qWaAq1MdmNk3zQBaxmdzi5H_8B-oaQnGT594fcuA3Q&e<https://wiki.onap.org/display/DW/Java+code+style%3chttps:/urldefense.proofpoint.com/v2/url?u=https-3A__wiki.onap.org_display_DW_Java-2Bcode-2Bstyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=7qWaAq1MdmNk3zQBaxmdzi5H_8B-oaQnGT594fcuA3Q&e>=>

Thanks,
Gary

From: Alexis de Talhouët [mailto:adetalhoue...@gmail.com]
Sent: Wednesday, July 12, 2017 3:32 AM
To: Gary Wu 
<gary.i...@huawei.com<mailto:gary.i...@huawei.com<mailto:gary.i...@huawei.com%3cmailto:gary.i...@huawei.com>>>
Cc: Gildas Lanilis 
<gildas.lani...@huawei.com<mailto:gildas.lani...@huawei.com<mailto:gildas.lani...@huawei.com%3cmailto:gildas.lani...@huawei.com>>>;
 LEFEVRE, CATHERINE 
<cl6...@intl.att.com<mailto:cl6...@intl.att.com<mailto:cl6...@intl.att.com%3cmailto:cl6...@intl.att.com>>>;
 
onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org%3cmailto:onap-discuss@lists.onap.org>>
Subject: Re: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent

Ok, good. Thanks for the pointers. Google Java Style what is use as well in 
ODL, so I can say I'm already familiar with them :)
One we have a wiki for that, I strongly believe advertising this widly (through 
this mailing list) can be a good start to get devs onboard and/or familiar with 
the check styles rules that would be enforced.

Thanks,
Alexis

Le mardi 11 juillet 2017, Gary Wu 
<gary.i...@huawei.com<mailto:gary.i...@huawei.com<mailto:gary.i...@huawei.com%3cmailto:gary.i...@huawei.com>>>
 a écrit :
Currently we’re using what was defined for OPEN-O:  
https://wiki.open-o.org/display/GI/OPEN-O+Java+code+style<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.open-2Do.org_display_GI_OPEN-2DO-2BJava-2Bcode-2Bstyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=NrgqXtgwAtTFP6pIW2z7W9b2I3Yoi1aWHmD-QZr2YFQ&e<https://wiki.open-o.org/display/GI/OPEN-O+Java+code+style%3chttps:/urldefense.proofpoint.com/v2/url?u=https-3A__wiki.open-2Do.org_display_GI_OPEN-2DO-2BJava-2Bcode-2Bstyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=NrgqXtgwAtTFP6pIW2z7W9b2I3Yoi1aWHmD-QZr2YFQ&e>=>,
 namely:

Google Java Style with some modifications:
4.2 Block indentation: +4 spaces
4.4 Column limit: 120

Gildas, any ideas where we should put this in the ONAP wiki?

Thanks,
Gary

From: Alexis de Talhouët 
[mailto:adetalhoue...@gmail.com<javascript:_e(%7B%7D,'cvml','adetalhoue...@gmail.com');><mailto:adetalhoue...@gmail.com%3cjavascript:_e(%7B%7D,'cvml','adetalhoue...@gmail.com');%3e>]
Sent: Tuesday, July 11, 2017 2:11 PM
To: Gary Wu 
<gary.i...@huawei.com<javascript:_e(%7B%7D,'cvml','gary.i...@huawei.com');<mailto:gary.i...@huawei.com%3cjavascript:_e(%7B%7D,'cvml','gary.i...@huawei.com');>>>
Cc: LEFEVRE, CATHERINE 
<cl6...@intl.att.com<javascript:_e(%7B%7D,'cvml','cl6...@intl.att.com');<mailto:cl6...@intl.att.com%3cjavascript:_e(%7B%7D,'cvml','cl6...@intl.att.com');>>>;
 
onap-discuss@lists.onap.org<javascript:_e(%7B%7D,'cvml','onap-discuss@lists.onap.org')<mailto:onap-discuss@lists.onap.org%3cjavascript:_e(%7B%7D,'cvml','onap-discuss@lists.onap.org')>;>
Subject: Re: [onap-discuss] [integration] Refactor CLAMP to inherit from oparent


On Jul 11, 2017, at 2:27 PM, Gary Wu 
<gary.i...@huawei.com<javascript:_e(%7B%7D,'cvml','gary.i...@huawei.com');<mailto:gary.i...@huawei.com%3cjavascript:_e(%7B%7D,'cvml','gary.i...@huawei.com');>>>
 wrote:

Hi Catherine,

In today’s Integration meeting, we discussed having CLAMP pilot trials around 
coding styles.  In OPEN-O we centrally defined coding styles in the oparent 
project/repo, and it would be great if we can do likewise for ONAP so we can 
avoid duplicate or conflicting definitions across projects.  Do you think we 
can have CLAMP do a pilot run on inheriting from oparent as well?

Is there an place where the code style rules have been explained? I believe a 
wiki page to explain what are the agreed rules could help, similar to what ODL 
has here: 
https://wiki.opendaylight.org/view/BestPractices/Coding_Guidelines#General_Code_Style<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.opendaylight.org_view_BestPractices_Coding-5FGuidelines-23General-5FCode-5FStyle&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=jClgbS9I2MBlF3aZ3PCMufqDq9MCePb54KYqvpr22u4&e=>

At any rate, thanks for putting this up! It’s going to be a long journey to 
enforce checkstyle considering the amount of LoC in ONAP.

Thanks,
Alexis


To recap the goals of oparent:  centrally define shared parent POM definitions 
such as nexus (distributionManagement) location, coding styles, license checks, 
coding style checks, sonar setup, etc.

To inherit from oparent:  modify the project’s POM to ensure that all POM files 
ultimately inherit from

   <parent>
       <groupId>org.onap.oparent</groupId>
       <artifactId>oparent</artifactId>
       <version>1.0.0-SNAPSHOT</version>
   </parent>

And also remove any local definitions within the project POMs around 
distributionManagement, coding styles, etc., so that those properties are 
derived from oparent instead.

Please let us know if you run into anything that would require changes or 
enhancements to the oparent POMs.

Thanks,
Gary


_______________________________________________
onap-discuss mailing list
onap-discuss@lists.onap.org<javascript:_e(%7B%7D,'cvml','onap-discuss@lists.onap.org')<mailto:onap-discuss@lists.onap.org%3cjavascript:_e(%7B%7D,'cvml','onap-discuss@lists.onap.org')>;>
https://lists.onap.org/mailman/listinfo/onap-discuss<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.onap.org_mailman_listinfo_onap-2Ddiscuss&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=gy1JVtzwYCSVB2ip5Cg8F12_ifdLzWwUA1ciuKS9ENY&e<https://lists.onap.org/mailman/listinfo/onap-discuss%3chttps:/urldefense.proofpoint.com/v2/url?u=https-3A__lists.onap.org_mailman_listinfo_onap-2Ddiscuss&d=DwMGaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=66ObImPAUA0o2f1hTGknnnv5ScXvX8EnREJCPHHBY5M&m=sZve6ovGP3QNz9Fb83x8a6AH6iuvZlx0AYCJSR46RcU&s=gy1JVtzwYCSVB2ip5Cg8F12_ifdLzWwUA1ciuKS9ENY&e>=>

<winmail.dat>

_______________________________________________
onap-discuss mailing list
onap-discuss@lists.onap.org
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to