Repository: hannobraun/inotify-rs (language: rust)

Issue:
Fail CI build on doc warnings
There have been broken links in the documentation (https://github.com/hannobraun/inotify-rs/issues/212) (now fixed in https://github.com/hannobraun/inotify-rs/pull/213). It would be good to prevent the docs from degenerating like this again. We should make the CI build fail, if there are any `cargo doc` warnings.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 4ab045b..65c205c 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -19,6 +19,17 @@ jobs:
       - name: clippy
         run: cargo clippy --all-targets --all-features -- -D warnings
 
+  check-docs:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+      - uses: Swatinem/rust-cache@v2
+      - name: cargo doc
+        env:
+          RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests"
+        run: cargo doc --all-features --no-deps
+
   build:
     runs-on: ubuntu-latest
     steps:


Test patch: