diff --git a/Cargo.toml b/Cargo.toml index 517741934..01c4a6f25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,6 +66,8 @@ unneeded_field_pattern = "deny" unseparated_literal_suffix = "deny" if_then_some_else_none = "deny" use_debug = "deny" +mod_module_files = "deny" +self_named_module_files = "allow" # TODO # partial_pub_fields = "deny" # print_stdout = "deny" diff --git a/packages/butler/src/commands.rs b/packages/butler/src/commands.rs new file mode 100644 index 000000000..ab63c12f2 --- /dev/null +++ b/packages/butler/src/commands.rs @@ -0,0 +1,35 @@ +mod branches; +pub use branches::Branches; + +mod clear; +pub use clear::Clear; + +mod commit; +pub use commit::Commit; + +mod flush; +pub use flush::Flush; + +mod info; +pub use info::Info; + +mod mv; +pub use mv::Move; + +mod new; +pub use new::New; + +mod remotes; +pub use remotes::Remotes; + +mod reset; +pub use reset::Reset; + +mod run; +pub use run::RunCommand; + +mod setup; +pub use setup::Setup; + +mod status; +pub use status::Status; diff --git a/packages/tauri/src/analytics/mod.rs b/packages/tauri/src/analytics.rs similarity index 100% rename from packages/tauri/src/analytics/mod.rs rename to packages/tauri/src/analytics.rs diff --git a/packages/tauri/src/analytics/posthog/mod.rs b/packages/tauri/src/analytics/posthog.rs similarity index 100% rename from packages/tauri/src/analytics/posthog/mod.rs rename to packages/tauri/src/analytics/posthog.rs diff --git a/packages/tauri/src/database/mod.rs b/packages/tauri/src/database.rs similarity index 100% rename from packages/tauri/src/database/mod.rs rename to packages/tauri/src/database.rs diff --git a/packages/tauri/src/deltas/mod.rs b/packages/tauri/src/deltas.rs similarity index 100% rename from packages/tauri/src/deltas/mod.rs rename to packages/tauri/src/deltas.rs diff --git a/packages/tauri/src/gb_repository/mod.rs b/packages/tauri/src/gb_repository.rs similarity index 100% rename from packages/tauri/src/gb_repository/mod.rs rename to packages/tauri/src/gb_repository.rs diff --git a/packages/tauri/src/git/mod.rs b/packages/tauri/src/git.rs similarity index 100% rename from packages/tauri/src/git/mod.rs rename to packages/tauri/src/git.rs diff --git a/packages/tauri/src/git/reference/mod.rs b/packages/tauri/src/git/reference.rs similarity index 100% rename from packages/tauri/src/git/reference/mod.rs rename to packages/tauri/src/git/reference.rs diff --git a/packages/tauri/src/git/reference/refname/mod.rs b/packages/tauri/src/git/reference/refname.rs similarity index 100% rename from packages/tauri/src/git/reference/refname/mod.rs rename to packages/tauri/src/git/reference/refname.rs diff --git a/packages/tauri/src/git/url/mod.rs b/packages/tauri/src/git/url.rs similarity index 100% rename from packages/tauri/src/git/url/mod.rs rename to packages/tauri/src/git/url.rs diff --git a/packages/tauri/src/github/mod.rs b/packages/tauri/src/github.rs similarity index 100% rename from packages/tauri/src/github/mod.rs rename to packages/tauri/src/github.rs diff --git a/packages/tauri/src/keys/mod.rs b/packages/tauri/src/keys.rs similarity index 100% rename from packages/tauri/src/keys/mod.rs rename to packages/tauri/src/keys.rs diff --git a/packages/tauri/src/lock/mod.rs b/packages/tauri/src/lock.rs similarity index 100% rename from packages/tauri/src/lock/mod.rs rename to packages/tauri/src/lock.rs diff --git a/packages/tauri/src/project_repository/mod.rs b/packages/tauri/src/project_repository.rs similarity index 100% rename from packages/tauri/src/project_repository/mod.rs rename to packages/tauri/src/project_repository.rs diff --git a/packages/tauri/src/projects/mod.rs b/packages/tauri/src/projects.rs similarity index 100% rename from packages/tauri/src/projects/mod.rs rename to packages/tauri/src/projects.rs diff --git a/packages/tauri/src/sessions/mod.rs b/packages/tauri/src/sessions.rs similarity index 100% rename from packages/tauri/src/sessions/mod.rs rename to packages/tauri/src/sessions.rs diff --git a/packages/tauri/src/users/mod.rs b/packages/tauri/src/users.rs similarity index 100% rename from packages/tauri/src/users/mod.rs rename to packages/tauri/src/users.rs diff --git a/packages/tauri/src/virtual_branches/mod.rs b/packages/tauri/src/virtual_branches.rs similarity index 100% rename from packages/tauri/src/virtual_branches/mod.rs rename to packages/tauri/src/virtual_branches.rs diff --git a/packages/tauri/src/virtual_branches/branch/mod.rs b/packages/tauri/src/virtual_branches/branch.rs similarity index 100% rename from packages/tauri/src/virtual_branches/branch/mod.rs rename to packages/tauri/src/virtual_branches/branch.rs diff --git a/packages/tauri/src/virtual_branches/target/mod.rs b/packages/tauri/src/virtual_branches/target.rs similarity index 100% rename from packages/tauri/src/virtual_branches/target/mod.rs rename to packages/tauri/src/virtual_branches/target.rs diff --git a/packages/tauri/src/watcher/mod.rs b/packages/tauri/src/watcher.rs similarity index 100% rename from packages/tauri/src/watcher/mod.rs rename to packages/tauri/src/watcher.rs diff --git a/packages/tauri/src/watcher/dispatchers/mod.rs b/packages/tauri/src/watcher/dispatchers.rs similarity index 100% rename from packages/tauri/src/watcher/dispatchers/mod.rs rename to packages/tauri/src/watcher/dispatchers.rs diff --git a/packages/tauri/src/watcher/handlers/mod.rs b/packages/tauri/src/watcher/handlers.rs similarity index 100% rename from packages/tauri/src/watcher/handlers/mod.rs rename to packages/tauri/src/watcher/handlers.rs diff --git a/packages/tauri/src/zip/mod.rs b/packages/tauri/src/zip.rs similarity index 100% rename from packages/tauri/src/zip/mod.rs rename to packages/tauri/src/zip.rs diff --git a/packages/tauri/tests/common.rs b/packages/tauri/tests/common.rs index a81c7e01b..33856a876 100644 --- a/packages/tauri/tests/common.rs +++ b/packages/tauri/tests/common.rs @@ -1,6 +1,6 @@ -use std::path; - +#![allow(unused)] use gblib::git; +use std::path; pub fn temp_dir() -> std::path::PathBuf { tempfile::tempdir() @@ -250,3 +250,12 @@ impl TestProject { submodule.add_finalize().unwrap(); } } + +pub mod paths { + use super::temp_dir; + use gblib::paths::DataDir; + + pub fn data_dir() -> DataDir { + DataDir::from(temp_dir()) + } +} diff --git a/packages/tauri/tests/gb_repository/mod.rs b/packages/tauri/tests/gb_repository.rs similarity index 98% rename from packages/tauri/tests/gb_repository/mod.rs rename to packages/tauri/tests/gb_repository.rs index 5ab4aacc2..6a6f0d9b5 100644 --- a/packages/tauri/tests/gb_repository/mod.rs +++ b/packages/tauri/tests/gb_repository.rs @@ -1,8 +1,8 @@ -use std::path; +mod common; +use self::common::{paths, TestProject}; use gblib::{gb_repository, git, project_repository, projects}; - -use crate::{common::TestProject, paths}; +use std::path; mod init { use super::*; diff --git a/packages/tauri/tests/lib.rs b/packages/tauri/tests/lib.rs deleted file mode 100644 index 67949eace..000000000 --- a/packages/tauri/tests/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![allow(clippy::dbg_macro)] - -mod common; -mod gb_repository; -mod paths; -mod projects; -mod virtual_branches; diff --git a/packages/tauri/tests/paths/mod.rs b/packages/tauri/tests/paths/mod.rs deleted file mode 100644 index e6c4bcb19..000000000 --- a/packages/tauri/tests/paths/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use gblib::paths::DataDir; - -use crate::common::temp_dir; - -pub fn data_dir() -> DataDir { - DataDir::from(temp_dir()) -} diff --git a/packages/tauri/tests/projects/mod.rs b/packages/tauri/tests/projects.rs similarity index 98% rename from packages/tauri/tests/projects/mod.rs rename to packages/tauri/tests/projects.rs index 3b0549a89..697af51b6 100644 --- a/packages/tauri/tests/projects/mod.rs +++ b/packages/tauri/tests/projects.rs @@ -1,6 +1,7 @@ -use gblib::projects::Controller; +mod common; -use crate::{common, paths}; +use self::common::paths; +use gblib::projects::Controller; pub fn new() -> Controller { let data_dir = paths::data_dir(); diff --git a/packages/tauri/tests/virtual_branches/mod.rs b/packages/tauri/tests/virtual_branches.rs similarity index 99% rename from packages/tauri/tests/virtual_branches/mod.rs rename to packages/tauri/tests/virtual_branches.rs index 10736f2a6..3565d4774 100644 --- a/packages/tauri/tests/virtual_branches/mod.rs +++ b/packages/tauri/tests/virtual_branches.rs @@ -1,9 +1,13 @@ //TODO: #![allow( clippy::redundant_closure_for_method_calls, - clippy::rest_pat_in_fully_bound_structs + clippy::rest_pat_in_fully_bound_structs, + clippy::dbg_macro )] +mod common; + +use self::common::{paths, TestProject}; use std::{fs, path, str::FromStr}; use gblib::{ @@ -14,8 +18,6 @@ use gblib::{ virtual_branches::{branch, controller::ControllerError, errors, Controller}, }; -use crate::{common::TestProject, paths}; - struct Test { repository: TestProject, project_id: ProjectId,