sfdc-generate-codeclimate-coverage
v1.0.5
Published
Code coverage converter to codeclimate format from deployment result
Downloads
19
Readme
sfdc-generate-codeclimate-coverage
Code coverage converter to codeclimate format from deployment result
Getting Started
Works in Unix like system. Windows is not tested.
Installing
npm install -g sfdc-generate-codeclimate-coverage
or
yarn globally add sfdc-generate-codeclimate-coverage
Usage
Command Line
$ sgc -h
Usage: sgc [options]
Code coverage converter to codeclimate format from deployment result
Options:
-t, --repotoken code climate repo tok
-c, --commit commit sha
-b, --branch branch name
-r, --repo salesforce repository path : ['.']
-d, --deployfile salesforce deploy result containing file : ['./deployResult.json']
-o, --output salesforce code climate coverage output file : ['./coverage.json']
Module
const sgc = require('sfdc-generate-codeclimate-coverage');
let deployResult = {} // deployment result file, pipe it from deployment or read it from a file
sgc({
'repotoken':'azertyuioiuytrez', // code climate repo token
'commit': 'oiuyrertyuiopoiuy', // git commit id
'branch': 'master', // branch name on which the deploy has been done
'repo': '.', // salesforce metadata repository
},deployResult,console.log)
.then(coverage => {
console.log(coverage); // pipe it or write it to a file
});
Built With
- commander - The complete solution for node.js command-line interfaces, inspired by Ruby's commander.
Versioning
SemVer is used for versioning.
Authors
- Sebastien Colladon - Initial work - scolladon
License
This project is licensed under the MIT License - see the LICENSE.md file for details