summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-20 10:48:25 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-20 10:48:25 +0200
commit7bb69c0902b4b074281a95236120775d74879ed6 (patch)
tree4b76b319661f77681f6b6b37e9baea7651beaa9d
parent10fac143414099b4f0a34eca4961f47c4ac09938 (diff)
Check crate docs in CI
-rw-r--r--.github/workflows/ci.yml6
-rw-r--r--library/src/text/shaping.rs2
-rw-r--r--tests/README.md8
3 files changed, 9 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4ddad7bc..9daace18 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,6 +3,7 @@ on: [push, pull_request]
env:
RUSTFLAGS: "-Dwarnings"
+ RUSTDOCFLAGS: "-Dwarnings"
jobs:
tests:
@@ -16,14 +17,15 @@ jobs:
- run: cargo test --workspace --no-fail-fast
checks:
- name: Check formatting and clippy
+ name: Check clippy, formatting, and documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- - run: cargo fmt --check --all
- run: cargo clippy --workspace --all-targets
+ - run: cargo fmt --check --all
+ - run: cargo doc --workspace --no-deps
min-version:
name: Check mininum Rust version
diff --git a/library/src/text/shaping.rs b/library/src/text/shaping.rs
index d0c879fe..9f514e9a 100644
--- a/library/src/text/shaping.rs
+++ b/library/src/text/shaping.rs
@@ -134,7 +134,7 @@ impl ShapedGlyph {
matches!(self.c, '《' | '(' | '『' | '「')
}
- /// See https://www.w3.org/TR/clreq/#punctuation_width_adjustment
+ /// See <https://www.w3.org/TR/clreq/#punctuation_width_adjustment>
pub fn is_cjk_center_aligned_punctuation(&self, gb_style: bool) -> bool {
if !gb_style && matches!(self.c, ',' | '。' | '、' | ':' | ';') {
return true;
diff --git a/tests/README.md b/tests/README.md
index 78967a96..68b72f2d 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -14,12 +14,12 @@ Top level directory structure:
## Running the tests
Running all tests (including unit tests):
```bash
-cargo test --all
+cargo test --workspace
```
Running just the integration tests (the tests in this directory):
```bash
-cargo test --all --test tests
+cargo test --workspace --test tests
```
You may want to [make yourself an alias](#making-an-alias) like:
@@ -73,13 +73,13 @@ testit empty.typ
### Bash
Open your Bash configuration by executing `nano ~/.bashrc`.
```bash
-alias testit="cargo test --all --test tests --"
+alias testit="cargo test --workspace --test tests --"
```
### PowerShell
Open your PowerShell profile by executing `notepad $profile`.
```ps
function testit {
- cargo test --all --test tests -- $args
+ cargo test --workspace --test tests -- $args
}
```