Skip to content

Instantly share code, notes, and snippets.

@marklarr
Last active December 27, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marklarr/7314514 to your computer and use it in GitHub Desktop.
Save marklarr/7314514 to your computer and use it in GitHub Desktop.
simian_to_cpd
  1. Change encoding to UTF-8
  2. insert <?xml-stylesheet href="simian.xsl" type="text/xsl"?> on second line

PMD-CPD

  1. Node pmd-cpd becomes <simian version="2.3.34">
  2. Nest another node
<check failOnDuplication="true" ignoreCharacterCase="true" ignoreCurlyBraces="true" ignoreIdentifierCase="true" ignoreModifiers="true" ignoreStringCase="true" threshold="6"

inside

Duplication Nodes

  1. duplication nodes become set nodes
  2. lines attribute becomes lineCount
  3. Remove tokens attribute

File nodes

  1. file nodes becomes block
  2. path attribute becomes sourceFile
  3. line attribute becomes startLineNumber
  4. make new endLineNumber attribute, which is duplcation['lines'] + startLineNumber - 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment