diff --git a/.github/workflows/rust-cubesql.yml b/.github/workflows/rust-cubesql.yml index 74741e466a7e9..6c9091972cdb1 100644 --- a/.github/workflows/rust-cubesql.yml +++ b/.github/workflows/rust-cubesql.yml @@ -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 diff --git a/rust/cubenativeutils/Cargo.toml b/rust/cubenativeutils/Cargo.toml index 1e4e18574a8e2..c0ee2a18858f4 100644 --- a/rust/cubenativeutils/Cargo.toml +++ b/rust/cubenativeutils/Cargo.toml @@ -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" diff --git a/rust/cubesqlplanner/cubesqlplanner/Cargo.toml b/rust/cubesqlplanner/cubesqlplanner/Cargo.toml index cbf1392dac058..72eddcfa77436 100644 --- a/rust/cubesqlplanner/cubesqlplanner/Cargo.toml +++ b/rust/cubesqlplanner/cubesqlplanner/Cargo.toml @@ -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" diff --git a/rust/cubesqlplanner/nativebridge/Cargo.toml b/rust/cubesqlplanner/nativebridge/Cargo.toml index 2111236eb58da..634774e955ebd 100644 --- a/rust/cubesqlplanner/nativebridge/Cargo.toml +++ b/rust/cubesqlplanner/nativebridge/Cargo.toml @@ -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"