Skip to content

Commit 723fe91

Browse files
committed
Fail CI on cargo doc warnings (#2012)
* makes CI fails on cargo doc warnings * adds this check in bors doc warnings are listed here: https://doc.rust-lang.org/rustdoc/lints.html Currently the warnings emitted are: * broken_intra_doc_links * private_intra_doc_links * invalid_codeblock_attributes
1 parent c32c37d commit 723fe91

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/bors.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ status = [
88
"build-android",
99
"markdownlint",
1010
"run-examples",
11+
"check-doc",
1112
]
1213

1314
use_squash_merge = true

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
sleep 10
130130
done
131131
132-
deadlinks:
132+
check-doc:
133133
runs-on: ubuntu-latest
134134
steps:
135135
- uses: actions/checkout@v2
@@ -138,6 +138,8 @@ jobs:
138138
if: runner.os == 'linux'
139139
- name: Installs cargo-deadlinks
140140
run: cargo install cargo-deadlinks
141-
- name: Checks dead doc links
142-
run: cargo doc --all-features --no-deps && cargo deadlinks --dir target/doc/bevy
141+
- name: Build and check doc
142+
run: RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps
143+
- name: Checks dead links
144+
run: cargo deadlinks --dir target/doc/bevy
143145
continue-on-error: true

0 commit comments

Comments
 (0)