8000 Fail on warnings of cargo doc, after fixing the five it gave by dominion525 · Pull Request #106 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo doc --workspace
env:
RUSTDOCFLAGS: -D warnings
6 changes: 3 additions & 3 deletions crates/jetdb-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub struct Database {
#[derive(Debug, Clone, PartialEq)]
pub struct Column {
pub name: String,
/// The type name, such as `Long` or `Text` (see [`type_name`]). For a
/// The type name, such as `Long` or `Text` (see `type_name`). For a
/// calculated column, the type of its result, which its values have.
pub type_name: String,
/// The size as Access shows it: in characters for a Text column, such as
Expand Down Expand Up @@ -116,7 +116,7 @@ pub struct RelationshipColumn {
#[derive(Debug, Clone, PartialEq)]
pub struct Query {
pub name: String,
/// The type name, such as `Select` or `MakeTable` (see [`query_type_name`]).
/// The type name, such as `Select` or `MakeTable` (see `query_type_name`).
pub type_name: &'static str,
}

Expand All @@ -125,7 +125,7 @@ pub struct Query {
pub struct Module {
pub name: String,
/// `Standard`, `Class`, or `Document` for the module of a form or report
/// (see [`module_type_name`]).
/// (see `module_type_name`).
pub type_name: &'static str,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/jetdb/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl ReadResult {
/// alongside the row, introduced in Access 2010). When the table has a
/// column marked [`ColumnDef::is_calculated`], one extra `MSysObjects.LvProp`
/// read finds each calculated column's result type -- see
/// [`read_calculated_value`]'s doc comment for the byte format. Tables
/// `read_calculated_value`'s doc comment for the byte format. Tables
/// without calculated columns skip that read. System tables (`MSys*`) always
/// skip it: [`crate::prop::read_object_properties`] itself reads
/// `MSysObjects` via this same function, so the lookup must never run while
Expand Down
2 changes: 1 addition & 1 deletion crates/jetdb/src/form2000.rs
< 8000 td id="diff-e50ac583ff0b69739c0f228155e25ba1fb5743f27ab33f48a28e4046b7a3e545HL1" class="blob-num blob-num-hunk non-expandable" data-line-number="...">
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! The design of forms and reports saved in the Access 2000 format.
//!
//! Its Blob starts with the version byte [`VERSION`] and holds the design as
//! Its Blob starts with the version byte `0x13` and holds the design as
//! a tree, unlike the property entries of Access 2002 and later:
//!
//! - 8 bytes of header, then the form or report itself as an entry
Expand Down
6 changes: 3 additions & 3 deletions docs/ci.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ cargo install cargo-audit

### 5. cargo doc — ドキュメントビルド

ワークスペース全体の API ドキュメントを生成する。リンク切れや doc comment の構文エラーを検出できる。
ワークスペース全体の API ドキュメントを生成する。リンク切れや doc comment の構文エラーを検出できる。公開の説明から非公開の項目へのリンクなど、警告があっても失敗にする。

```bash
cargo doc --workspace
RUSTDOCFLAGS="-D warnings" cargo doc --workspace
```

生成されたドキュメントは `target/doc/jetdb/index.html` に出力される。
Expand Down Expand Up @@ -168,7 +168,7 @@ scripts/quality-check.sh
2. `cargo clippy -- -D warnings` — コード品質のチェック
3. Wasm — WASI でライブラリのテストを、Node.js 上でブラウザ用テストを実行し、npm パッケージをビルドしてテスト
4. `cargo audit` — セキュリティ上の問題がないか確認
5. `cargo doc --workspace` — ドキュメントが正しく生成されるか確認
5. `cargo doc --workspace` — ドキュメントが警告なしで正しく生成されるか確認
6. `cargo llvm-cov --workspace` — テストカバレッジを計測
7. `rust-code-analysis-cli` — コードの複雑度を計測

Expand Down
6 changes: 3 additions & 3 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ cargo install cargo-audit

### 5. cargo doc — Documentation Build

Generate API documentation for the entire workspace. Detects broken links and doc comment syntax errors.
Generate API documentation for the entire workspace. Detects broken links and doc comment syntax errors. Warnings fail it, such as public documentation linking to a private item.

```bash
cargo doc --workspace
RUSTDOCFLAGS="-D warnings" cargo doc --workspace
```

Generated documentation is output to `target/doc/jetdb/index.html`.
Expand Down Expand Up @@ -168,7 +168,7 @@ The quality check script runs checks in the following order:
2. `cargo clippy -- -D warnings` — Check code quality
3. Wasm — Run the library tests on WASI and the browser tests on Node.js, and build and test the npm package
4. `cargo audit` — Check for security issues
5. `cargo doc --workspace` — Verify documentation builds correctly
5. `cargo doc --workspace` — Verify documentation builds correctly, without warnings
6. `cargo llvm-cov --workspace` — Measure test coverage
7. `rust-code-analysis-cli` — Measure code complexity

Expand Down
3 changes: 2 additions & 1 deletion scripts/quality-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ fi

# --- 5. Doc ---
header "Doc"
doc_output=$(cargo doc --workspace 2>&1) && {
# Warnings, such as public documentation linking to a private item, fail it.
doc_output=$(RUSTDOCFLAGS="-D warnings" cargo doc --workspace 2>&1) && {
printf " $(pass)\n"
} || {
printf " $(fail)\n"
Expand Down
Loading
0