Skip to content

Commit b021c3b

Browse files
committed
chore(hooks): add check for outdated macro documentation
Refs: #466
1 parent 1b1866f commit b021c3b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ jobs:
7171
echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ env.clang }}/bin/llvm-config" >> $GITHUB_ENV
7272
- name: Run rustfmt
7373
run: cargo fmt --all -- --check
74+
- name: macro docs
75+
run: tools/update_lib_docs.sh && git diff --exit-code crates/macros/src/lib.rs
7476
- name: Run clippy
7577
run: cargo clippy --workspace --all-targets --all-features -- -W clippy::pedantic -D warnings
7678
# Docs

.lefthook.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ pre-commit:
1111
- name: bindings
1212
run: tools/update_bindings.sh && git diff --exit-code docsrs_bindings.rs
1313
glob: "allowed_bindings.rs"
14+
fail_text: |
15+
The `docsrs_bindings.rs` file seems to be out of date.
16+
Please check the updated bindings in `docsrs_bindings.rs` and commit the changes.
17+
- name: "macro docs"
18+
run: tools/update_lib_docs.sh && git diff --exit-code crates/macros/src/lib.rs
19+
glob: "guide/src/macros/*.md"
20+
fail_text: |
21+
The macro crates documentation seems to be out of date.
22+
Please check the updated documentation in `crates/macros/src/lib.rs` and commit the changes.

0 commit comments

Comments
 (0)