mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
chore: configure clippy cast lints at workspace level
This commit is contained in:
parent
1f669ae996
commit
2ab7565bd8
11 changed files with 33 additions and 8 deletions
|
@ -187,6 +187,15 @@ criterion = { version = "0.5.1", features = ["async_tokio"] }
|
|||
# Enable testing with SQLCipher if specifically requested.
|
||||
libsqlite3-sys = { version = "0.30.1", features = ["bundled-sqlcipher"] }
|
||||
|
||||
# Common lint settings for the workspace
|
||||
[workspace.lints.clippy]
|
||||
# https://github.com/launchbadge/sqlx/issues/3440
|
||||
cast_possible_truncation = 'deny'
|
||||
cast_possible_wrap = 'deny'
|
||||
cast_sign_loss = 'deny'
|
||||
# See `clippy.toml`
|
||||
disallowed_methods = 'deny'
|
||||
|
||||
#
|
||||
# Any
|
||||
#
|
||||
|
|
|
@ -42,3 +42,6 @@ required-features = ["postgres"]
|
|||
name = "sqlite_fetch_all"
|
||||
harness = false
|
||||
required-features = ["sqlite"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -68,3 +68,6 @@ completions = ["dep:clap_complete"]
|
|||
[dev-dependencies]
|
||||
assert_cmd = "2.0.11"
|
||||
tempfile = "3.10.1"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -94,3 +94,6 @@ hashbrown = "0.14.5"
|
|||
[dev-dependencies]
|
||||
sqlx = { workspace = true, features = ["postgres", "sqlite", "mysql", "migrate", "macros", "time", "uuid"] }
|
||||
tokio = { version = "1", features = ["rt"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
#![recursion_limit = "512"]
|
||||
#![warn(future_incompatible, rust_2018_idioms)]
|
||||
#![allow(clippy::needless_doctest_main, clippy::type_complexity)]
|
||||
// See `clippy.toml` at the workspace root
|
||||
#![deny(clippy::disallowed_methods)]
|
||||
#![deny(clippy::cast_possible_truncation)]
|
||||
#![deny(clippy::cast_possible_wrap)]
|
||||
// The only unsafe code in SQLx is that necessary to interact with native APIs like with SQLite,
|
||||
// and that can live in its own separate driver crate.
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
|
@ -49,3 +49,6 @@ sqlx-macros-core = { workspace = true }
|
|||
proc-macro2 = { version = "1.0.36", default-features = false }
|
||||
syn = { version = "2.0.52", default-features = false, features = ["parsing", "proc-macro"] }
|
||||
quote = { version = "1.0.26", default-features = false }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -71,3 +71,6 @@ tracing = { version = "0.1.37", features = ["log"] }
|
|||
whoami = { version = "1.2.1", default-features = false }
|
||||
|
||||
serde = { version = "1.0.144", optional = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -83,3 +83,6 @@ features = ["postgres", "derive"]
|
|||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
etcetera = "0.8.0"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
//! **PostgreSQL** database driver.
|
||||
// https://github.com/launchbadge/sqlx/issues/3440
|
||||
#![deny(clippy::cast_possible_truncation)]
|
||||
#![deny(clippy::cast_possible_wrap)]
|
||||
#![deny(clippy::cast_sign_loss)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate sqlx_core;
|
||||
|
|
|
@ -60,3 +60,6 @@ workspace = true
|
|||
|
||||
[dev-dependencies]
|
||||
sqlx = { workspace = true, default-features = false, features = ["macros", "runtime-tokio", "tls-none"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -9,3 +9,6 @@ sqlx = { default-features = false, path = ".." }
|
|||
env_logger = "0.11"
|
||||
dotenvy = "0.15.0"
|
||||
anyhow = "1.0.26"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
Loading…
Reference in a new issue