Skip to content

Conversation

@IznaDev
Copy link

@IznaDev IznaDev commented May 7, 2025

Adding cuprated --dry-run option

What

adding of command line option --dry-run

Why

to verify config file parameters :
Config deserialization
PATH permissions
If ports can be binded to

Where

the modifications are in config.rs where we create:
a check_port() function which check if the port is available or not
a dry_run_check() function which look for the config file .toml or take the default config and check the deserialization, path permissions and availability of ports by calling check_port() function

and in arg.rs where we add the dry_run argument and call the dry_run_check() function

@github-actions github-actions bot added A-workspace Area: Changes to a root workspace file or general repo file. A-binaries Area: Related to binaries. labels May 7, 2025
Copy link
Member

@SyntheticBird45 SyntheticBird45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No feedbacks. LGTM

Copy link
Member

@Boog900 Boog900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

}
}

pub fn dry_run_check(args: &Args) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think to reduce duplicated code it would be better to call this function in read_config_and_args after the config is loaded there and not in do_quick_requests where it currently is

time::Duration,
};

use args::Args;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: because the is a mod and not an external crate it should be grouped with the mod imports around line 40

@hinto-janai hinto-janai added the C-feature Category: This is an issue/PR that adds a new feature. label May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-binaries Area: Related to binaries. A-workspace Area: Changes to a root workspace file or general repo file. C-feature Category: This is an issue/PR that adds a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants