Skip to main content
Inspiring
Dec 2, 2010 6:28 PM UTC
Question

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

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

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

clintmodien
Known Participant
Dec 2, 2010 7:21 PM UTC

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

Translate
Inspiring
Dec 3, 2010 1:02 PM UTC

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.

Translate