Skip to content

Commit

Permalink
prdoc: Print errors on CI (#3459)
Browse files Browse the repository at this point in the history
By passing `RUST_LOG=info` to the check command, we will be able to see
the exact problem with a given prdoc.

Before:
```
PR #3243 -> ERR
```

After:
```
[2024-02-23T12:53:55Z INFO  prdoclib::commands::check] Checking directory prdoc
[2024-02-23T12:53:55Z INFO  prdoclib::commands::check] Using schema: /Users/sebastian/work/repos/polkadot-sdk/prdoc/schema_user.json
[2024-02-23T12:53:55Z WARN  prdoclib::schema] validation_result: false
[2024-02-23T12:53:55Z WARN  prdoclib::schema] validation_result_strict: false
[2024-02-23T12:53:55Z WARN  prdoclib::schema] errors: [
        Required {
            path: "/title",
        },
    ]
[2024-02-23T12:53:55Z WARN  prdoclib::schema] missing: []
[2024-02-23T12:53:55Z ERROR prdoclib::commands::check] Loading the schema failed:
[2024-02-23T12:53:55Z ERROR prdoclib::commands::check] ValidationErrors(ValidationState { errors: [Required { path: "/title" }], missing: [], replacement: None, evaluated: {"/doc/0/description", "/crates/0/name", "/doc/0", "/crates", "/crates/0", "", "/doc", "/doc/0/audience"} })
PR #3243 -> ERR
```
  • Loading branch information
skunert authored Feb 23, 2024
1 parent 11b5354 commit 64050cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
run: |
echo "Checking for PR#${GITHUB_PR}"
echo "You can find more information about PRDoc at $PRDOC_DOC"
$ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR}
$ENGINE run --rm -v $PWD:/repo -e RUST_LOG=info $IMAGE check -n ${GITHUB_PR}

0 comments on commit 64050cf

Please sign in to comment.