hooks: Enable typos, fix reported errors
This commit is contained in:
parent
5fa68ed814
commit
0e9d7607e4
|
|
@ -1,4 +1,4 @@
|
|||
[codespell]
|
||||
skip = .git*,*.lock,.codespellrc
|
||||
skip = .git*,*.lock,.codespellrc,target,.jj
|
||||
check-hidden = true
|
||||
ignore-words-list = ser,noes
|
||||
ignore-words-list = set,noes
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
[default]
|
||||
extend-ignore-re = [
|
||||
"[0-9a-f]{7}\\.\\.\\.?[0-9a-f]{7}", # Git range between two short commit IDs
|
||||
"[0-9a-f]{7}\\[\\.\\.\\]", # Shortened commit IDs as written in tests
|
||||
"did:key:z6Mk[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{44}",
|
||||
"rad://z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{28}",
|
||||
"rad:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{28}",
|
||||
"z6Mk[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{44}",
|
||||
]
|
||||
|
||||
[default.extend-identifiers]
|
||||
"typ" = "typ" # We may write "typ" instead of "type". The latter is a Rust keyword.
|
||||
|
||||
[type.codespell]
|
||||
check-file = false
|
||||
extend-glob = [".codespellrc"]
|
||||
2
build.rs
2
build.rs
|
|
@ -31,7 +31,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
// x.y.z, with efe10f95be being a unique prefix of the OID of
|
||||
// `HEAD`, and the working directory was dirty.
|
||||
// If this is a build pointing to a commit that has release tag, this
|
||||
// will just return the tag name itelf, e.g. `releases/x.y.z`.
|
||||
// will just return the tag name itself, e.g. `releases/x.y.z`.
|
||||
// If all fails, we just use `hash`, which, in the worst case is
|
||||
// still "unknown" (see above) but in most cases will just be
|
||||
// the short OID of `HEAD`.
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn test_limitter_refill() {
|
||||
fn test_limiter_refill() {
|
||||
let mut r = RateLimiter::default();
|
||||
let t = (3, 0.2); // Three tokens burst. One token every 5 seconds.
|
||||
let a = HostName::Dns(String::from("seed.radicle.example.com"));
|
||||
|
|
@ -188,7 +188,7 @@ mod test {
|
|||
|
||||
#[test]
|
||||
#[rustfmt::skip]
|
||||
fn test_limitter_multi() {
|
||||
fn test_limiter_multi() {
|
||||
let t = (1, 1.0); // One token per second. One token burst.
|
||||
let n = arbitrary::gen::<NodeId>(1);
|
||||
let n = Some(&n);
|
||||
|
|
@ -208,7 +208,7 @@ mod test {
|
|||
|
||||
#[test]
|
||||
#[rustfmt::skip]
|
||||
fn test_limitter_different_rates() {
|
||||
fn test_limiter_different_rates() {
|
||||
let t1 = (1, 1.0); // One token per second. One token burst.
|
||||
let t2 = (2, 2.0); // Two tokens per second. Two token burst.
|
||||
let n = arbitrary::gen::<NodeId>(1);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ pub trait Encoding {
|
|||
/// May panic if the argument is greater than [`u32::MAX`].
|
||||
/// This is a convenience method, to spare callers casting or converting
|
||||
/// [`usize`] to [`u32`]. If callers end up in a situation where they
|
||||
/// need to push a 32-bit unisgned integer, but the value they would
|
||||
/// need to push a 32-bit unsigned integer, but the value they would
|
||||
/// like to push does not fit 32 bits, then the implementation will not
|
||||
/// comply with the SSH format anyway.
|
||||
fn extend_usize(&mut self, u: usize) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue