From 24cc697a9cd0dcac854359d65b8265f02f483b72 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 11 May 2026 19:45:17 +0900 Subject: chore(lint): add Ruby linter scripts and apply rules Adds scripts/lint with linters for mod.rs naming, contiguous use blocks, use-as aliasing, sorted Cargo dependencies, std::collections maps, and workspace dependency requirements. Renames mod.rs files, reorders use statements, drops unnecessary import aliases, and sorts Cargo.toml entries to satisfy the new rules. --- crates/mozart/src/commands/audit.rs | 3 +-- crates/mozart/src/commands/base_config.rs | 3 +-- crates/mozart/src/commands/create_project.rs | 3 +-- crates/mozart/src/commands/repository.rs | 5 ++--- 4 files changed, 5 insertions(+), 9 deletions(-) (limited to 'crates/mozart/src/commands') diff --git a/crates/mozart/src/commands/audit.rs b/crates/mozart/src/commands/audit.rs index 5193b06..8b28770 100644 --- a/crates/mozart/src/commands/audit.rs +++ b/crates/mozart/src/commands/audit.rs @@ -1,5 +1,3 @@ -use std::path::Path; - use crate::composer::Composer; use clap::Args; use indexmap::IndexMap; @@ -8,6 +6,7 @@ use mozart_core::console::IoInterface; use mozart_core::repository::advisory::{AuditOptions, Auditor, PackageInfo}; use mozart_core::repository::cache::{Cache, build_cache_config}; use mozart_core::repository::repository::RepositorySet; +use std::path::Path; #[derive(Args)] pub struct AuditArgs { diff --git a/crates/mozart/src/commands/base_config.rs b/crates/mozart/src/commands/base_config.rs index c10e7e7..ed05184 100644 --- a/crates/mozart/src/commands/base_config.rs +++ b/crates/mozart/src/commands/base_config.rs @@ -1,7 +1,6 @@ -use std::path::PathBuf; - use mozart_core::composer::composer_home; use mozart_core::config_source::JsonConfigSource; +use std::path::PathBuf; /// Mirrors Composer's `BaseConfigCommand`: resolves the target config file path /// and enforces the `--file` ↔ `--global` mutual exclusivity. diff --git a/crates/mozart/src/commands/create_project.rs b/crates/mozart/src/commands/create_project.rs index 49354d1..fd2edfa 100644 --- a/crates/mozart/src/commands/create_project.rs +++ b/crates/mozart/src/commands/create_project.rs @@ -1,3 +1,4 @@ +use crate::factory::create_download_manager; use clap::Args; use indexmap::IndexMap; use mozart_core::console::IoInterface; @@ -12,8 +13,6 @@ use mozart_core::repository::version; use mozart_core::validation; use std::path::{Path, PathBuf}; -use crate::factory::create_download_manager; - #[derive(Args)] pub struct CreateProjectArgs { /// Package name to install diff --git a/crates/mozart/src/commands/repository.rs b/crates/mozart/src/commands/repository.rs index 6616352..fe94eac 100644 --- a/crates/mozart/src/commands/repository.rs +++ b/crates/mozart/src/commands/repository.rs @@ -1,11 +1,10 @@ +use super::base_config::BaseConfigContext; +use super::config_helpers::{normalize_repositories, render_value}; use anyhow::anyhow; use clap::Args; use mozart_core::console::IoInterface; use mozart_core::console_writeln; -use super::base_config::BaseConfigContext; -use super::config_helpers::{normalize_repositories, render_value}; - #[derive(Args)] pub struct RepositoryArgs { /// Action (list, add, remove, set-url, get-url, enable, disable) -- cgit v1.3.1