From 5f6aa30be54ea5dfcef730d709707a814e64deee Mon Sep 17 00:00:00 2001 From: Valentin271 <36198422+Valentin271@users.noreply.github.com> Date: Sat, 2 Sep 2023 04:59:07 +0200 Subject: [PATCH] chore: check documentation lint (#454) --- .github/workflows/ci.yml | 2 ++ Makefile.toml | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cb7fdd5..5c5fc204 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,8 @@ jobs: uses: taiki-e/install-action@cargo-make - name: Check formatting run: cargo make fmt + - name: Check documentation + run: cargo make check-doc clippy: runs-on: ubuntu-latest diff --git a/Makefile.toml b/Makefile.toml index bfbb377f..6ae84bbf 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -21,7 +21,7 @@ dependencies = [ [tasks.style-check] description = "Check code style" -dependencies = ["fmt", "typos"] +dependencies = ["fmt", "typos", "check-doc"] [tasks.fmt] description = "Format source code" @@ -34,6 +34,19 @@ description = "Run typo checks" install_crate = { crate_name = "typos-cli", binary = "typos", test_arg = "--version" } command = "typos" +[tasks.check-doc] +description = "Check documentation for errors and warnings" +toolchain = "nightly" +command = "cargo" +args = [ + "rustdoc", + "--all-features", + "--", + "-Zunstable-options", + "--check", + "-Dwarnings" +] + [tasks.check] description = "Check code for errors and warnings" command = "cargo"