diff --git a/README.md b/README.md index b0c05f5..0b2a710 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ sfdx force:source:deploy --wait 60 --checkonly --manifest manifest/package.xml - ``` ```sh -sfdx nps:coverage:verify --path test-results/results.json --requiredcoverage 90 --classes AccountTriggerHandler,ContactTriggerHandler +sfdx nps:coverage:verify --path test-results/results.json --required-coverage 90 --classes AccountTriggerHandler,ContactTriggerHandler ``` ## Getting Started @@ -85,7 +85,7 @@ FLAGS -p, --path= (required) project relative path to the json file containing the test execution results - -r, --requiredcoverage= [default: 75] number of the + -r, --required-coverage= [default: 75] number of the percentage of coverage treshold to reach --json format output as json @@ -96,10 +96,10 @@ DESCRIPTION Verifies that specified apex classes have a coverage above a certain treshold EXAMPLES - $ sfdx coverage:verify --path test-results/results.json --requiredcoverage 90 --classes AccountTriggerHandler,ContactTriggerHandler + $ sfdx coverage:verify --path test-results/results.json --required-coverage 90 --classes AccountTriggerHandler,ContactTriggerHandler ``` -_See code: [src/commands/nps/coverage/verify.ts](https://github.com/Nakama-Partnering-Services/nakama-plugin-sfdx/blob/v1.0.0/src/commands/nps/coverage/verify.ts)_ +_See code: [src/commands/nps/coverage/verify.ts](https://github.com/Nakama-Partnering-Services/nakama-plugin-sfdx/blob/v1.0.2/src/commands/nps/coverage/verify.ts)_ ## Walkthrough diff --git a/messages/verify.json b/messages/verify.json index 467f156..820ec2b 100644 --- a/messages/verify.json +++ b/messages/verify.json @@ -11,6 +11,6 @@ "errorInsufficientCoverageForClasses": "Included apex classes should met at least the required coverage of %s%. Classes without enough coverage: %s", "noClassesWithInsufficientCoverage": "No classes with insufficient coverage found", "examples": [ - "sfdx coverage:verify --path test-results/results.json --requiredcoverage 90 --classes AccountTriggerHandler,ContactTriggerHandler" + "sfdx coverage:verify --path test-results/results.json --required-coverage 90 --classes AccountTriggerHandler,ContactTriggerHandler" ] } \ No newline at end of file diff --git a/package.json b/package.json index b8734bc..ac57b28 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nakama-plugin-sfdx", "description": "This plugin provides commands to work with the coverage files generated by other commands such as sfdx force:source:deploy or sfdx force:apex:test:run", - "version": "1.0.0", + "version": "1.0.2", "author": "Gabriel Serrano @jdkgabri", "bugs": "https://github.com/Nakama-Partnering-Services/nakama-plugin-sfdx/issues", "dependencies": { diff --git a/src/commands/nps/coverage/verify.ts b/src/commands/nps/coverage/verify.ts index efbcfed..58c3809 100644 --- a/src/commands/nps/coverage/verify.ts +++ b/src/commands/nps/coverage/verify.ts @@ -20,22 +20,22 @@ export default class Verify extends SfdxCommand { path: flags.string({ char: 'p', description: messages.getMessage('pathToFileFlagDescription'), - required: true, + required: true }), - requiredcoverage: flags.number({ + 'required-coverage': flags.number({ char: 'r', description: messages.getMessage('requiredCoverageFlagDescription'), - default: 75, + default: 75 }), classes: flags.string({ char: 'c', description: messages.getMessage('classesToCheckFlagDescription'), - required: true, + required: true }) }; public async run(): Promise { - const requiredCoverage = (this.flags.requiredcoverage || 75) as number; + const requiredCoverage = (this.flags['required-coverage'] || 75) as number; let deploymentResult; try {