Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makers formatting #535

Merged
merged 3 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ cargo make ci-flow
````

* There are many automatic unit tests as part of the library which provide full coverage of the functionality.<br>Any fix/enhancement must come with a set of tests to ensure it's working well.

- _For Windows users_: You need to allow to run PowerShell scripts (see [About Execution Policies](https:/go.microsoft.com/fwlink/?LinkID=135170) for more info). Run in PS:
```ps
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
```
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ serde_ignored = "^0.1"
shell2batch = "^0.4.2"
toml = "^0.5"

[target.'cfg(windows)'.dependencies]
ansi_term = "0.12.1"

[dev-dependencies]
rusty-hook = "^0.11"

Expand Down
2 changes: 1 addition & 1 deletion src/lib/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./cache_test.rs"]
#[path = "cache_test.rs"]
mod cache_test;

use crate::storage;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./cli_test.rs"]
#[path = "cli_test.rs"]
mod cli_test;

use crate::cli_commands;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cli_commands/diff_steps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./diff_steps_test.rs"]
#[path = "diff_steps_test.rs"]
mod diff_steps_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cli_commands/list_steps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./list_steps_test.rs"]
#[path = "list_steps_test.rs"]
mod list_steps_test;

use crate::execution_plan;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cli_commands/print_steps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./print_steps_test.rs"]
#[path = "print_steps_test.rs"]
mod print_steps_test;

use crate::execution_plan::create as create_execution_plan;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./command_test.rs"]
#[path = "command_test.rs"]
mod command_test;

use crate::logger;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./condition_test.rs"]
#[path = "condition_test.rs"]
mod condition_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./config_test.rs"]
#[path = "config_test.rs"]
mod config_test;

use crate::storage;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/descriptor/cargo_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./cargo_alias_test.rs"]
#[path = "cargo_alias_test.rs"]
mod cargo_alias_test;

use crate::io;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/descriptor/descriptor_deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Deserializes and validates the configs.

#[cfg(test)]
#[path = "./descriptor_deserializer_test.rs"]
#[path = "descriptor_deserializer_test.rs"]
mod descriptor_deserializer_test;

use crate::types::{Config, ExternalConfig};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/descriptor/makefiles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

pub(crate) static BASE: &str = include_str!("base.toml");
Expand Down
2 changes: 1 addition & 1 deletion src/lib/descriptor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//!

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

mod cargo_alias;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/environment/crateinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./crateinfo_test.rs"]
#[path = "crateinfo_test.rs"]
mod crateinfo_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/environment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
pub(crate) mod crateinfo;

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/execution_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./execution_plan_test.rs"]
#[path = "execution_plan_test.rs"]
mod execution_plan_test;

use crate::environment;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/functions/decode_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!

#[cfg(test)]
#[path = "./decode_func_test.rs"]
#[path = "decode_func_test.rs"]
mod decode_func_test;

use crate::environment;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/functions/getat_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./getat_func_test.rs"]
#[path = "getat_func_test.rs"]
mod getat_func_test;

use envmnt;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/functions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

mod decode_func;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/functions/remove_empty_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./remove_empty_func_test.rs"]
#[path = "remove_empty_func_test.rs"]
mod remove_empty_func_test;

use envmnt;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/functions/split_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./split_func_test.rs"]
#[path = "split_func_test.rs"]
mod split_func_test;

use envmnt;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/functions/trim_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//!

#[cfg(test)]
#[path = "./trim_func_test.rs"]
#[path = "trim_func_test.rs"]
mod trim_func_test;

use envmnt;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installer/cargo_plugin_installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./cargo_plugin_installer_test.rs"]
#[path = "cargo_plugin_installer_test.rs"]
mod cargo_plugin_installer_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installer/crate_installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./crate_installer_test.rs"]
#[path = "crate_installer_test.rs"]
mod crate_installer_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installer/crate_version_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./crate_version_check_test.rs"]
#[path = "crate_version_check_test.rs"]
mod crate_version_check_test;

use dirs_next;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub(crate) mod crate_version_check;
pub(crate) mod rustup_component_installer;

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

use crate::scriptengine;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installer/rustup_component_installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./rustup_component_installer_test.rs"]
#[path = "rustup_component_installer_test.rs"]
mod rustup_component_installer_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./io_test.rs"]
#[path = "io_test.rs"]
mod io_test;

use fsio::file::modify_file;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./legacy_test.rs"]
#[path = "legacy_test.rs"]
mod legacy_test;

use dirs_next;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./logger_test.rs"]
#[path = "logger_test.rs"]
mod logger_test;

use crate::recursion_level;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@
//! [Apache 2](https://github.com/sagiegurari/cargo-make/blob/master/LICENSE) open source license.
//!

// Dependencies used in the binary `makers`:
#[cfg(windows)]
use ansi_term as _;

#[macro_use]
extern crate log;
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./profile_test.rs"]
#[path = "profile_test.rs"]
mod profile_test;

use envmnt;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/proxy_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::env;
use crate::{logger, profile, types::Task};

#[cfg(test)]
#[path = "./proxy_task_test.rs"]
#[path = "proxy_task_test.rs"]
mod proxy_task_test;

pub(crate) fn create_proxy_task(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/recursion_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./recursion_level_test.rs"]
#[path = "recursion_level_test.rs"]
mod recursion_level_test;

use envmnt;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!

#[cfg(test)]
#[path = "./runner_test.rs"]
#[path = "runner_test.rs"]
mod runner_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/duck_script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

mod sdk;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/generic_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./generic_script_test.rs"]
#[path = "generic_script_test.rs"]
mod generic_script_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod shebang_script;
mod shell_to_batch;

#[cfg(test)]
#[path = "./mod_test.rs"]
#[path = "mod_test.rs"]
mod mod_test;

use crate::environment;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/os_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./os_script_test.rs"]
#[path = "os_script_test.rs"]
mod os_script_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/rsscript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./rsscript_test.rs"]
#[path = "rsscript_test.rs"]
mod rsscript_test;

use crate::command;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/script_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./script_utils_test.rs"]
#[path = "script_utils_test.rs"]
mod script_utils_test;

use crate::io;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/shebang_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./shebang_script_test.rs"]
#[path = "shebang_script_test.rs"]
mod shebang_script_test;

use crate::scriptengine::generic_script;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scriptengine/shell_to_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!

#[cfg(test)]
#[path = "./shell_to_batch_test.rs"]
#[path = "shell_to_batch_test.rs"]
mod shell_to_batch_test;

use crate::command;
Expand Down
Loading