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
#[derive(Debug, Args)]
struct ListArgs {
#[command(subcommand)]
command: ListCommand,
}
#[derive(Debug, Subcommand)]
enum ListCommand {
/// List records that fail configured policy.
PolicyFailures(FindingsListArgs),
/// List maintenance candidates that warrant review.
Interventions(FindingsListArgs),
/// List advisory observations.
Observations(FindingsListArgs),
/// List advisory health findings.
HealthFindings(FindingsListArgs),
/// Deprecated compatibility name for `health-findings`.
Findings(FindingsListArgs),
/// List evidence-backed relationships between paths.
Relationships(RelationshipsListArgs),
/// List structural or consolidation clusters.
Clusters(ClustersListArgs),
/// List aggregate analysis-profile totals.
Profiles(ProfilesListArgs),
}
#[derive(Debug, Args)]
struct ListOutputArgs {
/// Report path; defaults to the latest durable or Git-private report.
#[arg(long)]
report: Option<PathBuf>,
/// Fail unless the report matches current repository state.
#[arg(long)]
require_current: bool,
/// Maximum returned records.
#[arg(long, default_value_t = 50)]
top: usize,
/// Output format.
#[arg(long, value_enum, default_value_t = DisplayFormat::Text)]
format: DisplayFormat,
/// Use a wider terminal layout.
#[arg(long)]
wide: bool,
/// Do not truncate terminal fields.
#[arg(long)]
no_truncate: bool,
}
#[derive(Debug, Args)]
struct FindingsListArgs {
#[command(flatten)]
output: ListOutputArgs,
/// Match a finding path.
#[arg(long)]
path: Option<String>,
/// Match an analysis profile.
#[arg(long)]
profile: Option<String>,
/// Match a resolved file language.
#[arg(long)]
language: Option<String>,
/// Match a resolved file classification.
#[arg(long, visible_alias = "class")]
classification: Option<String>,
/// Match review severity.
#[arg(long)]
severity: Option<String>,
/// Match context/load band.
#[arg(long)]
context_band: Option<String>,
/// Match maintenance-pressure band.
#[arg(long)]
slop_band: Option<String>,
}
#[derive(Debug, Args)]
struct RelationshipsListArgs {
#[command(flatten)]
output: ListOutputArgs,
/// Match a relationship endpoint.
#[arg(long)]
path: Option<String>,
/// Match an endpoint analysis profile.
#[arg(long)]
profile: Option<String>,
/// Match an endpoint file language.
#[arg(long)]
language: Option<String>,
/// Match an endpoint file classification.
#[arg(long, visible_alias = "class")]
classification: Option<String>,
}
#[derive(Debug, Args)]
struct ClustersListArgs {
#[command(flatten)]
output: ListOutputArgs,
/// Match a cluster member path.
#[arg(long)]
path: Option<String>,
/// Match a member analysis profile.
#[arg(long)]
profile: Option<String>,
/// Match a member file language.
#[arg(long)]
language: Option<String>,
/// Match a member file classification.
#[arg(long, visible_alias = "class")]
classification: Option<String>,
}
#[derive(Debug, Args)]
struct ProfilesListArgs {
#[command(flatten)]
output: ListOutputArgs,
/// Match an analysis profile.
#[arg(long)]
profile: Option<String>,
}