Skip to content

Commit 67dc93b

Browse files
authored
Enable clippy doc_markdown lint and fix violations (#691)
1 parent 51866ff commit 67dc93b

21 files changed

Lines changed: 63 additions & 64 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ pedantic = { level = "deny", priority = -1 }
1919
# Documentation pedantic lints — too noisy for our internal API surface.
2020
missing_errors_doc = "allow"
2121
missing_panics_doc = "allow"
22-
doc_markdown = "allow"
2322
# Stylistic / debatable — keep code as-is.
2423
must_use_candidate = "allow"
2524
module_name_repetitions = "allow"

quilt-cli/src/cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ enum Commands {
9797
#[arg(short, long)]
9898
namespace: String,
9999
/// Workflow ID
100-
/// Ex. "my_workflow"
100+
/// Ex. `"my_workflow"`
101101
#[arg(short, long)]
102102
workflow: Option<String>,
103103
},
104104
/// Install package locally
105105
Install {
106106
/// Source URI for the package.
107-
/// Ex. quilt+s3://bucket#package=foo/bar
107+
/// Ex. `quilt+s3://bucket#package=foo/bar`
108108
#[arg(value_name = "PKG_URI")]
109109
uri: String,
110110
/// Namespace for the package, ex. foo/bar.
@@ -117,7 +117,7 @@ enum Commands {
117117
},
118118
/// List installed packages
119119
Login {
120-
/// Code from the https://QUILT_STACK/code page
120+
/// Code from the `https://QUILT_STACK/code` page
121121
#[arg(short, long)]
122122
code: Option<String>,
123123
#[arg(long)]

quilt-rs/src/auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ impl<S: Storage + Send + Sync> Auth<S> {
572572
Ok(())
573573
}
574574

575-
/// Get a stored OAuth client_id for the host, or register a new one via DCR.
575+
/// Get a stored OAuth `client_id` for the host, or register a new one via DCR.
576576
pub async fn get_or_register_client<T: HttpClient>(
577577
&self,
578578
http_client: &T,

quilt-rs/src/checksum/remote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn sha256_hash_bytes(data: &[u8]) -> Vec<u8> {
88
hasher.finalize().to_vec()
99
}
1010

11-
/// Hash a base64-encoded checksum with SHA256 and return as Sha256ChunkedHash
11+
/// Hash a base64-encoded checksum with SHA256 and return as `Sha256ChunkedHash`
1212
pub fn hash_sha256_checksum(checksum_b64: &str) -> Option<String> {
1313
let checksum_decoded = base64::decode(checksum_b64).ok()?;
1414
let hashed_bytes = sha256_hash_bytes(&checksum_decoded);

quilt-rs/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ pub enum Error {
311311
}
312312

313313
impl Error {
314-
/// Returns `true` if this error represents an S3 "not found" (NoSuchKey) response.
314+
/// Returns `true` if this error represents an S3 "not found" (`NoSuchKey`) response.
315315
pub fn is_not_found(&self) -> bool {
316316
matches!(self, Error::S3(s3) if s3.is_not_found())
317317
}

quilt-rs/src/fixtures/top_hash.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,98 +22,98 @@ pub fn load_equivalent_fixture(top_hash: &str, description: &str) -> Res<PathBuf
2222

2323
// EMPTY_* series: message=""
2424

25-
/// Manifest header: {"message":"","user_meta":{},"version":"v0"}
25+
/// Manifest header: `{"message":"","user_meta":{},"version":"v0"}`
2626
pub const EMPTY_EMPTY_TOP_HASH: &str =
2727
"0929824c58e90a6d2cc3ad2c7bdc66e34f43e8ed7063a6b48595a3834dd3ec99";
2828

29-
/// Manifest header: {"message":"","version":"v0"}
29+
/// Manifest header: `{"message":"","version":"v0"}`
3030
pub const EMPTY_NONE_TOP_HASH: &str =
3131
"770459d4230273fd44b272c552d1204458175e7d7cb26fcd601c662cf5f72d05";
3232

33-
/// Manifest header: {"message":"","user_meta":null,"version":"v0"}
33+
/// Manifest header: `{"message":"","user_meta":null,"version":"v0"}`
3434
pub const EMPTY_NULL_TOP_HASH: &str =
3535
"39ee9fb46019db2d8373c991d7881ba90bbb6a6c65417e108c295363794dec3c";
3636

3737
// NULL_* series: message=null
3838

39-
/// Manifest header: {"message":null,"user_meta":{},"version":"v0"}
39+
/// Manifest header: `{"message":null,"user_meta":{},"version":"v0"}`
4040
pub const NULL_EMPTY_TOP_HASH: &str =
4141
"1a4cae60caad99aaf073c4292adfa510897c31c1d6adb44662925b9b143edbbf";
4242

43-
/// Manifest header: {"message":null,"version":"v0"}
43+
/// Manifest header: `{"message":null,"version":"v0"}`
4444
pub const NULL_NONE_TOP_HASH: &str =
4545
"2a5a67156ca9238c14d12042db51c5b52260fdd5511b61ea89b58929d6e1769b";
4646

47-
/// Manifest header: {"message":null,"user_meta":null,"version":"v0"}
47+
/// Manifest header: `{"message":null,"user_meta":null,"version":"v0"}`
4848
pub const NULL_NULL_TOP_HASH: &str =
4949
"fb53faf10edc3c9cc234f362c1a57d702213e869a20b887d9f6ed5439c936513";
5050

5151
// INITIAL_* series: message="Initial"
5252

53-
/// Manifest header: {"message":"Initial","user_meta":{},"version":"v0"}
53+
/// Manifest header: `{"message":"Initial","user_meta":{},"version":"v0"}`
5454
pub const INITIAL_EMPTY_TOP_HASH: &str =
5555
"7ee06a4f805b84b2f43ddad3f68bcbf7aafad2412da86e2e912cdfe139eea7f0";
5656

57-
/// Manifest header: {"message":"Initial","version":"v0"}
57+
/// Manifest header: `{"message":"Initial","version":"v0"}`
5858
pub const INITIAL_NONE_TOP_HASH: &str =
5959
"5c28e0c17258bff26192df9fd307cbcd72ca9c72777e006282b2508827e76874";
6060

61-
/// Manifest header: {"message":"Initial","user_meta":null,"version":"v0"}
61+
/// Manifest header: `{"message":"Initial","user_meta":null,"version":"v0"}`
6262
pub const INITIAL_NULL_TOP_HASH: &str =
6363
"82d4864583067f3dba8909f050fb8dc0b8e00a77e7b5e14a53aacb165740c7a4";
6464

65-
/// Manifest header: {"message":"Initial","user_meta":{"key":"value"},"version":"v0"}
65+
/// Manifest header: `{"message":"Initial","user_meta":{"key":"value"},"version":"v0"}`
6666
pub const INITIAL_META_TOP_HASH: &str =
6767
"0d659c7f1d7a141160a9defc9b1c9ea7bca96d3454af59cbfcf523871e72f47e";
6868

69-
/// Manifest header: {"message":"Initial","user_meta":{"author":"user","timestamp":"2024-01-01"},"version":"v0"}
69+
/// Manifest header: `{"message":"Initial","user_meta":{"author":"user","timestamp":"2024-01-01"},"version":"v0"}`
7070
pub const INITIAL_COMPLEX_META_TOP_HASH: &str =
7171
"9bf52db215ab75c1f75fe4b1b4a782cf822eb463f9f8395e95f3b47627a0e825";
7272

73-
/// Manifest header: {"message":"Initial","user_meta":{large_object},"version":"v0"}
73+
/// Manifest header: `{"message":"Initial","user_meta":{large_object},"version":"v0"}`
7474
pub const INITIAL_LARGE_META_TOP_HASH: &str =
7575
"df9d3129d62e60c1ea840d9c147e2ba7c94269bb33382026c5b27a20cd1351aa";
7676

7777
// WORKFLOW series: with workflow field
7878

79-
/// Manifest header: {"message":"","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}
79+
/// Manifest header: `{"message":"","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}`
8080
pub const EMPTY_EMPTY_SIMPLE_WORKFLOW_TOP_HASH: &str =
8181
"77cb48f84c2109fcf9e10fd230497f2a3803427bb6b48c32f2c026e080ee1553";
8282

83-
/// Manifest header: {"message":"","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":"test-workflow","schemas":{"test-schema":"s3://bucket/workflows/test.json"}}}
83+
/// Manifest header: `{"message":"","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":"test-workflow","schemas":{"test-schema":"s3://bucket/workflows/test.json"}}}`
8484
pub const EMPTY_EMPTY_COMPLEX_WORKFLOW_TOP_HASH: &str =
8585
"714b1c209a98a7b9239076b94305a7852dc60946c5ba0afac64246ea9958ba08";
8686

87-
/// Manifest header: {"message":"Initial","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}
87+
/// Manifest header: `{"message":"Initial","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}`
8888
pub const INITIAL_EMPTY_SIMPLE_WORKFLOW_TOP_HASH: &str =
8989
"c716c54535bd3c896d0813dafd672430456f68b2d407a6a65a558ccab53f4990";
9090

91-
/// Manifest header: {"message":"Initial","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":"test-workflow","schemas":{"test-schema":"s3://bucket/workflows/test.json"}}}
91+
/// Manifest header: `{"message":"Initial","user_meta":{},"version":"v0","workflow":{"config":"s3://workflow/config","id":"test-workflow","schemas":{"test-schema":"s3://bucket/workflows/test.json"}}}`
9292
pub const INITIAL_EMPTY_COMPLEX_WORKFLOW_TOP_HASH: &str =
9393
"63d5e6aedc10aeca11a4ad133b21ecfbc299476833465f6a302fd27cc08d8ab2";
9494

9595
// Additional workflow combinations with different user_meta values
9696

97-
/// Manifest header: {"message":"","version":"v0","workflow":{"config":"s3://workflow/config","id":null}}
97+
/// Manifest header: `{"message":"","version":"v0","workflow":{"config":"s3://workflow/config","id":null}}`
9898
pub const EMPTY_NONE_SIMPLE_WORKFLOW_TOP_HASH: &str =
9999
"88df0e39d2ecb9493f44ef30af4e7c6f6e9d5daa0b23e468aa1643a407bbc81c";
100100

101-
/// Manifest header: {"message":"","user_meta":null,"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}
101+
/// Manifest header: `{"message":"","user_meta":null,"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}`
102102
pub const EMPTY_NULL_SIMPLE_WORKFLOW_TOP_HASH: &str =
103103
"129804b4ad21520c21d21c5f2916f549b4e2a7cb106e4efe88c9676270ac00f1";
104104

105-
/// Manifest header: {"message":"Initial","user_meta":{"key":"value"},"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}
105+
/// Manifest header: `{"message":"Initial","user_meta":{"key":"value"},"version":"v0","workflow":{"config":"s3://workflow/config","id":null}}`
106106
pub const INITIAL_META_SIMPLE_WORKFLOW_TOP_HASH: &str =
107107
"7b224912378c80eef0f6255d911b4e7a51c287ea89cc9fee32cee26e56090b0c";
108108

109-
/// Manifest header: {"message":"Initial","version":"v0","workflow":{"config":"s3://workflow/config","id":"test-workflow","schemas":{"test-schema":"s3://bucket/workflows/test.json"}}}
109+
/// Manifest header: `{"message":"Initial","version":"v0","workflow":{"config":"s3://workflow/config","id":"test-workflow","schemas":{"test-schema":"s3://bucket/workflows/test.json"}}}`
110110
pub const INITIAL_NONE_COMPLEX_WORKFLOW_TOP_HASH: &str =
111111
"f9b5b98503dc3feb22b5fc94bd8ff474efb39adcd9fa2a9f6b3199de536ec5ca";
112112

113113
// ROWS series: with header + rows combinations
114114

115115
/// Single row manifest with default header
116-
/// Hash: objects::LESS_THAN_8MB_HASH_B64 (16 bytes)
116+
/// Hash: `objects::LESS_THAN_8MB_HASH_B64` (16 bytes)
117117
/// JSON:
118118
/// ```json
119119
/// {"message":"","user_meta":{},"version":"v0"}
@@ -123,7 +123,7 @@ pub const SINGLE_ROW_TOP_HASH: &str =
123123
"9adfc26d4d85bc1a31bd9b45af1c78647415d580a4196becd85f9e4e793c5824";
124124

125125
/// Multiple rows manifest with default header
126-
/// Hashes: ZERO_HASH_B64 (0 bytes), EQUAL_TO_8MB_HASH_B64 (8388608 bytes), MORE_THAN_8MB_HASH_B64 (18874368 bytes)
126+
/// Hashes: `ZERO_HASH_B64` (0 bytes), `EQUAL_TO_8MB_HASH_B64` (8388608 bytes), `MORE_THAN_8MB_HASH_B64` (18874368 bytes)
127127
/// JSON:
128128
/// ```json
129129
/// {"message":"","user_meta":{},"version":"v0"}
@@ -135,7 +135,7 @@ pub const MULTIPLE_ROWS_TOP_HASH: &str =
135135
"b86d9eb02bd108cdd1823d53558c752b9466928c37af7655e4080595633ead7e";
136136

137137
/// Mixed hash types manifest with default header: SHA256, sha2-256-chunked, CRC64NVME
138-
/// Hash values: "7465737464617461000000000000000000000000000000000000000000000000" (8 bytes), LESS_THAN_8MB_HASH_B64 (16 bytes), "dGVzdGRhdGEAAAAAAAAAAAAAAAAAAAAA" (32 bytes)
138+
/// Hash values: "7465737464617461000000000000000000000000000000000000000000000000" (8 bytes), `LESS_THAN_8MB_HASH_B64` (16 bytes), "dGVzdGRhdGEAAAAAAAAAAAAAAAAAAAAA" (32 bytes)
139139
/// JSON:
140140
/// ```json
141141
/// {"message":"","user_meta":{},"version":"v0"}

quilt-rs/src/flow/recommit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ mod tests {
133133
use crate::io::storage::mocks::MockStorage;
134134
use crate::lineage::PathState;
135135

136-
/// Helper: create a local package with a single file using the given host_config,
136+
/// Helper: create a local package with a single file using the given `host_config`,
137137
/// returning (lineage, manifest, storage, paths, namespace).
138138
async fn create_test_package(
139139
host_config: &HostConfig,

quilt-rs/src/flow/reset_to_latest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ mod tests {
221221
}
222222

223223
/// Regression: `reset_to_latest` must clear `lineage.commit`. Otherwise
224-
/// the lineage stays self-inconsistent (UpToDate on hashes, Ahead via
224+
/// the lineage stays self-inconsistent (`UpToDate` on hashes, Ahead via
225225
/// `current_hash()`), and a later Diverged → merge → "Promote my
226226
/// revision" would push and tag the very revision the user just
227227
/// discarded.

quilt-rs/src/flow/status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ enum WorkdirFile {
5555
/// Located files and ignored files collected during the directory walk.
5656
struct LocateResult {
5757
files: Vec<(PathBuf, WorkdirFile)>,
58-
/// Files matched by .quiltignore: (logical_key, absolute_path, matched_pattern, size)
58+
/// Files matched by `.quiltignore`: (`logical_key`, `absolute_path`, `matched_pattern`, size)
5959
ignored_files: Vec<(PathBuf, PathBuf, String, u64)>,
6060
/// Newest `mtime` across non-ignored files in the walk. Ignored files
6161
/// are deliberately excluded — touching a file inside an
@@ -300,7 +300,7 @@ mod tests {
300300
use crate::lineage::UpstreamState;
301301
use quilt_uri::ManifestUri;
302302

303-
/// Helper to create a PackageLineage with a dummy remote (avoids Local state).
303+
/// Helper to create a `PackageLineage` with a dummy remote (avoids Local state).
304304
/// Uses a non-empty hash so the lineage isn't treated as "never pushed".
305305
fn lineage_with_remote(mut lineage: PackageLineage) -> PackageLineage {
306306
let dummy_hash = "deadbeef".to_string();

quilt-rs/src/installed_package.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ mod tests {
10581058
async fn test_set_remote_rejects_unreachable_bucket() -> Res {
10591059
use crate::error::RemoteCatalogError;
10601060

1061-
/// Remote that rejects any verify_bucket call — models the case
1061+
/// Remote that rejects any `verify_bucket` call — models the case
10621062
/// where the user typed a bucket that doesn't resolve on S3.
10631063
struct BadBucketRemote;
10641064

@@ -1534,7 +1534,7 @@ mod tests {
15341534
Ok(())
15351535
}
15361536

1537-
/// A remote that always returns LoginRequired, simulating a logged-out user.
1537+
/// A remote that always returns `LoginRequired`, simulating a logged-out user.
15381538
struct LoggedOutRemote;
15391539

15401540
impl crate::io::remote::Remote for LoggedOutRemote {
@@ -1631,7 +1631,7 @@ mod tests {
16311631

16321632
/// Pull must refresh `latest_hash` from the remote before evaluating
16331633
/// `flow::pull`'s `base_hash == latest_hash` guard. Before the
1634-
/// "Stop writing lineage from InstalledPackage::status" refactor, a
1634+
/// "Stop writing lineage from `InstalledPackage::status`" refactor, a
16351635
/// prior `status` call would persist the refreshed `latest_hash`, so
16361636
/// disk was reliably fresh when `pull` ran. Without that persist,
16371637
/// the disk-stale `latest_hash` always equalled `base_hash` and

0 commit comments

Comments
 (0)