Skip to content

Consolidate clippy configuration #3016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ similar = "2.2.1"
syn = "2.0"
tempfile = "3"

[workspace.lints.rust]
# unused_qualifications = "warn"

[workspace.lints.clippy]
# disallowed-names = "allow"
# manual-c-str-literals = "allow"
# missing-safety-doc = "allow"
# op-ref = "allow"
# ptr-offset-with-cast = "allow"
# too-many-arguments = "allow"
# transmute-int-to-bool = "allow"
# unnecessary-cast = "allow"
# useless-transmute = "allow"

# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
Expand Down
2 changes: 2 additions & 0 deletions bindgen-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
authors = [
"The rust-bindgen project contributors",
Expand Down
2 changes: 2 additions & 0 deletions bindgen-integration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "bindgen-integration"
description = "A package to test various bindgen features"
Expand Down
2 changes: 2 additions & 0 deletions bindgen-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "bindgen-tests"
version = "0.1.0"
Expand Down
5 changes: 5 additions & 0 deletions bindgen-tests/tests/expectations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,22 @@ block.workspace = true
libloading.workspace = true
objc.workspace = true

# Both of these sections need to be copied here from the workspace because
# Cargo currently does not allow overriding workspace settings in a member
[lints.rust]
### FIXME: these might need to be fixed,
### esp the calling convention, because it is a hard error now
# deprecated = "allow"
# invalid-value = "allow"
# unsupported_calling_conventions = "allow"
#
# Different from the workspace
dead_code = "allow"
non-snake-case = "allow"
non_camel_case_types = "allow"
non_upper_case_globals = "allow"
unexpected-cfgs = "allow"
unused_qualifications = "allow"

[lints.clippy]
disallowed-names = "allow"
Expand Down
2 changes: 2 additions & 0 deletions bindgen-tests/tests/quickchecking/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
name = "quickchecking"
description = "Bindgen property tests with quickcheck. Generate random valid C code and pass it to the csmith/predicate.py script"
Expand Down
2 changes: 2 additions & 0 deletions bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lints.workspace = true

[package]
authors = [
"Jyun-Yan You <[email protected]>",
Expand Down
Loading