Class: FlexPMD::FCPD

Inherits:
Executable::Base show all
Defined in:
lib/flexpmd/cpd.rb

Overview

Flex Copy and Paste Detector

(-s|--sourceDirectory) <sourceDirectory>
(-o|--outputFile) <outputFile>
(-m|–minimumTokens) <minimumTokens>]

Instance Method Summary collapse

Methods inherited from Executable::Base

#system_execute

Instance Method Details

#executableObject

The default executable target.



42
# File 'lib/flexpmd/cpd.rb', line 42

set :executable, :flexcpd

#minimum_tokensObject

The minmum length of matched portions of code. A token roughly translates to a word, method name, operator etc. As this is subjective experiment to find a useful value. 50 to 100 is a reasonable starting point, the lower the better.



35
# File 'lib/flexpmd/cpd.rb', line 35

add_param :minimum_tokens, Number, { :shell_name => '-m', :default => 50 }

#output_fileObject

The file to output results to.



24
# File 'lib/flexpmd/cpd.rb', line 24

add_param :output_file, File, { :shell_name => '-o', :file_task_name => true, :default => 'report/cpd.xml' }

#source_directoryObject

The source directory to recursively audit



15
# File 'lib/flexpmd/cpd.rb', line 15

add_param :source_directory, Path, { :required => true, :shell_name => '-s', :default => 'src' }