Skip to content

Commit 1b78e07

Browse files
committed
docs(cli): document fmt/lint/check commands and updated exclude defaults
The CLI now includes fmt, lint, and check subcommands for code quality maintenance, and the default exclude patterns have been expanded from an empty array to 13 common build/dependency directories. This update reflects the actual CLI behavior, helping users discover the new code quality commands and understand the default file filtering without needing to consult the source code.
1 parent 0b06dd1 commit 1b78e07

2 files changed

Lines changed: 74 additions & 9 deletions

File tree

docs/configuration.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,21 @@ The first file found is used. JSONC files support `//` and `/* */` comments.
3939
}
4040
```
4141

42-
| Option | Description | Default |
43-
| ---------------- | ----------------------------------------- | ------------------------------- |
44-
| `includes` | Glob patterns for scenario file discovery | `["probitas/**/*.probitas.ts"]` |
45-
| `excludes` | Glob patterns to exclude from discovery | `[]` |
46-
| `reporter` | Output reporter: `list`, `json` | `"list"` |
47-
| `maxConcurrency` | Maximum parallel scenario execution | unlimited (`0`) |
48-
| `maxFailures` | Maximum failures before stopping | unlimited (`0`) |
49-
| `timeout` | Default timeout for scenarios | `"30s"` |
50-
| `selectors` | Default selectors for filtering scenarios | `[]` |
42+
| Option | Description | Default |
43+
| ---------------- | ----------------------------------------- | ------------------------------------- |
44+
| `includes` | Glob patterns for scenario file discovery | `["probitas/**/*.probitas.ts"]` |
45+
| `excludes` | Glob patterns to exclude from discovery | Common build/dependency directories\* |
46+
| `reporter` | Output reporter: `list`, `json` | `"list"` |
47+
| `maxConcurrency` | Maximum parallel scenario execution | unlimited (`0`) |
48+
| `maxFailures` | Maximum failures before stopping | unlimited (`0`) |
49+
| `timeout` | Default timeout for scenarios | `"30s"` |
50+
| `selectors` | Default selectors for filtering scenarios | `[]` |
51+
52+
\*Default exclude patterns:
53+
54+
- `**/node_modules/**`, `**/target/**`, `**/.venv/**`, `**/venv/**`,
55+
`**/__pycache__/**`, `**/vendor/**`, `**/build/**`, `**/bin/**`, `**/obj/**`,
56+
`**/.git/**`, `**/dist/**`, `**/coverage/**`
5157

5258
### maxFailures
5359

docs/overview.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,65 @@ probitas run -s tag:example
101101
probitas run --reporter json
102102
```
103103

104+
## Code Quality Commands
105+
106+
Probitas provides commands to maintain code quality in your scenario files:
107+
108+
```bash
109+
# Format scenario files
110+
probitas fmt
111+
112+
# Lint scenario files
113+
probitas lint
114+
115+
# Type-check scenario files
116+
probitas check
117+
```
118+
119+
These commands run Deno's built-in tools on discovered scenario files. They use
120+
the same file discovery mechanism as `probitas run`, respecting your `includes`
121+
and `excludes` configuration.
122+
123+
### fmt
124+
125+
Formats scenario files using `deno fmt`:
126+
127+
```bash
128+
probitas fmt # Format all discovered scenarios
129+
probitas fmt probitas/auth/ # Format specific directory
130+
```
131+
132+
### lint
133+
134+
Lints scenario files using `deno lint`. Automatically excludes rules that
135+
conflict with scenario imports (`no-import-prefix`, `no-unversioned-import`):
136+
137+
```bash
138+
probitas lint # Lint all discovered scenarios
139+
probitas lint probitas/auth/ # Lint specific directory
140+
```
141+
142+
### check
143+
144+
Type-checks scenario files using `deno check`:
145+
146+
```bash
147+
probitas check # Type-check all discovered scenarios
148+
probitas check probitas/auth/ # Type-check specific directory
149+
```
150+
151+
### Common Options
152+
153+
All code quality commands support these options:
154+
155+
```bash
156+
--include <pattern> # Include pattern for file discovery (repeatable)
157+
--exclude <pattern> # Exclude pattern for file discovery (repeatable)
158+
--config <path> # Path to probitas config file
159+
-v, --verbose # Verbose output
160+
-q, --quiet # Suppress output
161+
```
162+
104163
### Tag-Based Filtering
105164

106165
Organize scenarios with tags for easy filtering:

0 commit comments

Comments
 (0)