iOS Development Jenkins (Dryplugin) +PMD/CPD detect Duplicate code

Source: Internet
Author: User
1. Build Jenkins

Reference: Http://blog.csdn.net/xiaofei125145/article/details/51144827?locationNum=1 2, install DRY plugin

DRY Plug-in


3. Download PMD

https://sourceforge.net/projects/pmd/files/pmd/
4, decompression PMD and placed in the designated directory

I placed it in the ~/pmd/directory 5, new and configured Jenkins project 1 free-style software project 2 Configure SVN or git warehouse address 3 Add build step

Execute Shell

Export heapsize=4096m
~/pmd/pmd-bin-5.5.1/bin/run.sh CPD--minimum-tokens  --format XML--language Objectivec--encoding UTF-8--files Pods--skip-duplicate-files > Cpd.xml | | Exit 0


Please do not directly copy the shell code, do not understand the shell code students see

PMD/CPD Use Help document links

Https://pmd.github.io/pmd-5.5.1/usage/cpd-usage.html


4 Add the build operation and configure the Duplicate code results directory, note the reference to build the shell of my configuration please look at the picture

> Cpd.xml

Select Publish Duplicate Code Analysis results (if the Jenkins Dry plugin is not installed, the health does not have this option)


after the configuration, as shown in figure:








PMD/CPD Use Help document links

Https://pmd.github.io/pmd-5.5.1/usage/cpd-usage.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.