Commit f6c92e1
authored
ci(lint): gate rustdoc warnings in lint-rust (paradedb#5562)
## What
Add a Rustdoc step to `lint-rust` (`RUSTDOCFLAGS="-D warnings" cargo doc
--workspace --no-deps --document-private-items`) so broken intra-doc
links, bare URLs, and malformed HTML in doc comments fail CI, and clear
the 53 pre-existing warnings that surface under
`--document-private-items`.
Follow-up to the doc-link fix in paradedb#5547, which noted the linter would
have caught it — this wires up that gate.
## The fixes
- **De-link** intra-doc references that don't resolve (out-of-scope,
private, or local-variable targets), keeping the backticked inline code
— e.g. `[`ExecMethod`]` → ``ExecMethod``.
- **Path typos**: `pg_sys:Buffer` → `pg_sys::Buffer`.
- **Bare URLs** wrapped in angle brackets.
- **Generic type expressions** (`Option<i16>`, `Vec<Datum>`,
`<uuid>.<ext>`) backticked so rustdoc stops parsing them as unclosed
HTML tags.
No runtime code changed — doc comments only, plus the workflow step.
## Notes
- `--document-private-items` is what catches most of these:
crate-internal modules (`mod foo;`) are skipped by default `cargo doc`.
- Matches Clippy's default feature set (single pg version), so cfg-gated
doc links aren't covered — a link that only breaks under a disabled
`#[cfg]` won't be caught. Acceptable for now.
- The `proc-macro-error2` future-incompat notice is a dependency-level
cargo report, not a rustdoc lint, so it doesn't trip `-D warnings`.
## Tests
- `RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps
--document-private-items` — clean (exit 0).
- Same with the default (public-only) doc build — clean.
- `cargo fmt -- --check` — clean.
https://claude.ai/code/session_01369qmSBKYCAXRv1qJsKS8g
---------
Signed-off-by: Philippe Noël <21990816+philippemnoel@users.noreply.github.com>1 parent b8506fe commit f6c92e1
34 files changed
Lines changed: 63 additions & 60 deletions
File tree
- .github/workflows
- benchmarks/src
- pg_search/src
- index/directory
- postgres
- customscan
- aggregatescan
- basescan
- datafusion
- joinscan
- mpp
- storage
- query
- scan
- schema
- stressgres/src
- tokenizers/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | | - | |
1291 | | - | |
| 1290 | + | |
| 1291 | + | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1916 | 1916 | | |
1917 | 1917 | | |
1918 | 1918 | | |
1919 | | - | |
| 1919 | + | |
1920 | 1920 | | |
1921 | 1921 | | |
1922 | 1922 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments