Skip to content

Commit 37ba461

Browse files
committed
Merge branch 'global-lints'
2 parents db147b9 + 7083b7a commit 37ba461

File tree

102 files changed

+300
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+300
-77
lines changed

.cargo/config.toml

Lines changed: 0 additions & 22 deletions
This file was deleted.

Cargo.toml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gitoxide"
35
description = "A command-line application for interacting with git repositories"
@@ -311,3 +313,79 @@ features = ["document-features", "max"]
311313
[package.metadata.binstall]
312314
pkg-url = "{ repo }/releases/download/v{ version }/gitoxide-max-pure-v{ version }-{ target }{ archive-suffix }"
313315
bin-dir = "gitoxide-max-pure-v{ version }-{ target }/{ bin }{ binary-ext }"
316+
317+
[workspace.lints.rust]
318+
# TODO: enable this
319+
# unused_qualifications = "warn"
320+
321+
[workspace.lints.clippy]
322+
pedantic = { level = "warn", priority = -1 }
323+
#
324+
# Reviewed and allowed lints
325+
enum_glob_use = "allow" # x97
326+
missing_errors_doc = "allow" # x1792
327+
missing_panics_doc = "allow" # x447
328+
module_name_repetitions = "allow" # x125
329+
must_use_candidate = "allow" # x1696
330+
#
331+
# Lints that we may want to forbid in the future
332+
default_trait_access = "allow" # x709
333+
doc_markdown = "allow" # x552
334+
cast_possible_truncation = "allow" # x216
335+
needless_pass_by_value = "allow" # x205
336+
return_self_not_must_use = "allow" # x204
337+
unreadable_literal = "allow" # x169
338+
items_after_statements = "allow" # x164
339+
single_match_else = "allow" # x162
340+
too_many_lines = "allow" # x161
341+
unnecessary_wraps = "allow" # x110
342+
match_same_arms = "allow" # x99
343+
cast_lossless = "allow" # x91
344+
ignored_unit_patterns = "allow" # x80
345+
used_underscore_binding = "allow" # x75
346+
needless_raw_string_hashes = "allow" # x75
347+
implicit_clone = "allow" # x70
348+
manual_let_else = "allow" # x64
349+
cast_precision_loss = "allow" # x56
350+
trivially_copy_pass_by_ref = "allow" # x43
351+
redundant_else = "allow" # x42
352+
if_not_else = "allow" # x37
353+
match_wildcard_for_single_variants = "allow" # x35
354+
cast_sign_loss = "allow" # x35
355+
similar_names = "allow" # x32
356+
struct_excessive_bools = "allow" # x29
357+
cast_possible_wrap = "allow" # x26
358+
explicit_iter_loop = "allow" # x24
359+
explicit_into_iter_loop = "allow" # x22
360+
explicit_deref_methods = "allow" # x22
361+
inconsistent_struct_constructor = "allow" # x18
362+
range_plus_one = "allow" # x17
363+
inefficient_to_string = "allow" # x14
364+
from_iter_instead_of_collect = "allow" # x13
365+
unused_self = "allow" # x10
366+
many_single_char_names = "allow" # x10
367+
manual_string_new = "allow" # x10
368+
iter_not_returning_iterator = "allow" # x10
369+
option_option = "allow" # x9
370+
inline_always = "allow" # x8
371+
manual_assert = "allow" # x7
372+
iter_without_into_iter = "allow" # x6
373+
copy_iterator = "allow" # x6
374+
should_panic_without_expect = "allow" # x5
375+
transmute_ptr_to_ptr = "allow" # x4
376+
match_wild_err_arm = "allow" # x4
377+
manual_is_variant_and = "allow" # x4
378+
bool_to_int_with_if = "allow" # x4
379+
struct_field_names = "allow" # x3
380+
wildcard_imports = "allow" # x2
381+
needless_for_each = "allow" # x2
382+
naive_bytecount = "allow" # x2
383+
mut_mut = "allow" # x2
384+
match_bool = "allow" # x2
385+
fn_params_excessive_bools = "allow" # x2
386+
filter_map_next = "allow" # x2
387+
checked_conversions = "allow" # x2
388+
borrow_as_ptr = "allow" # x2
389+
unnecessary_join = "allow" # x1
390+
stable_sort_primitive = "allow" # x1
391+
no_effect_underscore_binding = "allow" # x1

gitoxide-core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gitoxide-core"
35
description = "The library implementing all capabilities of the gitoxide CLI"

gix-actor/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-actor"
35
version = "0.32.0"

gix-archive/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-archive"
35
version = "0.15.0"

gix-attributes/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-attributes"
35
version = "0.22.5"

gix-attributes/fuzz/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-attributes-fuzz"
35
version = "0.0.0"

gix-bitmap/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-bitmap"
35
version = "0.2.11"
@@ -17,4 +19,4 @@ test = true
1719
thiserror = "1.0.38"
1820

1921
[dev-dependencies]
20-
gix-testtools = { path = "../tests/tools"}
22+
gix-testtools = { path = "../tests/tools" }

gix-blame/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-blame"
35
version = "0.0.0"

gix-chunk/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-chunk"
35
version = "0.4.8"

gix-command/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-command"
35
version = "0.3.9"

gix-commitgraph/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-commitgraph"
35
version = "0.24.3"

gix-commitgraph/fuzz/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-commitgraph-fuzz"
35
version = "0.0.0"

gix-config-value/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-config-value"
35
version = "0.14.8"

gix-config-value/fuzz/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-config-value-fuzz"
35
version = "0.0.0"

gix-config/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-config"
35
version = "0.40.0"

gix-config/fuzz/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
lints.workspace = true
12

23
[package]
34
name = "gix-config-fuzz"

gix-config/tests/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-config-tests"
35
version = "0.0.0"
@@ -29,4 +31,4 @@ serial_test = { version = "3.1.0", default-features = false }
2931
bstr = { version = "1.3.0", default-features = false, features = ["std"] }
3032

3133
bytesize = "1.3.0"
32-
cap = { version = "0.1.2", features = ["stats"] }
34+
cap = { version = "0.1.2", features = ["stats"] }

gix-credentials/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-credentials"
35
version = "0.24.5"

gix-date/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-date"
35
version = "0.9.0"

gix-date/fuzz/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-date-fuzz"
35
version = "0.0.0"

gix-diff/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-diff"
35
version = "0.46.0"

gix-diff/tests/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-diff-tests"
35
version = "0.0.0"

gix-dir/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-dir"
35
version = "0.8.0"

gix-discover/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-discover"
35
version = "0.35.0"

gix-features/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-features"
35
description = "A crate to integrate various capabilities using compile-time feature flags"

gix-features/src/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod _impl {
1414
impl Sha1 {
1515
/// Digest the given `bytes`.
1616
pub fn update(&mut self, bytes: &[u8]) {
17-
self.0.update(bytes)
17+
self.0.update(bytes);
1818
}
1919
/// Finalize the hash and produce a digest.
2020
pub fn digest(self) -> Sha1Digest {

gix-features/tests/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use gix_features::hash::Sha1;
33
#[cfg(not(feature = "fast-sha1"))]
44
#[test]
55
fn size_of_sha1() {
6-
assert_eq!(std::mem::size_of::<Sha1>(), 96)
6+
assert_eq!(std::mem::size_of::<Sha1>(), 96);
77
}
88

99
#[cfg(feature = "fast-sha1")]

gix-fetchhead/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-fetchhead"
35
version = "0.0.0"

gix-filter/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-filter"
35
version = "0.13.0"

gix-fs/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-fs"
35
version = "0.11.3"

gix-fsck/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-fsck"
35
version = "0.6.0"
@@ -19,4 +21,4 @@ gix-object = { version = "^0.44.0", path = "../gix-object" }
1921

2022
[dev-dependencies]
2123
gix-odb = { path = "../gix-odb" }
22-
gix-testtools = { path = "../tests/tools"}
24+
gix-testtools = { path = "../tests/tools" }

gix-glob/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-glob"
35
version = "0.16.5"

gix-hash/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-hash"
35
version = "0.14.2"

gix-hashtable/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-hashtable"
35
version = "0.5.2"
@@ -15,8 +17,7 @@ doctest = false
1517
[dependencies]
1618
parking_lot = "0.12.1"
1719
hashbrown = { version = "0.14.0", default-features = false, features = [
18-
"inline-more",
19-
"raw"
20+
"inline-more",
21+
"raw"
2022
] }
2123
gix-hash = { version = "^0.14.2", path = "../gix-hash" }
22-

gix-ignore/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-ignore"
35
version = "0.11.4"

gix-index/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-index"
35
version = "0.35.0"

gix-index/tests/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-index-tests"
35
version = "0.0.0"

gix-lfs/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-lfs"
35
version = "0.0.0"

gix-lock/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-lock"
35
version = "14.0.0"

gix-macros/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-macros"
35
version = "0.1.5"

gix-mailmap/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-mailmap"
35
version = "0.24.0"

gix-negotiate/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-negotiate"
35
version = "0.15.0"

gix-note/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lints.workspace = true
2+
13
[package]
24
name = "gix-note"
35
version = "0.0.0"

0 commit comments

Comments
 (0)