@@ -306,6 +306,17 @@ type skipped_target
306
306
type skip_reason
307
307
<ocaml attr="deriving show">
308
308
<python decorator="dataclass(frozen=True)"> = [
309
+ (* New in osemgrep *)
310
+ | Gitignore_patterns_match <json name="gitignore_patterns_match">
311
+ (* Originally returned by the Python CLI *)
312
+ | Always_skipped <json name="always_skipped">
313
+ | Semgrepignore_patterns_match <json name="semgrepignore_patterns_match">
314
+ | Cli_include_flags_do_not_match <json name="cli_include_flags_do_not_match">
315
+ | Cli_exclude_flags_match <json name="cli_exclude_flags_match">
316
+ | Exceeded_size_limit <json name="exceeded_size_limit">
317
+ | Analysis_failed_parser_or_internal_error
318
+ <json name="analysis_failed_parser_or_internal_error">
319
+ (* Originally returned by semgrep-core *)
309
320
| Excluded_by_config <json name="excluded_by_config">
310
321
| Wrong_language <json name="wrong_language">
311
322
| Too_big <json name="too_big">
@@ -440,12 +451,12 @@ type core_match_results
440
451
(* errors are guaranteed to be duplicate free; see also Report.ml *)
441
452
errors: core_error list;
442
453
443
- ? skipped_targets <json name="skipped">: skipped_target list option ;
454
+ ~ skipped_targets <json name="skipped">: skipped_target list;
444
455
(* sinced semgrep 0.86 *)
445
- ? skipped_rules: skipped_rule list option ;
456
+ ~ skipped_rules: skipped_rule list;
446
457
447
458
(* since semgrep 0.109? *)
448
- ? explanations: matching_explanation list option ;
459
+ ~ explanations: matching_explanation list;
449
460
450
461
stats: core_stats;
451
462
(* LATER: rename timing *)
@@ -662,14 +673,13 @@ type cli_paths <ocaml attr="deriving show"> = {
662
673
scanned: string list;
663
674
(* LATER: either _comment or skipped:, use a variant *)
664
675
?_comment: string option;
665
- ? skipped: cli_skipped_target list option ;
676
+ ~ skipped: cli_skipped_target list;
666
677
}
667
678
668
679
(* LATER: could merge with skipped_target above *)
669
680
type cli_skipped_target <ocaml attr="deriving show"> = {
670
681
path: string;
671
- (* LATER: use a variant, reuse skip_reason above *)
672
- reason: string;
682
+ reason: skip_reason;
673
683
}
674
684
675
685
(* LATER: could merge with core_timing above
0 commit comments