Adapt clippy run to include bin targets
Since clippy run is limiting targets to --lib and --tests the tui is not being processed. Include also --bins but still limit targets since there are more things not generated by codegenerator. Change-Id: I9a0d83743cebbc6bfcdf2ffb1e5086055b392cdb
This commit is contained in:
@@ -674,9 +674,7 @@ class RustTuiGenerator(BaseGenerator):
|
||||
additional_imports.add(
|
||||
"openstack_sdk::{AsyncOpenStack, api::QueryAsync}"
|
||||
)
|
||||
additional_imports.add("structable_derive::StructTable")
|
||||
additional_imports.add("crate::utils::StructTable")
|
||||
additional_imports.add("crate::utils::OutputConfig")
|
||||
|
||||
if args.operation_type == "list":
|
||||
if "limit" in [
|
||||
k for (k, _) in type_manager.get_parameters("query")
|
||||
@@ -685,6 +683,10 @@ class RustTuiGenerator(BaseGenerator):
|
||||
additional_imports.add(
|
||||
"openstack_sdk::api::{paged, Pagination}"
|
||||
)
|
||||
additional_imports.add("structable_derive::StructTable")
|
||||
additional_imports.add("crate::utils::StructTable")
|
||||
additional_imports.add("crate::utils::OutputConfig")
|
||||
|
||||
elif args.operation_type == "delete":
|
||||
additional_imports.add("openstack_sdk::api::ignore")
|
||||
additional_imports.add(
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
- name: "Optimize generated code with clippy"
|
||||
ansible.builtin.command:
|
||||
cmd: "cargo clippy --fix --lib --tests --allow-dirty"
|
||||
cmd: "cargo clippy --fix --lib --tests --bins --allow-dirty"
|
||||
chdir: "{{ rust_project_dir }}"
|
||||
|
||||
- name: "Compile new code (only generated crates)"
|
||||
|
||||
Reference in New Issue
Block a user