Skip to content

Commit

Permalink
ci(cubesql): Attach cubenativeutils and cubesqlplanner to cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mcheshkov committed Nov 13, 2024
1 parent 5fd13d1 commit 9041c11
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust-cubesql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ jobs:
run: cd packages/cubejs-backend-native && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
- name: Clippy Native (with Python)
run: cd packages/cubejs-backend-native && cargo clippy --locked --workspace --all-targets --keep-going --features python -- -D warnings
- name: Clippy cubenativeutils
run: cd rust/cubenativeutils && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
- name: Clippy cubesqlplanner
run: cd rust/cubesqlplanner && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings

unit:
# We use host instead of cross container, because it's much faster
Expand Down
13 changes: 13 additions & 0 deletions rust/cubenativeutils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ convert_case = "0.6.0"
version = "=1"
default-features = false
features = ["napi-1", "napi-4", "napi-6", "futures"]

# Code in cubenativeutils crate is not ready for full-blown clippy
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
# Feel free to remove any rule from here and fix all warnings with it
# Or to write a comment why rule should stay disabled
[lints.clippy]
clone_on_copy = "allow"
len_without_is_empty = "allow"
module_inception = "allow"
multiple_bound_locations = "allow"
result_large_err = "allow"
unnecessary_cast = "allow"
useless_format = "allow"
31 changes: 31 additions & 0 deletions rust/cubesqlplanner/cubesqlplanner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,34 @@ regex = "1.3.9"
version = "=1"
default-features = false
features = ["napi-1", "napi-4", "napi-6", "futures"]

# Code in cubesqlplanner workspace is not ready for full-blown clippy
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
# Feel free to remove any rule from here and fix all warnings with it
# Or to write a comment why rule should stay disabled
[lints.clippy]
clone_on_copy = "allow"
collapsible_else_if = "allow"
default_constructed_unit_structs = "allow"
enum_variant_names = "allow"
filter-map-identity = "allow"
let_and_return = "allow"
map_clone = "allow"
manual_map = "allow"
manual_unwrap_or_default = "allow"
match_like_matches_macro = "allow"
needless-bool = "allow"
needless_borrow = "allow"
needless_question_mark = "allow"
neg_multiply = "allow"
new_without_default = "allow"
only_used_in_recursion = "allow"
ptr_arg = "allow"
redundant_closure = "allow"
result_large_err = "allow"
should_implement_trait = "allow"
to_string_in_format_args = "allow"
too-many-arguments = "allow"
useless_conversion = "allow"
useless_format = "allow"
vec_init_then_push = "allow"
14 changes: 14 additions & 0 deletions rust/cubesqlplanner/nativebridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ features = ["full"]

[dependencies.async-trait]
version = "0.1.42"

# Code in cubesqlplanner workspace is not ready for full-blown clippy
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
# Feel free to remove any rule from here and fix all warnings with it
# Or to write a comment why rule should stay disabled
[lints.clippy]
cmp_owned = "allow"
collapsible_match = "allow"
len_zero = "allow"
let_and_return = "allow"
needless_borrow = "allow"
ptr_arg = "allow"
redundant_closure = "allow"
single_match = "allow"

0 comments on commit 9041c11

Please sign in to comment.