Skip to content

Commit 0e4d627

Browse files
committed
update readme with --precision option
1 parent 7a190ac commit 0e4d627

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ If you don't specify the `--require/-r` flag, only the percentage of code covera
3939
./vendor/bin/coverage-check clover.xml --require=50
4040
./vendor/bin/coverage-check clover.xml -r 80.5
4141
./vendor/bin/coverage-check clover.xml -m statement -r 75
42+
./vendor/bin/coverage-check clover.xml --precision=1
4243
```
4344

4445
## Available Options
@@ -47,6 +48,7 @@ If you don't specify the `--require/-r` flag, only the percentage of code covera
4748
| --- | --- |
4849
| `--coverage-only` or `-C` | Only display the code coverage value |
4950
| `--metric` or `-m` `<name>` | Use the specified metric field for calculating coverage. Valid values are `element` _(default)_, `method`, or `statement` |
51+
| `--precision` or `-p` `<value>` | Use the specified precision when calculating the code coverage percentage, where `<value>` is an integer _(default: 4)_ |
5052
| `--require` or `-r` `<value>` | Enforce a minimum code coverage value, where `<value>` is an integer or decimal value |
5153

5254
## Metric fields
@@ -104,7 +106,7 @@ jobs:
104106
run: ./vendor/bin/phpunit --coverage-clover clover.xml
105107

106108
- name: Enforce 75% code coverage
107-
run: ./vendor/bin/coverage-check clover.xml --require=75
109+
run: ./vendor/bin/coverage-check clover.xml --require=75 --precision=2
108110
```
109111
110112
## Testing

0 commit comments

Comments
 (0)