You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86-5Lines changed: 86 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
-[License](#license)
19
19
</details>
20
20
21
-
A Salesforce CLI plugin to transform the Apex code coverage JSON files created during deployments and test runs into SonarQube format or Cobertura format.
21
+
A Salesforce CLI plugin to transform the Apex code coverage JSON files created during deployments and test runs into SonarQube, Cobertura, or Clover format.
22
22
23
23
## Install
24
24
@@ -36,7 +36,7 @@ When the plugin is unable to find the Apex file from the Salesforce CLI coverage
36
36
37
37
## Creating Code Coverage Files with the Salesforce CLI
38
38
39
-
**This tool will only support the "json" coverage format from the Salesforce CLI. Do not use the "json-summary" or "cobertura" format from the Salesforce CLI.**
39
+
**This tool will only support the "json" coverage format from the Salesforce CLI. Do not use the "json-summary", "clover", or "cobertura" format from the Salesforce CLI.**
40
40
41
41
To create the code coverage JSON when deploying or validating, append `--coverage-formatters json --results-dir "coverage"` to the `sf project deploy` command. This will create a coverage JSON in this relative path - `coverage/coverage/coverage.json`.
42
42
@@ -72,19 +72,21 @@ FLAGS
72
72
-x, --xml=<value> Path to the code coverage XML file that will be created by this plugin.
73
73
[default: "coverage.xml"]
74
74
-f, --format=<value> Output format for the code coverage format.
75
-
Valid options are "sonar" or "cobertura".
75
+
Valid options are "sonar", "clover", or "cobertura".
76
76
[default: "sonar"]
77
77
78
78
GLOBAL FLAGS
79
79
--json Format output as json.
80
80
81
81
DESCRIPTION
82
-
Transform the Apex code coverage JSON file created by the Salesforce CLI deploy and test command into SonarQube or Cobertura format.
82
+
Transform the Apex code coverage JSON file created by the Salesforce CLI deploy and test command into SonarQube, Clover, or Cobertura format.
83
83
84
84
EXAMPLES
85
85
$ sf acc-transformer transform -j "coverage.json" -x "coverage.xml" -f "sonar"
86
86
87
87
$ sf acc-transformer transform -j "coverage.json" -x "coverage.xml" -f "cobertura"
88
+
89
+
$ sf acc-transformer transform -j "coverage.json" -x "coverage.xml" -f "clover"
88
90
```
89
91
90
92
## Hook
@@ -109,7 +111,7 @@ The `.apexcodecovtransformer.config.json` should look like this:
109
111
-`deployCoverageJsonPath` is required to use the hook after deployments and should be the path to the code coverage JSON created by the Salesforce CLI deployment command. Recommend using a relative path.
110
112
-`testCoverageJsonPath` is required to use the hook after test runs and should be the path to the code coverage JSON created by the Salesforce CLI test command. Recommend using a relative path.
111
113
-`coverageXmlPath` is optional and should be the path to the code coverage XML created by this plugin. Recommend using a relative path. If this isn't provided, it will default to `coverage.xml` in the working directory.
112
-
-`format` is optional and should be the intended output format for the code coverage XML created by this plugin. Options are "sonar" or "cobertura". If this isn't provided, it will default to "sonar".
114
+
-`format` is optional and should be the intended output format for the code coverage XML created by this plugin. Options are "sonar", "clover", or "cobertura". If this isn't provided, it will default to "sonar".
113
115
114
116
If the `.apexcodecovtransformer.config.json` file isn't found, the hook will be skipped.
115
117
@@ -315,6 +317,85 @@ and this format for Cobertura:
If you encounter any issues, please create an issue in the repository's [issue tracker](https://github.com/mcarvin8/apex-code-coverage-transformer/issues). Please also create issues to suggest any new features.
Copy file name to clipboardExpand all lines: package.json
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "apex-code-coverage-transformer",
3
-
"description": "Transforms the Apex code coverage JSON created during Salesforce deployments and test runs into SonarQube or Cobertura format.",
3
+
"description": "Transforms the Apex code coverage JSON created during Salesforce deployments and test runs into SonarQube, Clover, or Cobertura format.",
0 commit comments