dart-decimate 0.0.43 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -169,6 +169,7 @@ fn scoped_project(
169
169
  save_regression_baseline: None,
170
170
  regression_tolerance: crate::RegressionTolerance::default(),
171
171
  fail_on_regression: false,
172
+ finding_gate: crate::cli::FindingGate::ErrorsOnly,
172
173
  trace_file: None,
173
174
  trace_symbol: None,
174
175
  trace_dependency: None,
@@ -23,15 +23,23 @@ pub(super) fn apply_security_summary(request: &CommandRequest, report: &mut Json
23
23
  report.attack_surface.clear();
24
24
  report.runtime_coverage = None;
25
25
  report.next_steps.clear();
26
+ crate::output::recompute_visible_duplication_summary(report);
26
27
  }
27
28
 
28
- pub(super) fn exit_code(request: &CommandRequest, report: &JsonReport, regressed: bool) -> i32 {
29
- if request.security_gate.is_some() {
30
- if report.verdict == Verdict::Pass {
31
- 0
32
- } else {
33
- 8
34
- }
29
+ pub(super) fn exit_code(
30
+ request: &CommandRequest,
31
+ report: &JsonReport,
32
+ regressed: bool,
33
+ duplication_failed: bool,
34
+ strict_failed: bool,
35
+ verdict_before_duplication: Verdict,
36
+ ) -> i32 {
37
+ if request.security_gate.is_some() && verdict_before_duplication == Verdict::Fail {
38
+ 8
39
+ } else if strict_failed || duplication_failed {
40
+ 1
41
+ } else if request.security_gate.is_some() {
42
+ 0
35
43
  } else if request.security_issue_mode.fails_on_issues() {
36
44
  i32::from(report.summary.findings > 0)
37
45
  } else if request.command == ReportCommand::Audit && request.audit_gate == AuditGate::NewOnly {
package/src/cli.rs CHANGED
@@ -153,6 +153,7 @@ struct CommandRequest {
153
153
  save_regression_baseline: Option<PathBuf>,
154
154
  regression_tolerance: RegressionTolerance,
155
155
  fail_on_regression: bool,
156
+ finding_gate: FindingGate,
156
157
  trace_file: Option<PathBuf>,
157
158
  trace_symbol: Option<TraceSymbolSpec>,
158
159
  trace_dependency: Option<String>,
@@ -174,6 +175,13 @@ struct SymbolRequestOptions {
174
175
  private_type_leaks: bool,
175
176
  }
176
177
 
178
+ #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
179
+ enum FindingGate {
180
+ #[default]
181
+ ErrorsOnly,
182
+ All,
183
+ }
184
+
177
185
  impl CommandRequest {
178
186
  fn entry_point_mode(&self) -> entry_points::EntryPointMode {
179
187
  mode_args::production_mode(self.production)
@@ -279,8 +287,18 @@ fn run_request<W: Write>(request: &CommandRequest, mut writer: W) -> Result<i32,
279
287
  }
280
288
  security_summary_run::apply_security_summary(request, &mut report);
281
289
  audit_run::apply_risk(&project.root, &audit_context, &mut report);
290
+ let verdict_before_duplication = report.verdict;
282
291
  apply_duplication_threshold_gate(&mut report);
283
- let code = security_summary_run::exit_code(request, &report, regressed);
292
+ let duplication_failed = report.summary.duplication_threshold_exceeded;
293
+ let strict_failed = apply_strict_gate(request, &mut report);
294
+ let code = security_summary_run::exit_code(
295
+ request,
296
+ &report,
297
+ regressed,
298
+ duplication_failed,
299
+ strict_failed,
300
+ verdict_before_duplication,
301
+ );
284
302
 
285
303
  match request.format {
286
304
  ReportOutputFormat::Human => writer.write_all(render_human_report(&report).as_bytes())?,
@@ -307,8 +325,28 @@ fn apply_duplication_threshold_gate(report: &mut crate::output::JsonReport) {
307
325
  }
308
326
  }
309
327
 
328
+ fn apply_strict_gate(request: &CommandRequest, report: &mut crate::output::JsonReport) -> bool {
329
+ let finding_count = if request.command == ReportCommand::Audit
330
+ && request.audit_gate == audit_run::AuditGate::NewOnly
331
+ {
332
+ report
333
+ .summary
334
+ .attribution
335
+ .as_ref()
336
+ .map_or(0, |attribution| attribution.introduced.findings)
337
+ } else {
338
+ report.summary.findings
339
+ };
340
+ let failed = request.finding_gate == FindingGate::All && finding_count > 0;
341
+ if failed {
342
+ report.verdict = Verdict::Fail;
343
+ }
344
+ failed
345
+ }
346
+
310
347
  fn command() -> Command {
311
348
  let command = Command::new("dart-decimate")
349
+ .version(crate::VERSION)
312
350
  .about("Rust-native Dart and Flutter module-graph intelligence")
313
351
  .subcommand_required(false)
314
352
  .arg_required_else_help(false);
@@ -408,7 +446,8 @@ fn audit_command() -> Command {
408
446
  Arg::new("brief")
409
447
  .long("brief")
410
448
  .help("Emit a Fallow-style advisory review brief and always exit 0")
411
- .action(ArgAction::SetTrue),
449
+ .action(ArgAction::SetTrue)
450
+ .conflicts_with("strict"),
412
451
  )
413
452
  .arg(
414
453
  Arg::new("base")
@@ -544,6 +583,7 @@ fn request_from_matches(matches: &ArgMatches) -> Result<CommandRequest, CliError
544
583
  save_regression_baseline,
545
584
  regression_tolerance: regression.tolerance,
546
585
  fail_on_regression: regression.fail_on_regression,
586
+ finding_gate: finding_gate(subcommand),
547
587
  trace_file: trace.file,
548
588
  trace_symbol: trace.symbol,
549
589
  trace_dependency: trace.dependency,
@@ -563,6 +603,20 @@ fn request_from_matches(matches: &ArgMatches) -> Result<CommandRequest, CliError
563
603
  })
564
604
  }
565
605
 
606
+ fn finding_gate(subcommand: &ArgMatches) -> FindingGate {
607
+ if subcommand
608
+ .try_get_one::<bool>("strict")
609
+ .ok()
610
+ .flatten()
611
+ .copied()
612
+ .unwrap_or_default()
613
+ {
614
+ FindingGate::All
615
+ } else {
616
+ FindingGate::ErrorsOnly
617
+ }
618
+ }
619
+
566
620
  fn request_format(
567
621
  subcommand: &ArgMatches,
568
622
  config: &DartDecimateConfig,
@@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
5
5
  use crate::SecurityCategory;
6
6
  use crate::output::{
7
7
  Finding, FindingKind, JsonAttackSurfaceEntry, JsonReport, JsonSecurityCandidate, Severity,
8
- Verdict,
8
+ Verdict, recompute_visible_duplication_summary,
9
9
  };
10
10
 
11
11
  use super::rule_aliases::{
@@ -75,12 +75,14 @@ pub fn apply_rules_to_report(report: &mut JsonReport, rules: &RuleConfig) -> Res
75
75
  report
76
76
  .findings
77
77
  .retain_mut(|finding| apply_finding_level(finding, &rules) != RuleLevel::Off);
78
- report.clone_groups.retain(|_| {
79
- rules.level(
80
- "dart-decimate/code-duplication",
81
- FindingKind::CodeDuplication,
82
- ) != RuleLevel::Off
83
- });
78
+ if rules.level(
79
+ "dart-decimate/code-duplication",
80
+ FindingKind::CodeDuplication,
81
+ ) == RuleLevel::Off
82
+ {
83
+ report.clone_groups.clear();
84
+ recompute_visible_duplication_summary(report);
85
+ }
84
86
  report.complexity.retain(|finding| {
85
87
  rules.level(&finding.rule_id, complexity_kind(&finding.rule_id)) != RuleLevel::Off
86
88
  });
@@ -2,7 +2,9 @@ use std::collections::{BTreeMap, BTreeSet};
2
2
  use std::fs;
3
3
  use std::path::{Path, PathBuf};
4
4
 
5
- use super::{CodeClone, CodeCloneInstance};
5
+ #[cfg(test)]
6
+ use super::CodeClone;
7
+ use super::CodeCloneInstance;
6
8
 
7
9
  pub(super) struct DeclarationCloneFilter {
8
10
  files: BTreeMap<PathBuf, Option<DeclarationFileContext>>,
@@ -15,6 +17,7 @@ impl DeclarationCloneFilter {
15
17
  }
16
18
  }
17
19
 
20
+ #[cfg(test)]
18
21
  pub(super) fn is_declaration_only_clone(&mut self, group: &CodeClone) -> bool {
19
22
  group
20
23
  .instances
@@ -22,7 +25,10 @@ impl DeclarationCloneFilter {
22
25
  .all(|instance| self.clone_instance_is_declaration_only(instance))
23
26
  }
24
27
 
25
- fn clone_instance_is_declaration_only(&mut self, instance: &CodeCloneInstance) -> bool {
28
+ pub(super) fn clone_instance_is_declaration_only(
29
+ &mut self,
30
+ instance: &CodeCloneInstance,
31
+ ) -> bool {
26
32
  let path = instance.path.clone();
27
33
  let Some(file) = self
28
34
  .files
@@ -43,7 +49,11 @@ impl DeclarationCloneFilter {
43
49
  })
44
50
  .filter(|(_, line)| !line.is_empty())
45
51
  .collect::<Vec<_>>();
46
- !lines.is_empty() && declaration_only_lines(&lines, &file.context.direct_type_body_lines)
52
+ !lines.is_empty()
53
+ && (lines
54
+ .iter()
55
+ .all(|(line, _)| file.bodyless_lines.contains(line))
56
+ || declaration_only_lines(&lines, &file.context.direct_type_body_lines))
47
57
  }
48
58
 
49
59
  #[cfg(test)]
@@ -55,13 +65,69 @@ impl DeclarationCloneFilter {
55
65
  struct DeclarationFileContext {
56
66
  source: String,
57
67
  context: DeclarationContext,
68
+ bodyless_lines: BTreeSet<usize>,
58
69
  }
59
70
 
60
71
  impl DeclarationFileContext {
61
72
  fn read(path: &Path) -> Option<Self> {
62
73
  let source = fs::read_to_string(path).ok()?;
63
74
  let context = DeclarationContext::from_source(&source);
64
- Some(Self { source, context })
75
+ let bodyless_lines = bodyless_member_lines(path, &source);
76
+ Some(Self {
77
+ source,
78
+ context,
79
+ bodyless_lines,
80
+ })
81
+ }
82
+ }
83
+
84
+ // Class-member declaration nodes exclude concrete method bodies. Classify the
85
+ // entire source before looking at clone windows, which may end mid-signature.
86
+ fn bodyless_member_lines(path: &Path, source: &str) -> BTreeSet<usize> {
87
+ let mut lines = BTreeSet::new();
88
+ let Ok(parsed) = crate::dart_parser::parse_dart_source_strict(path, source) else {
89
+ return lines;
90
+ };
91
+ collect_bodyless_lines(parsed.tree().root_node(), parsed.source(), &mut lines);
92
+ lines
93
+ }
94
+
95
+ fn collect_bodyless_lines(node: tree_sitter::Node<'_>, source: &str, lines: &mut BTreeSet<usize>) {
96
+ if node.kind() == "class_member" {
97
+ let mut cursor = node.walk();
98
+ let bodyless = node.named_children(&mut cursor).any(|child| {
99
+ child.kind() == "declaration" && {
100
+ let mut cursor = child.walk();
101
+ child.named_children(&mut cursor).any(|signature| {
102
+ matches!(
103
+ signature.kind(),
104
+ "function_signature"
105
+ | "getter_signature"
106
+ | "setter_signature"
107
+ | "operator_signature"
108
+ )
109
+ })
110
+ }
111
+ });
112
+ // Keep the existing conservative treatment of default values.
113
+ let text = &source[node.byte_range()];
114
+ if bodyless && !signature_contains_non_operator_equals(text) {
115
+ let start = node.start_position();
116
+ let end = node.end_position();
117
+ for (row, line) in source.lines().enumerate().take(end.row + 1).skip(start.row) {
118
+ let before = row != start.row || line[..start.column].trim().is_empty();
119
+ let after =
120
+ row != end.row || strip_line_comment(&line[end.column..]).trim().is_empty();
121
+ if before && after {
122
+ lines.insert(row + 1);
123
+ }
124
+ }
125
+ }
126
+ return;
127
+ }
128
+ let mut cursor = node.walk();
129
+ for child in node.named_children(&mut cursor) {
130
+ collect_bodyless_lines(child, source, lines);
65
131
  }
66
132
  }
67
133
 
@@ -5,6 +5,12 @@ use tempfile::TempDir;
5
5
  use super::*;
6
6
  use crate::scan_project;
7
7
 
8
+ #[test]
9
+ fn zero_threshold_does_not_round_small_duplicates_down_to_pass() {
10
+ assert!(duplication_threshold_exceeded(120_010, 10, Some(0)));
11
+ assert!(!duplication_threshold_exceeded(120_010, 10, Some(1)));
12
+ }
13
+
8
14
  #[test]
9
15
  fn detects_exact_duplicate_dart_blocks() -> Result<(), Box<dyn std::error::Error>> {
10
16
  let fixture = tempfile::tempdir()?;
package/src/dupes.rs CHANGED
@@ -86,7 +86,7 @@ impl Default for DuplicateOptions {
86
86
  ignore_imports: true,
87
87
  ignore_mapper_pairs: true,
88
88
  top: None,
89
- threshold: None,
89
+ threshold: Some(DuplicationThreshold::ZERO),
90
90
  }
91
91
  }
92
92
  }
@@ -100,6 +100,9 @@ const fn default_ignore_mapper_pairs() -> bool {
100
100
  pub struct DuplicationThreshold(u32);
101
101
 
102
102
  impl DuplicationThreshold {
103
+ /// Default threshold: any duplicated lines fail the duplication gate.
104
+ pub const ZERO: Self = Self(0);
105
+
103
106
  /// Build a threshold from a human percentage in the inclusive range `0..=100`.
104
107
  ///
105
108
  /// # Errors
@@ -140,10 +143,17 @@ impl DuplicationThreshold {
140
143
  fn as_percent(self) -> f64 {
141
144
  f64::from(self.0) / 100.0
142
145
  }
146
+ }
143
147
 
144
- fn is_exceeded_by(self, percentage_basis_points: u32) -> bool {
145
- percentage_basis_points > self.0
146
- }
148
+ pub(crate) fn duplication_threshold_exceeded(
149
+ analyzed_lines: usize,
150
+ duplicated_lines: usize,
151
+ threshold_basis_points: Option<u32>,
152
+ ) -> bool {
153
+ analyzed_lines > 0
154
+ && threshold_basis_points.is_some_and(|threshold| {
155
+ (duplicated_lines as u128) * 10_000 > u128::from(threshold) * (analyzed_lines as u128)
156
+ })
147
157
  }
148
158
 
149
159
  impl Serialize for DuplicationThreshold {
@@ -405,7 +415,12 @@ pub fn detect_duplicates(
405
415
  }
406
416
  clone_groups.retain(|group| group_satisfies_occurrence_options(group, options));
407
417
  let mut declaration_filter = DeclarationCloneFilter::new();
408
- clone_groups.retain(|group| !declaration_filter.is_declaration_only_clone(group));
418
+ for group in &mut clone_groups {
419
+ group
420
+ .instances
421
+ .retain(|instance| !declaration_filter.clone_instance_is_declaration_only(instance));
422
+ }
423
+ clone_groups.retain(|group| group_satisfies_occurrence_options(group, options));
409
424
  if options.ignore_mapper_pairs {
410
425
  let mapping_filter = MappingBoundaryFilter::new(project);
411
426
  clone_groups.retain(|group| !mapping_filter.is_mapping_boundary_clone(group));
@@ -589,8 +604,11 @@ fn duplicate_stats(
589
604
  let raw = ((duplicated_lines as u128) * 10_000) / (analyzed_lines as u128);
590
605
  u32::try_from(raw).unwrap_or(u32::MAX)
591
606
  };
592
- let threshold_exceeded = threshold
593
- .is_some_and(|threshold| threshold.is_exceeded_by(duplication_percentage_basis_points));
607
+ let threshold_exceeded = duplication_threshold_exceeded(
608
+ analyzed_lines,
609
+ duplicated_lines,
610
+ threshold.map(DuplicationThreshold::basis_points),
611
+ );
594
612
 
595
613
  DuplicateStats {
596
614
  analyzed_lines,
@@ -651,7 +669,7 @@ fn clone_group_from_occurrences(
651
669
  })
652
670
  }
653
671
 
654
- fn is_ignored_path(path: &Path) -> bool {
672
+ pub(crate) fn is_ignored_path(path: &Path) -> bool {
655
673
  if is_generated_dart_path(path) {
656
674
  return true;
657
675
  }
package/src/lib.rs CHANGED
@@ -5,6 +5,11 @@
5
5
  //! syntax facts. Phase 3 runs graph traversals without evaluating variables,
6
6
  //! types, or function bodies. Phase 4 exposes the CLI and JSON output contract.
7
7
 
8
+ /// Version compiled into the CLI and release artifacts.
9
+ pub const VERSION: &str = env!("CARGO_PKG_VERSION");
10
+ /// Versioned producer identity used by `dart-decimate.report.v1` reports.
11
+ pub const REPORT_TOOL: &str = concat!("dart-decimate ", env!("CARGO_PKG_VERSION"));
12
+
8
13
  pub mod baseline;
9
14
  pub mod boundaries;
10
15
  pub(crate) mod changed_scope;
@@ -49,6 +49,7 @@ fn mcp_overview_tools() -> Vec<Value> {
49
49
  "baseline",
50
50
  "regression_baseline",
51
51
  "fail_on_regression",
52
+ "strict",
52
53
  "tolerance",
53
54
  "production",
54
55
  ],
@@ -161,6 +162,7 @@ fn analyze_mcp_tool() -> Value {
161
162
  "baseline",
162
163
  "regression_baseline",
163
164
  "fail_on_regression",
165
+ "strict",
164
166
  "tolerance",
165
167
  "include_entry_exports",
166
168
  "private_type_leaks",
@@ -239,6 +241,7 @@ fn dupes_mcp_tool() -> Value {
239
241
  "baseline",
240
242
  "regression_baseline",
241
243
  "fail_on_regression",
244
+ "strict",
242
245
  "tolerance",
243
246
  "production",
244
247
  "mode",
@@ -273,6 +276,7 @@ fn health_mcp_tool() -> Value {
273
276
  "baseline",
274
277
  "regression_baseline",
275
278
  "fail_on_regression",
279
+ "strict",
276
280
  "tolerance",
277
281
  "production",
278
282
  "max_cyclomatic",
@@ -371,6 +375,7 @@ fn security_mcp_tool() -> Value {
371
375
  "baseline",
372
376
  "regression_baseline",
373
377
  "fail_on_regression",
378
+ "strict",
374
379
  "tolerance",
375
380
  "top",
376
381
  "surface",
@@ -403,6 +408,7 @@ fn feature_flags_mcp_tool() -> Value {
403
408
  "baseline",
404
409
  "regression_baseline",
405
410
  "fail_on_regression",
411
+ "strict",
406
412
  "tolerance",
407
413
  "production",
408
414
  "top",
@@ -536,6 +542,7 @@ fn audit_mcp_tool() -> Value {
536
542
  "production",
537
543
  "brief",
538
544
  "max_decisions",
545
+ "strict",
539
546
  ],
540
547
  )
541
548
  }
package/src/manifest.rs CHANGED
@@ -147,14 +147,14 @@ fn analysis_commands() -> Value {
147
147
  "kind": "combined",
148
148
  "description": "Run all enabled graph, symbol, dependency, duplicate, health, flag, and security checks.",
149
149
  "schema": SCHEMA_VERSION,
150
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--boundary", "--boundary-coverage", "--boundary-call", "--policy-pack", "--policy-violations", "--max-cyclomatic", "--max-cognitive", "--max-unit-size", "--complexity-breakdown", "--coverage", "--coverage-gaps", "--max-crap", "--runtime-coverage", "--min-invocations-hot", "--min-observation-volume", "--low-traffic-threshold", "--file-scores", "--hotspots", "--targets", "--ownership", "--min-score", "--mode", "--min-tokens", "--min-lines", "--min-occurrences", "--top", "--threshold", "--cross-language", "--skip-local", "--ignore-imports", "--no-ignore-imports", "--include-entry-exports", "--private-type-leaks", "--unused-files", "--unused-exports", "--unused-types", "--unused-deps", "--unlisted-deps", "--private-src-imports", "--duplicate-exports", "--circular-deps", "--re-export-cycles", "--boundary-violations", "--unused-enum-members", "--unused-class-members", "--unresolved-imports", "--stale-suppressions", "--unused-dependency-overrides", "--misconfigured-dependency-overrides"]
150
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--boundary", "--boundary-coverage", "--boundary-call", "--policy-pack", "--policy-violations", "--max-cyclomatic", "--max-cognitive", "--max-unit-size", "--complexity-breakdown", "--coverage", "--coverage-gaps", "--max-crap", "--runtime-coverage", "--min-invocations-hot", "--min-observation-volume", "--low-traffic-threshold", "--file-scores", "--hotspots", "--targets", "--ownership", "--min-score", "--mode", "--min-tokens", "--min-lines", "--min-occurrences", "--top", "--threshold", "--cross-language", "--skip-local", "--ignore-imports", "--no-ignore-imports", "--include-entry-exports", "--private-type-leaks", "--unused-files", "--unused-exports", "--unused-types", "--unused-deps", "--unlisted-deps", "--private-src-imports", "--duplicate-exports", "--circular-deps", "--re-export-cycles", "--boundary-violations", "--unused-enum-members", "--unused-class-members", "--unresolved-imports", "--stale-suppressions", "--unused-dependency-overrides", "--misconfigured-dependency-overrides"]
151
151
  },
152
152
  {
153
153
  "name": "audit",
154
154
  "kind": "audit",
155
155
  "description": "Run changed-code graph checks scoped from a Git base ref.",
156
156
  "schema": SCHEMA_VERSION,
157
- "flags": ["--root", "--brief", "--base", "--gate", "--dead-code-baseline", "--health-baseline", "--dupes-baseline", "--max-decisions", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--boundary", "--boundary-coverage", "--boundary-call", "--policy-pack", "--policy-violations", "--max-cyclomatic", "--max-cognitive", "--max-unit-size", "--complexity-breakdown", "--coverage", "--coverage-gaps", "--max-crap", "--runtime-coverage", "--min-invocations-hot", "--min-observation-volume", "--low-traffic-threshold", "--file-scores", "--hotspots", "--targets", "--ownership", "--min-score", "--mode", "--min-tokens", "--min-lines", "--min-occurrences", "--top", "--threshold", "--cross-language", "--skip-local", "--ignore-imports", "--no-ignore-imports", "--include-entry-exports", "--private-type-leaks"]
157
+ "flags": ["--root", "--brief", "--base", "--gate", "--strict", "--dead-code-baseline", "--health-baseline", "--dupes-baseline", "--max-decisions", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--boundary", "--boundary-coverage", "--boundary-call", "--policy-pack", "--policy-violations", "--max-cyclomatic", "--max-cognitive", "--max-unit-size", "--complexity-breakdown", "--coverage", "--coverage-gaps", "--max-crap", "--runtime-coverage", "--min-invocations-hot", "--min-observation-volume", "--low-traffic-threshold", "--file-scores", "--hotspots", "--targets", "--ownership", "--min-score", "--mode", "--min-tokens", "--min-lines", "--min-occurrences", "--top", "--threshold", "--cross-language", "--skip-local", "--ignore-imports", "--no-ignore-imports", "--include-entry-exports", "--private-type-leaks"]
158
158
  },
159
159
  {
160
160
  "name": "review",
@@ -175,42 +175,42 @@ fn analysis_commands() -> Value {
175
175
  "kind": "dead-code",
176
176
  "description": "Find unreachable Dart files and conservative symbol-level dead code.",
177
177
  "schema": SCHEMA_VERSION,
178
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--include-entry-exports", "--private-type-leaks", "--unused-files", "--unused-exports", "--unused-types", "--unused-deps", "--unlisted-deps", "--private-src-imports", "--duplicate-exports", "--unused-enum-members", "--unused-class-members", "--unresolved-imports", "--stale-suppressions", "--unused-dependency-overrides", "--misconfigured-dependency-overrides"]
178
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--include-entry-exports", "--private-type-leaks", "--unused-files", "--unused-exports", "--unused-types", "--unused-deps", "--unlisted-deps", "--private-src-imports", "--duplicate-exports", "--unused-enum-members", "--unused-class-members", "--unresolved-imports", "--stale-suppressions", "--unused-dependency-overrides", "--misconfigured-dependency-overrides"]
179
179
  },
180
180
  {
181
181
  "name": "cycles",
182
182
  "kind": "cycles",
183
183
  "description": "Find import/export/part/augment dependency cycles.",
184
184
  "schema": SCHEMA_VERSION,
185
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline"]
185
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline"]
186
186
  },
187
187
  {
188
188
  "name": "dupes",
189
189
  "kind": "dupes",
190
190
  "description": "Find duplicated Dart code blocks.",
191
191
  "schema": SCHEMA_VERSION,
192
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--mode", "--min-tokens", "--min-lines", "--min-occurrences", "--top", "--threshold", "--cross-language", "--skip-local", "--ignore-imports", "--no-ignore-imports"]
192
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--mode", "--min-tokens", "--min-lines", "--min-occurrences", "--top", "--threshold", "--cross-language", "--skip-local", "--ignore-imports", "--no-ignore-imports"]
193
193
  },
194
194
  {
195
195
  "name": "health",
196
196
  "kind": "health",
197
197
  "description": "Find complex functions, coverage gaps, hotspots, and refactoring targets.",
198
198
  "schema": SCHEMA_VERSION,
199
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--max-cyclomatic", "--max-cognitive", "--max-unit-size", "--complexity-breakdown", "--coverage", "--coverage-gaps", "--max-crap", "--runtime-coverage", "--min-invocations-hot", "--min-observation-volume", "--low-traffic-threshold", "--file-scores", "--hotspots", "--targets", "--ownership", "--min-score", "--top", "--flutter-style"]
199
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--max-cyclomatic", "--max-cognitive", "--max-unit-size", "--complexity-breakdown", "--coverage", "--coverage-gaps", "--max-crap", "--runtime-coverage", "--min-invocations-hot", "--min-observation-volume", "--low-traffic-threshold", "--file-scores", "--hotspots", "--targets", "--ownership", "--min-score", "--top", "--flutter-style"]
200
200
  },
201
201
  {
202
202
  "name": "flags",
203
203
  "kind": "flags",
204
204
  "description": "Inventory Dart and Flutter feature flag patterns.",
205
205
  "schema": SCHEMA_VERSION,
206
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--top"]
206
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--changed-since", "--compare", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--top"]
207
207
  },
208
208
  {
209
209
  "name": "security",
210
210
  "kind": "security",
211
211
  "description": "Surface local deterministic security review candidates.",
212
212
  "schema": SCHEMA_VERSION,
213
- "flags": ["--root", "--format", "--open", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--top", "--surface", "--sarif-file", "--ci", "--fail-on-issues", "--summary", "--gate", "--diff-file", "--diff-stdin", "--changed-since", "--compare"]
213
+ "flags": ["--root", "--format", "--open", "--strict", "--config", "--entry", "--dart-platform", "--production", "--no-production", "--file", "--workspace", "--changed-workspaces", "--regression-baseline", "--save-regression-baseline", "--fail-on-regression", "--tolerance", "--baseline", "--save-baseline", "--top", "--surface", "--sarif-file", "--ci", "--fail-on-issues", "--summary", "--gate", "--diff-file", "--diff-stdin", "--changed-since", "--compare"]
214
214
  },
215
215
  {
216
216
  "name": "impact",