Skip to content

Commit 761491e

Browse files
authored
chore(x): add doc lint (#95)
* chore(x): add doc lint * chore(x): remove fix variant for make_docs_cmd
1 parent 434fd57 commit 761491e

File tree

5 files changed

+17
-62
lines changed

5 files changed

+17
-62
lines changed

Cargo.lock

Lines changed: 0 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datasketches/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ rustdoc-args = ["--cfg", "docsrs"]
3636

3737
[dev-dependencies]
3838
googletest = { workspace = true }
39-
rand = { workspace = true }
4039
insta = { workspace = true }
4140

4241
[lints]

datasketches/src/hll/composite_interpolation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//!
2424
//! Currently, this module contains tables for common lg_k values (4-12). The full C++
2525
//! implementation has tables for lg_k 4-21. Additional tables can be found at:
26-
//! https://github.com/apache/datasketches-cpp/blob/5a055521/hll/include/CompositeInterpolationXTable-internal.hpp
26+
//! <https://github.com/apache/datasketches-cpp/blob/5a055521/hll/include/CompositeInterpolationXTable-internal.hpp>
2727
2828
const NUM_X_VALUES: usize = 257;
2929

datasketches/src/tdigest/sketch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl TDigestMut {
8989
///
9090
/// # Errors
9191
///
92-
/// If k is less than 10, returns [`ErrorKind::InvalidArgument`].
92+
/// If k is less than 10.
9393
///
9494
/// # Examples
9595
///

xtask/src/main.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ impl CommandLint {
6666
fn run(self) {
6767
run_command(make_clippy_cmd(self.fix));
6868
run_command(make_format_cmd(self.fix));
69+
run_command(make_docs_cmd());
6970
run_command(make_taplo_cmd(self.fix));
7071
run_command(make_typos_cmd());
7172
run_command(make_hawkeye_cmd(self.fix));
@@ -138,6 +139,20 @@ fn make_clippy_cmd(fix: bool) -> StdCommand {
138139
cmd
139140
}
140141

142+
fn make_docs_cmd() -> StdCommand {
143+
let mut cmd = find_command("cargo");
144+
cmd.env("RUSTFLAGS", "--cfg docsrs");
145+
cmd.env("RUSTDOCFLAGS", "-D warnings");
146+
cmd.args([
147+
"+nightly",
148+
"doc",
149+
"--package",
150+
"datasketches",
151+
"--all-features",
152+
]);
153+
cmd
154+
}
155+
141156
fn make_hawkeye_cmd(fix: bool) -> StdCommand {
142157
ensure_installed("hawkeye", "hawkeye");
143158
let mut cmd = find_command("hawkeye");

0 commit comments

Comments
 (0)