Skip to content

Commit bda9cbf

Browse files
committed
docs: update coverage-path command-line and configuration
1 parent 878767e commit bda9cbf

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

docs/command-line.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bashunit test tests/ --parallel --simple
6767
| `-l, --login` | Run tests in login shell context |
6868
| `--no-color` | Disable colored output |
6969
| `--coverage` | Enable code coverage tracking |
70-
| `--coverage-paths <paths>` | Paths to track (default: `src/`) |
70+
| `--coverage-paths <paths>` | Paths to track (default: auto-discover) |
7171
| `--coverage-exclude <pat>` | Exclusion patterns |
7272
| `--coverage-report <file>` | LCOV output path (default: `coverage/lcov.info`) |
7373
| `--coverage-report-html <dir>` | Generate HTML report with line highlighting |
@@ -311,7 +311,7 @@ bashunit test tests/ --coverage --coverage-paths src/,lib/ --coverage-min 80
311311
| Option | Description |
312312
|---------------------------------|-----------------------------------------------------------------------------|
313313
| `--coverage` | Enable coverage tracking |
314-
| `--coverage-paths <paths>` | Comma-separated paths to track (default: `src/`) |
314+
| `--coverage-paths <paths>` | Comma-separated paths to track (default: auto-discover from test files) |
315315
| `--coverage-exclude <patterns>` | Comma-separated patterns to exclude (default: `tests/*,vendor/*,*_test.sh`) |
316316
| `--coverage-report <file>` | LCOV output file path (default: `coverage/lcov.info`) |
317317
| `--coverage-report-html <dir>` | Generate HTML coverage report with line-by-line highlighting |

docs/configuration.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,16 @@ BASHUNIT_COVERAGE=true
450450

451451
> `BASHUNIT_COVERAGE_PATHS=paths`
452452
453-
Comma-separated list of paths to track for coverage. `src/` by default.
453+
Comma-separated list of paths to track for coverage.
454+
455+
By default, paths are auto-discovered from test file names (e.g., `tests/unit/assert_test.sh` discovers `src/assert.sh`).
454456

455457
::: code-group
456458
```bash [.env]
457-
# Single path
459+
# Single path (explicit)
458460
BASHUNIT_COVERAGE_PATHS=src/
459461

460-
# Multiple paths
462+
# Multiple paths (explicit)
461463
BASHUNIT_COVERAGE_PATHS=src/,lib/,bin/
462464
```
463465
:::

0 commit comments

Comments
 (0)