@@ -32,13 +32,14 @@ impl std::fmt::Display for ConfigFormat {
3232#[ derive( Debug , Error ) ]
3333pub enum CreateSubcommandError {
3434 // ===== Configuration File Errors =====
35-
3635 /// Configuration file not found
3736 ///
3837 /// The specified configuration file does not exist or is not accessible.
3938 /// Use `.help()` for detailed troubleshooting steps.
40- #[ error( "Configuration file not found: {path}
41- Tip: Check that the file path is correct: ls -la {path}" ) ]
39+ #[ error(
40+ "Configuration file not found: {path}
41+ Tip: Check that the file path is correct: ls -la {path}"
42+ ) ]
4243 ConfigFileNotFound {
4344 /// Path to the missing configuration file
4445 path : PathBuf ,
@@ -48,8 +49,10 @@ Tip: Check that the file path is correct: ls -la {path}")]
4849 ///
4950 /// The configuration file exists but could not be parsed in the expected format.
5051 /// Use `.help()` for detailed troubleshooting steps.
51- #[ error( "Failed to parse configuration file '{path}' as {format}: {source}
52- Tip: Validate {format} syntax with: jq . < {path}" ) ]
52+ #[ error(
53+ "Failed to parse configuration file '{path}' as {format}: {source}
54+ Tip: Validate {format} syntax with: jq . < {path}"
55+ ) ]
5356 ConfigParsingFailed {
5457 /// Path to the configuration file
5558 path : PathBuf ,
@@ -64,36 +67,40 @@ Tip: Validate {format} syntax with: jq . < {path}")]
6467 ///
6568 /// The configuration file was parsed successfully but contains invalid values.
6669 /// Use `.help()` for detailed troubleshooting steps.
67- #[ error( "Configuration validation failed: {source}
68- Tip: Review the validation error and fix the configuration file" ) ]
70+ #[ error(
71+ "Configuration validation failed: {source}
72+ Tip: Review the validation error and fix the configuration file"
73+ ) ]
6974 ConfigValidationFailed {
7075 /// Underlying validation error from domain layer
7176 #[ source]
7277 source : crate :: application:: command_handlers:: create:: config:: CreateConfigError ,
7378 } ,
7479
7580 // ===== Command Execution Errors =====
76-
7781 /// Command execution failed
7882 ///
7983 /// The create operation failed during execution after validation passed.
8084 /// Use `.help()` for detailed troubleshooting steps.
81- #[ error( "Create command execution failed: {source}
82- Tip: Check logs with --log-output file-and-stderr for detailed error information" ) ]
85+ #[ error(
86+ "Create command execution failed: {source}
87+ Tip: Check logs with --log-output file-and-stderr for detailed error information"
88+ ) ]
8389 CommandFailed {
8490 /// Underlying command handler error
8591 #[ source]
8692 source : CreateCommandHandlerError ,
8793 } ,
8894
8995 // ===== Template Generation Errors =====
90-
9196 /// Template generation failed
9297 ///
9398 /// Failed to generate template configuration or files.
9499 /// Use `.help()` for detailed troubleshooting steps.
95- #[ error( "Template generation failed: {source}
96- Tip: Check that you have write permissions in the target directory" ) ]
100+ #[ error(
101+ "Template generation failed: {source}
102+ Tip: Check that you have write permissions in the target directory"
103+ ) ]
97104 TemplateGenerationFailed {
98105 /// Underlying template generation error from domain layer
99106 #[ source]
@@ -255,11 +262,13 @@ mod tests {
255262 source: Box :: new( std:: io:: Error :: new( std:: io:: ErrorKind :: InvalidData , "test" ) ) ,
256263 } ,
257264 CreateSubcommandError :: ConfigValidationFailed {
258- source: CreateConfigError :: InvalidEnvironmentName ( EnvironmentNameError :: InvalidFormat {
259- attempted_name: "test" . to_string( ) ,
260- reason: "invalid" . to_string( ) ,
261- valid_examples: vec![ "dev" . to_string( ) ] ,
262- } ) ,
265+ source: CreateConfigError :: InvalidEnvironmentName (
266+ EnvironmentNameError :: InvalidFormat {
267+ attempted_name: "test" . to_string( ) ,
268+ reason: "invalid" . to_string( ) ,
269+ valid_examples: vec![ "dev" . to_string( ) ] ,
270+ } ,
271+ ) ,
263272 } ,
264273 ] ;
265274
0 commit comments