Skip to content

Commit 9041c11

Browse files
committed
ci(cubesql): Attach cubenativeutils and cubesqlplanner to cargo clippy
1 parent 5fd13d1 commit 9041c11

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

.github/workflows/rust-cubesql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
run: cd packages/cubejs-backend-native && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
5858
- name: Clippy Native (with Python)
5959
run: cd packages/cubejs-backend-native && cargo clippy --locked --workspace --all-targets --keep-going --features python -- -D warnings
60+
- name: Clippy cubenativeutils
61+
run: cd rust/cubenativeutils && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
62+
- name: Clippy cubesqlplanner
63+
run: cd rust/cubesqlplanner && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
6064

6165
unit:
6266
# We use host instead of cross container, because it's much faster

rust/cubenativeutils/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@ convert_case = "0.6.0"
2323
version = "=1"
2424
default-features = false
2525
features = ["napi-1", "napi-4", "napi-6", "futures"]
26+
27+
# Code in cubenativeutils crate is not ready for full-blown clippy
28+
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
29+
# Feel free to remove any rule from here and fix all warnings with it
30+
# Or to write a comment why rule should stay disabled
31+
[lints.clippy]
32+
clone_on_copy = "allow"
33+
len_without_is_empty = "allow"
34+
module_inception = "allow"
35+
multiple_bound_locations = "allow"
36+
result_large_err = "allow"
37+
unnecessary_cast = "allow"
38+
useless_format = "allow"

rust/cubesqlplanner/cubesqlplanner/Cargo.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,34 @@ regex = "1.3.9"
2626
version = "=1"
2727
default-features = false
2828
features = ["napi-1", "napi-4", "napi-6", "futures"]
29+
30+
# Code in cubesqlplanner workspace is not ready for full-blown clippy
31+
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
32+
# Feel free to remove any rule from here and fix all warnings with it
33+
# Or to write a comment why rule should stay disabled
34+
[lints.clippy]
35+
clone_on_copy = "allow"
36+
collapsible_else_if = "allow"
37+
default_constructed_unit_structs = "allow"
38+
enum_variant_names = "allow"
39+
filter-map-identity = "allow"
40+
let_and_return = "allow"
41+
map_clone = "allow"
42+
manual_map = "allow"
43+
manual_unwrap_or_default = "allow"
44+
match_like_matches_macro = "allow"
45+
needless-bool = "allow"
46+
needless_borrow = "allow"
47+
needless_question_mark = "allow"
48+
neg_multiply = "allow"
49+
new_without_default = "allow"
50+
only_used_in_recursion = "allow"
51+
ptr_arg = "allow"
52+
redundant_closure = "allow"
53+
result_large_err = "allow"
54+
should_implement_trait = "allow"
55+
to_string_in_format_args = "allow"
56+
too-many-arguments = "allow"
57+
useless_conversion = "allow"
58+
useless_format = "allow"
59+
vec_init_then_push = "allow"

rust/cubesqlplanner/nativebridge/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ features = ["full"]
2525

2626
[dependencies.async-trait]
2727
version = "0.1.42"
28+
29+
# Code in cubesqlplanner workspace is not ready for full-blown clippy
30+
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
31+
# Feel free to remove any rule from here and fix all warnings with it
32+
# Or to write a comment why rule should stay disabled
33+
[lints.clippy]
34+
cmp_owned = "allow"
35+
collapsible_match = "allow"
36+
len_zero = "allow"
37+
let_and_return = "allow"
38+
needless_borrow = "allow"
39+
ptr_arg = "allow"
40+
redundant_closure = "allow"
41+
single_match = "allow"

0 commit comments

Comments
 (0)