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

chore: use workspace-wide lints #3352

Merged
merged 2 commits into from
Feb 22, 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
10 changes: 0 additions & 10 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,3 @@ linker = "aarch64-linux-gnu-gcc"

[alias]
sqlness = "run --bin sqlness-runner --"


[build]
rustflags = [
# lints
# TODO: use lint configuration in cargo https://github.com/rust-lang/cargo/issues/5034
"-Wclippy::print_stdout",
"-Wclippy::print_stderr",
"-Wclippy::implicit_clone",
]
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ version = "0.6.0"
edition = "2021"
license = "Apache-2.0"

[workspace.lints]
clippy.print_stdout = "warn"
clippy.print_sterr = "warn"
clippy.implicit_clone = "warn"

[workspace.dependencies]
ahash = { version = "0.8", features = ["compile-time-rng"] }
aquamarine = "0.3"
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
arrow.workspace = true
chrono.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
common-base.workspace = true
common-decimal.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license.workspace = true
default = []
testing = []

[lints]
workspace = true

[dependencies]
api.workspace = true
async-trait.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[features]
testing = []

[lints]
workspace = true

[dependencies]
api.workspace = true
arc-swap = "1.0"
Expand Down
3 changes: 3 additions & 0 deletions src/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[features]
testing = []

[lints]
workspace = true

[dependencies]
api.workspace = true
arc-swap = "1.6"
Expand Down
3 changes: 3 additions & 0 deletions src/cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ path = "src/bin/greptime.rs"
[features]
tokio-console = ["common-telemetry/tokio-console"]

[lints]
workspace = true

[dependencies]
anymap = "1.0.0-beta.2"
async-trait.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
anymap = "1.0.0-beta.2"
bitvec = "1.0"
Expand Down
3 changes: 3 additions & 0 deletions src/common/catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
common-error.workspace = true
common-macro.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
common-base.workspace = true
humantime-serde.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/datasource/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
arrow.workspace = true
arrow-schema.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/decimal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
arrow.workspace = true
bigdecimal.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
snafu.workspace = true
strum.workspace = true
3 changes: 3 additions & 0 deletions src/common/function/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ edition.workspace = true
version.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
api.workspace = true
arc-swap = "1.0"
Expand Down
3 changes: 3 additions & 0 deletions src/common/greptimedb-telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
async-trait.workspace = true
common-error.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/grpc-expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
api.workspace = true
async-trait.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
api.workspace = true
arrow-flight.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[lib]
proc-macro = true

[lints]
workspace = true

[dependencies]
proc-macro2 = "1.0.66"
quote = "1.0"
Expand Down
3 changes: 3 additions & 0 deletions src/common/mem-prof/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
common-error.workspace = true
common-macro.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[features]
testing = []

[lints]
workspace = true

[dependencies]
api.workspace = true
async-recursion = "1.0"
Expand Down
3 changes: 2 additions & 1 deletion src/common/plugins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version.workspace = true
edition.workspace = true
license.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
3 changes: 3 additions & 0 deletions src/common/procedure-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
async-trait.workspace = true
common-procedure.workspace = true
3 changes: 3 additions & 0 deletions src/common/procedure/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[features]
testing = []

[lints]
workspace = true

[dependencies]
async-stream.workspace = true
async-trait.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/query/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
api.workspace = true
async-trait.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/recordbatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
arc-swap = "1.6"
common-base.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
async-trait.workspace = true
common-error.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/substrait/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
async-recursion = "1.0"
async-trait.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license.workspace = true
tokio-console = ["console-subscriber", "tokio/tracing"]
deadlock_detection = ["parking_lot/deadlock_detection"]

[lints]
workspace = true

[dependencies]
atty = "0.2"
backtrace = "0.3"
Expand Down
3 changes: 3 additions & 0 deletions src/common/test-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
client.workspace = true
common-query.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
arrow.workspace = true
chrono.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/common/version/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
build-data = "0.1.4"
3 changes: 3 additions & 0 deletions src/common/wal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[features]
testing = []

[lints]
workspace = true

[dependencies]
common-base.workspace = true
common-telemetry.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/datanode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ license.workspace = true
[features]
testing = []

[lints]
workspace = true

[dependencies]
api.workspace = true
arrow-flight.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/datatypes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license.workspace = true
default = []
test = []

[lints]
workspace = true

[dependencies]
arrow.workspace = true
arrow-array.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions src/file-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ license.workspace = true
default = []
test = ["common-test-util"]

[lints]
workspace = true

[dependencies]
api = { workspace = true, optional = true }
async-trait = "0.1"
Expand Down
3 changes: 3 additions & 0 deletions src/flow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
api.workspace = true
bimap = "0.6.3"
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ default = ["python"]
python = ["dep:script"]
testing = []

[lints]
workspace = true

[dependencies]
api.workspace = true
arc-swap = "1.0"
Expand Down
3 changes: 3 additions & 0 deletions src/index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
async-trait.workspace = true
asynchronous-codec = "0.7.0"
Expand Down
Loading