• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Is there a way to fail a build on duplicate code detected by FlexCPD

Explorer ,
Dec 02, 2010 Dec 02, 2010

Copy link to clipboard

Copied

Hi,

In Ant scripts we could set failonruleviolation="true" when executing FlexPMD and this will lead to failed build on violations.

Is there something similar for FlexCPD?

Thanks

TOPICS
FlexPMD

Views

757

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2010 Dec 02, 2010

Copy link to clipboard

Copied

Here's the targets i used... it requires ant-contrib though...

<mkdir dir="$/reports/flexcpd" /> <cpd minimumTokens="40" outputFile="reports/flexcpd/cpd.xml" sourceDirectory="$" />

</target

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

LATEST

Thanks for the reply.

I believe the target which you sent is for executing FlexCPD however it won't mark the build as failed in case there are code duplications. It will always finish as "BUILD SUCCESSFUL".

I was looking for something quick I could implement to have the build failed on code duplications.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines