Skip to content

Commit 68d828e

Browse files
authored
Add all conformance runner flags to the documentation (#285)
1 parent 7a3f7eb commit 68d828e

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

docs/conformance.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ make conformance
2020

2121
You can customize the behavior of the tests using the following flags:
2222

23-
| Flag | Description | Default Value |
24-
|------------------------|------------------------------------------------------|---------------|
25-
| `--suite <regex>` | Filter suites using the provided regular expression. | None |
26-
| `--case <regex>` | Filter cases using the provided regular expression. | None |
27-
| `--timeout <duration>` | Set a per-suite timeout. | 5 seconds |
28-
| `--verbose`, `-v` | Enable verbose output. | `false` |
29-
| `--strict` | Enable strict mode. | `false` |
30-
| `--json` | Return results as JSON to stdout. | `false` |
31-
| `--proto` | Return results as binary serialized proto to stdout. | `false` |
32-
| `--dump` | Output the expected results, without a command. | `false` |
33-
| `--expected_failures` | `.yaml` file containing list of expected failures | None |
23+
| Flag | Description | Default Value |
24+
|------------------------|-----------------------------------------------------------------------------------------------------|---------------|
25+
| `--suite <regex>` | Filter suites using the provided regular expression. | None |
26+
| `--case <regex>` | Filter cases using the provided regular expression. | None |
27+
| `--timeout <duration>` | Set a per-suite timeout. | 5 seconds |
28+
| `--verbose`, `-v` | Enable verbose output. | `false` |
29+
| `--strict` | Enable strict mode. Require that the violation type is an exact match. | `false` |
30+
| `--strict_message` | Require that violation messages match the expected message exactly. | `false` |
31+
| `--strict_error` | Require that compile-time errors are distinguished from runtime errors. | `false` |
32+
| `--json` | Return results as JSON serialized message `buf.validate.conformance.harness.ResultSet` to stdout. | `false` |
33+
| `--proto` | Return results as binary serialized message `buf.validate.conformance.harness.ResultSet` to stdout. | `false` |
34+
| `--dump` | Output the expected results, without a command. | `false` |
35+
| `--expected_failures` | `.yaml` file containing list of expected failures | None |
3436

3537
## Components
3638

@@ -59,7 +61,7 @@ For a reference implementation, see [Go's conformance test executor][pv-go].
5961
The test messages are defined in [`.proto` files][cases-proto]. These are
6062
utilized to make concrete message _test cases_ which are organized into groups
6163
known as [_test suites_][suites]. Which tests are passed to the executor can be
62-
controlled through the `-suite` and `-case` flags mentioned above.
64+
controlled through the `--suite` and `--case` flags mentioned above.
6365

6466
### Expected Failures
6567

tools/protovalidate-conformance/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func parseFlags() (*config, error) {
6363
flag.StringVar(&cfg.caseFilterPattern, "case", cfg.caseFilterPattern, "regex to filter cases")
6464
flag.DurationVar(&cfg.suiteTimeout, "timeout", cfg.suiteTimeout, "per-suite timeout")
6565
flag.BoolVarP(&cfg.verbose, "verbose", "v", cfg.verbose, "verbose output")
66-
flag.BoolVar(&cfg.strict, "strict", cfg.strict, "strict mode")
66+
flag.BoolVar(&cfg.strict, "strict", cfg.strict, "require that the violation type is an exact match")
6767
flag.BoolVar(&cfg.strictMessage, "strict_message", cfg.strictMessage, "require that violation messages match the expected message exactly")
6868
flag.BoolVar(&cfg.strictError, "strict_error", cfg.strictError, "require that compile-time errors are distinguished from runtime errors")
6969
flag.BoolVar(&cfg.json, "json", cfg.json, "return results as JSON to stdout")

0 commit comments

Comments
 (0)