Skip to content
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

staging: add [workspace.lints] to manifest #547

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
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
36 changes: 36 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,39 @@ members = [
"vhost-device-template",
"vhost-device-vsock",
]

[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"

[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
redundant_explicit_links = "deny"

[workspace.lints.clippy]
enum_glob_use = "deny"
# groups
correctness = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
complexity = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
style = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
# restriction
dbg_macro = "deny"
rc_buffer = "deny"
as_underscore = "deny"
assertions_on_result_states = "deny"
# pedantic
cast_lossless = "deny"
cast_possible_wrap = "deny"
cast_ptr_alignment = "deny"
naive_bytecount = "deny"
ptr_as_ptr = "deny"
bool_to_int_with_if = "deny"
borrow_as_ptr = "deny"
case_sensitive_file_extension_comparisons = "deny"
significant_drop_in_scrutinee = "allow"
significant_drop_tightening = "allow"
missing_safety_doc = "deny"
undocumented_unsafe_blocks = "deny"
option_if_let_else = "allow"
36 changes: 36 additions & 0 deletions staging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,39 @@ members = [
"vhost-device-can",
"vhost-device-console",
]

[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"

[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
redundant_explicit_links = "deny"

[workspace.lints.clippy]
enum_glob_use = "deny"
# groups
correctness = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
complexity = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
style = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
# restriction
dbg_macro = "deny"
rc_buffer = "deny"
as_underscore = "deny"
assertions_on_result_states = "deny"
# pedantic
cast_lossless = "deny"
cast_possible_wrap = "deny"
cast_ptr_alignment = "deny"
naive_bytecount = "deny"
ptr_as_ptr = "deny"
bool_to_int_with_if = "deny"
borrow_as_ptr = "deny"
case_sensitive_file_extension_comparisons = "deny"
significant_drop_in_scrutinee = "allow"
significant_drop_tightening = "allow"
missing_safety_doc = "deny"
undocumented_unsafe_blocks = "deny"
option_if_let_else = "allow"
3 changes: 3 additions & 0 deletions vhost-device-i2c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ keywords = ["i2c", "vhost", "virt", "backend"]
license = "Apache-2.0 OR BSD-3-Clause"
edition = "2021"

[lints]
workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
Expand Down
Loading