Skip to content

Commit

Permalink
Use a record instead of a tuple to scanning roots
Browse files Browse the repository at this point in the history
  • Loading branch information
mjambon committed Jan 18, 2025
1 parent 391c610 commit f780dc5
Show file tree
Hide file tree
Showing 7 changed files with 268 additions and 117 deletions.
7 changes: 6 additions & 1 deletion semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,11 @@ type code_target <ocaml attr="deriving show"> = {
?lockfile_target: lockfile option;
}

type scanning_roots = {
root_paths: fpath list;
targeting_conf: targeting_conf;
}

(* The same path can be present multiple times in targets below, with
* different languages each time, so a Python file can be both analyzed
* with Python rules, but also with generic/regexp rules.
Expand All @@ -1943,7 +1948,7 @@ type code_target <ocaml attr="deriving show"> = {
*)
type targets <ocaml attr="deriving show"> = [
(* list of paths used to discover targets *)
| Scanning_roots of (string list * targeting_conf)
| Scanning_roots of scanning_roots
(* targets already discovered from the scanning roots by pysemgrep *)
| Targets of target list
]
Expand Down
21 changes: 12 additions & 9 deletions semgrep_output_v1.jsonschema

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion semgrep_output_v1.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 36 additions & 5 deletions semgrep_output_v1.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions semgrep_output_v1.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f780dc5

Please sign in to comment.