Skip to content

Commit

Permalink
Merge branch 'global-lints'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 24, 2024
2 parents db147b9 + 7083b7a commit 37ba461
Show file tree
Hide file tree
Showing 102 changed files with 300 additions and 77 deletions.
22 changes: 0 additions & 22 deletions .cargo/config.toml

This file was deleted.

78 changes: 78 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gitoxide"
description = "A command-line application for interacting with git repositories"
Expand Down Expand Up @@ -311,3 +313,79 @@ features = ["document-features", "max"]
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/gitoxide-max-pure-v{ version }-{ target }{ archive-suffix }"
bin-dir = "gitoxide-max-pure-v{ version }-{ target }/{ bin }{ binary-ext }"

[workspace.lints.rust]
# TODO: enable this
# unused_qualifications = "warn"

[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
#
# Reviewed and allowed lints
enum_glob_use = "allow" # x97
missing_errors_doc = "allow" # x1792
missing_panics_doc = "allow" # x447
module_name_repetitions = "allow" # x125
must_use_candidate = "allow" # x1696
#
# Lints that we may want to forbid in the future
default_trait_access = "allow" # x709
doc_markdown = "allow" # x552
cast_possible_truncation = "allow" # x216
needless_pass_by_value = "allow" # x205
return_self_not_must_use = "allow" # x204
unreadable_literal = "allow" # x169
items_after_statements = "allow" # x164
single_match_else = "allow" # x162
too_many_lines = "allow" # x161
unnecessary_wraps = "allow" # x110
match_same_arms = "allow" # x99
cast_lossless = "allow" # x91
ignored_unit_patterns = "allow" # x80
used_underscore_binding = "allow" # x75
needless_raw_string_hashes = "allow" # x75
implicit_clone = "allow" # x70
manual_let_else = "allow" # x64
cast_precision_loss = "allow" # x56
trivially_copy_pass_by_ref = "allow" # x43
redundant_else = "allow" # x42
if_not_else = "allow" # x37
match_wildcard_for_single_variants = "allow" # x35
cast_sign_loss = "allow" # x35
similar_names = "allow" # x32
struct_excessive_bools = "allow" # x29
cast_possible_wrap = "allow" # x26
explicit_iter_loop = "allow" # x24
explicit_into_iter_loop = "allow" # x22
explicit_deref_methods = "allow" # x22
inconsistent_struct_constructor = "allow" # x18
range_plus_one = "allow" # x17
inefficient_to_string = "allow" # x14
from_iter_instead_of_collect = "allow" # x13
unused_self = "allow" # x10
many_single_char_names = "allow" # x10
manual_string_new = "allow" # x10
iter_not_returning_iterator = "allow" # x10
option_option = "allow" # x9
inline_always = "allow" # x8
manual_assert = "allow" # x7
iter_without_into_iter = "allow" # x6
copy_iterator = "allow" # x6
should_panic_without_expect = "allow" # x5
transmute_ptr_to_ptr = "allow" # x4
match_wild_err_arm = "allow" # x4
manual_is_variant_and = "allow" # x4
bool_to_int_with_if = "allow" # x4
struct_field_names = "allow" # x3
wildcard_imports = "allow" # x2
needless_for_each = "allow" # x2
naive_bytecount = "allow" # x2
mut_mut = "allow" # x2
match_bool = "allow" # x2
fn_params_excessive_bools = "allow" # x2
filter_map_next = "allow" # x2
checked_conversions = "allow" # x2
borrow_as_ptr = "allow" # x2
unnecessary_join = "allow" # x1
stable_sort_primitive = "allow" # x1
no_effect_underscore_binding = "allow" # x1
2 changes: 2 additions & 0 deletions gitoxide-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gitoxide-core"
description = "The library implementing all capabilities of the gitoxide CLI"
Expand Down
2 changes: 2 additions & 0 deletions gix-actor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-actor"
version = "0.32.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-archive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-archive"
version = "0.15.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-attributes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-attributes"
version = "0.22.5"
Expand Down
2 changes: 2 additions & 0 deletions gix-attributes/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-attributes-fuzz"
version = "0.0.0"
Expand Down
4 changes: 3 additions & 1 deletion gix-bitmap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-bitmap"
version = "0.2.11"
Expand All @@ -17,4 +19,4 @@ test = true
thiserror = "1.0.38"

[dev-dependencies]
gix-testtools = { path = "../tests/tools"}
gix-testtools = { path = "../tests/tools" }
2 changes: 2 additions & 0 deletions gix-blame/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-blame"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-chunk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-chunk"
version = "0.4.8"
Expand Down
2 changes: 2 additions & 0 deletions gix-command/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-command"
version = "0.3.9"
Expand Down
2 changes: 2 additions & 0 deletions gix-commitgraph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-commitgraph"
version = "0.24.3"
Expand Down
2 changes: 2 additions & 0 deletions gix-commitgraph/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-commitgraph-fuzz"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-config-value/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-config-value"
version = "0.14.8"
Expand Down
2 changes: 2 additions & 0 deletions gix-config-value/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-config-value-fuzz"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-config"
version = "0.40.0"
Expand Down
1 change: 1 addition & 0 deletions gix-config/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lints.workspace = true

[package]
name = "gix-config-fuzz"
Expand Down
4 changes: 3 additions & 1 deletion gix-config/tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-config-tests"
version = "0.0.0"
Expand Down Expand Up @@ -29,4 +31,4 @@ serial_test = { version = "3.1.0", default-features = false }
bstr = { version = "1.3.0", default-features = false, features = ["std"] }

bytesize = "1.3.0"
cap = { version = "0.1.2", features = ["stats"] }
cap = { version = "0.1.2", features = ["stats"] }
2 changes: 2 additions & 0 deletions gix-credentials/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-credentials"
version = "0.24.5"
Expand Down
2 changes: 2 additions & 0 deletions gix-date/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-date"
version = "0.9.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-date/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-date-fuzz"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-diff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-diff"
version = "0.46.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-diff/tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-diff-tests"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-dir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-dir"
version = "0.8.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-discover/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-discover"
version = "0.35.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-features"
description = "A crate to integrate various capabilities using compile-time feature flags"
Expand Down
2 changes: 1 addition & 1 deletion gix-features/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mod _impl {
impl Sha1 {
/// Digest the given `bytes`.
pub fn update(&mut self, bytes: &[u8]) {
self.0.update(bytes)
self.0.update(bytes);
}
/// Finalize the hash and produce a digest.
pub fn digest(self) -> Sha1Digest {
Expand Down
2 changes: 1 addition & 1 deletion gix-features/tests/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use gix_features::hash::Sha1;
#[cfg(not(feature = "fast-sha1"))]
#[test]
fn size_of_sha1() {
assert_eq!(std::mem::size_of::<Sha1>(), 96)
assert_eq!(std::mem::size_of::<Sha1>(), 96);
}

#[cfg(feature = "fast-sha1")]
Expand Down
2 changes: 2 additions & 0 deletions gix-fetchhead/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-fetchhead"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-filter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-filter"
version = "0.13.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-fs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-fs"
version = "0.11.3"
Expand Down
4 changes: 3 additions & 1 deletion gix-fsck/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-fsck"
version = "0.6.0"
Expand All @@ -19,4 +21,4 @@ gix-object = { version = "^0.44.0", path = "../gix-object" }

[dev-dependencies]
gix-odb = { path = "../gix-odb" }
gix-testtools = { path = "../tests/tools"}
gix-testtools = { path = "../tests/tools" }
2 changes: 2 additions & 0 deletions gix-glob/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-glob"
version = "0.16.5"
Expand Down
2 changes: 2 additions & 0 deletions gix-hash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-hash"
version = "0.14.2"
Expand Down
7 changes: 4 additions & 3 deletions gix-hashtable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-hashtable"
version = "0.5.2"
Expand All @@ -15,8 +17,7 @@ doctest = false
[dependencies]
parking_lot = "0.12.1"
hashbrown = { version = "0.14.0", default-features = false, features = [
"inline-more",
"raw"
"inline-more",
"raw"
] }
gix-hash = { version = "^0.14.2", path = "../gix-hash" }

2 changes: 2 additions & 0 deletions gix-ignore/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-ignore"
version = "0.11.4"
Expand Down
2 changes: 2 additions & 0 deletions gix-index/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-index"
version = "0.35.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-index/tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-index-tests"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-lfs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-lfs"
version = "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-lock/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-lock"
version = "14.0.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-macros"
version = "0.1.5"
Expand Down
2 changes: 2 additions & 0 deletions gix-mailmap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-mailmap"
version = "0.24.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-negotiate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-negotiate"
version = "0.15.0"
Expand Down
2 changes: 2 additions & 0 deletions gix-note/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "gix-note"
version = "0.0.0"
Expand Down
Loading

0 comments on commit 37ba461

Please sign in to comment.