Skip to content

Commit a64a3ba

Browse files
authored
docs: add format section
1 parent 25ae5d0 commit a64a3ba

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,15 @@
1313
- [What this Plugin fixes in the Salesforce CLI Coverage Reports](#what-this-plugin-fixes-in-the-salesforce-cli-coverage-reports)
1414
- [Command](#command)
1515
- [`sf acc-transformer transform`](#sf-acc-transformer-transform)
16+
- [Coverage Report Formats](#coverage-report-formats)
1617
- [Hook](#hook)
1718
- [Debugging](#debugging)
1819
- [Example](#example)
1920
- [Issues](#issues)
2021
- [License](#license)
2122
</details>
2223

23-
A Salesforce CLI plugin to transform the Apex code coverage JSON files created during deployments and test runs into the following formats:
24-
- SonarQube (XML)
25-
- Cobertura (XML)
26-
- LCovOnly (INFO)
27-
- Clover (XML)
28-
29-
These formats are accepted by SonarQube, GitHub, GitLab, etc.
24+
A Salesforce CLI plugin to transform the Apex code coverage JSON files created during deployments and test runs into various formats accepted by SonarQube, GitHub, GitLab, etc.
3025

3126
If there's a coverage format not yet supported by this plugin, feel free to provide a pull request or issue for the coverage format.
3227

@@ -98,7 +93,6 @@ FLAGS
9893
-r, --output-report=<value> Path to the code coverage file that will be created by this plugin.
9994
[default: "coverage.[xml/info]"]
10095
-f, --format=<value> Output format for the code coverage format.
101-
Valid options are "sonar", "clover", "lcovonly", or "cobertura".
10296
[default: "sonar"]
10397
10498
GLOBAL FLAGS
@@ -117,6 +111,17 @@ EXAMPLES
117111
$ sf acc-transformer transform -j "coverage.json" -r "coverage.info" -f "lcovonly"
118112
```
119113

114+
## Coverage Report Formats
115+
116+
The `-f'/`--format` flag allows you to specify the format of the coverage report.
117+
118+
| Flag Option | Description |
119+
|-------------|-------------|
120+
| `sonar` | Generates a SonarQube-compatible coverage report. This is the default option. |
121+
| `clover` | Produces a Clover XML report format, commonly used with Atlassian tools. |
122+
| `lcovonly` | Outputs coverage data in LCOV format, useful for integrating with LCOV-based tools. |
123+
| `cobertura` | Creates a Cobertura XML report, a widely used format for coverage reporting. |
124+
120125
## Hook
121126

122127
A post-run hook has been configured if you opt into using it by creating a `.apexcodecovtransformer.config.json` config file in the root of your repo. If the config file is found, the post-run hook will automatically run after the following commands:

0 commit comments

Comments
 (0)