Class: FlexPMD::FCPD
- Inherits:
-
Executable::Base
- Object
- Sprout::Executable::Base
- Executable::Base
- FlexPMD::FCPD
- 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
-
#executable ⇒ Object
The default executable target.
-
#minimum_tokens ⇒ Object
The minmum length of matched portions of code.
-
#output_file ⇒ Object
The file to output results to.
-
#source_directory ⇒ Object
The source directory to recursively audit.
Methods inherited from Executable::Base
Instance Method Details
#executable ⇒ Object
The default executable target.
42 |
# File 'lib/flexpmd/cpd.rb', line 42 set :executable, :flexcpd |
#minimum_tokens ⇒ Object
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_file ⇒ Object
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_directory ⇒ Object
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' } |