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
//! Validation results structure for aggregating validation outcomes.
use Serialize;
/// Results structure for validation operations, used primarily for JSON output.
///
/// This struct aggregates all validation results into a single structure that
/// can be serialized to JSON for machine consumption. Each field represents
/// the result of a specific validation check.
///
/// # Fields
///
/// - `valid`: Overall validation status (no errors, or warnings in strict mode)
/// - `manifest_valid`: Whether the manifest file is syntactically valid
/// - `dependencies_resolvable`: Whether all dependencies can be resolved
/// - `sources_accessible`: Whether all source repositories are accessible
/// - `local_paths_exist`: Whether all local file dependencies exist
/// - `lockfile_consistent`: Whether the lockfile matches the manifest
/// - `errors`: List of error messages that caused validation to fail
/// - `warnings`: List of warning messages (non-fatal issues)
///
/// # JSON Output Example
///
/// ```json
/// {
/// "valid": true,
/// "manifest_valid": true,
/// "dependencies_resolvable": true,
/// "sources_accessible": true,
/// "local_paths_exist": true,
/// "lockfile_consistent": false,
/// "errors": [],
/// "warnings": ["Lockfile is missing 2 dependencies"]
/// }
/// ```