1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
//! Command structure and output format definitions for validation.
use Args;
/// Command to validate AGPM project configuration and dependencies.
///
/// This command performs comprehensive validation of a AGPM project, checking
/// various aspects from basic manifest syntax to complex dependency resolution.
/// It supports multiple validation levels and output formats for different use cases.
///
/// # Validation Strategy
///
/// The command performs validation in layers:
/// 1. **Syntax Validation**: TOML parsing and basic structure
/// 2. **Semantic Validation**: Required fields and references
/// 3. **Extended Validation**: Network and dependency checks (opt-in)
/// 4. **Consistency Validation**: Cross-file consistency checks
///
/// # Examples
///
/// ```rust,ignore
/// use agpm_cli::cli::validate::{ValidateCommand, OutputFormat};
///
/// // Basic validation
/// let cmd = ValidateCommand {
/// file: None,
/// resolve: false,
/// check_lock: false,
/// sources: false,
/// paths: false,
/// format: OutputFormat::Text,
/// verbose: false,
/// quiet: false,
/// strict: false,
/// render: false,
/// };
///
/// // Comprehensive CI validation
/// let cmd = ValidateCommand {
/// file: None,
/// resolve: true,
/// check_lock: true,
/// sources: true,
/// paths: true,
/// format: OutputFormat::Json,
/// verbose: false,
/// quiet: true,
/// strict: true,
/// render: false,
/// };
/// ```
/// Output format options for validation results.
///
/// This enum defines the available output formats for validation results,
/// allowing users to choose between human-readable and machine-parseable formats.
///
/// # Variants
///
/// - [`Text`](OutputFormat::Text): Human-readable output with colors and formatting
/// - [`Json`](OutputFormat::Json): Structured JSON output for automation and integration
///
/// # Examples
///
/// ```rust,ignore
/// use agpm_cli::cli::validate::OutputFormat;
///
/// // For human consumption
/// let format = OutputFormat::Text;
///
/// // For automation/CI
/// let format = OutputFormat::Json;
/// ```