0.3.0 • Published 9 years ago

grunt-convert-plato-tsv v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

grunt-convert-plato-tsv

Overview

Convert plato report to TSV (Tab Separated Values) format report.

This suits to quality evaluation in Excel.

Usage

Before run "convert-plato-tsv" task, you should run "plato" task.

grunt.initConfig({
  plato : {
    target : {
      files : {
        'PLATO_REPORT_DIRECTORY' : [ 'src/*.js' ]
      }
    } 
  },
  "convert-plato-tsv" : {
    target : {
      options : {
        plato : 'PLATO_REPORT_DIRECTORY',
        output : 'PLATO_TSV_REPORT_DIRECTORY'
      }
    }
  }
});

grunt.loadNpmTasks('grunt-plato');
grunt.loadNpmTasks('grunt-convert-plato-tsv');
grunt.registerTask('default', ['plato', 'convert-plato-tsv']);

Options

plato

Type: String
Default: undefined (Must be set)

Plato report directory.

output

Type: String
Default: undefined (Must be set)

TSV report directory.

ext

Type: String Default: 'tsv'

Extention of TSV report file.

newline

Type: String
Default: depend on operating system

NewLine character. For example: '\n', '\r', '\r\n'

locale

Type: String
Default: 'en'

Locale of TSV header line. Support the following locale.

  • en (English) (default)
  • ja (Japanese)

header

Type: Object
Default: undefined

Set any header names. This option is prior to locale option.

For example:

header: {
  module : 'Module',
  name : 'Name',
  line : 'Line',
  maintainability : 'Maintainability',
  slocPhysical : 'Physical SLOC',
  slocLogical : 'Logical SLOC',
  parameterCount : 'Parameter Count',
  cyclomaticComplexity : 'Cyclomatic Complexity',
  cyclomaticDensity : 'Cyclomatic Density',
  halsteadLength : 'Halstead Length',
  halsteadVocabulary : 'Halstead Vocabulary',
  halsteadDifficulty : 'Halstead Difficulty',
  halsteadVolume : 'Halstead Volume',
  halsteadEffort : 'Halstead Effort',
  halsteadBugs : 'Halstead Bugs'
}

Output

summary.tsv

Output metrics per module.

functions.tsv

Output metrics per function.

0.3.0

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago