Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lockfile with dependency source in targets #362

Merged
merged 5 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,7 @@ type analyzer <ocaml attr="deriving show"> = string wrap <ocaml module="Analyzer
*)
type target <ocaml attr="deriving show"> = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also change the targets type and have there a list of code_target and a list of dependency_source.
But let's go with this approach.
Note that @mjambon added also a new Scanning_roots cases in the targets type where pysemgrep relies on
osemgrep file targeting to compute the targets, but I think we're fine with your change; just in the futur for those
cases where pass the Scanning_roots, it will also be the job of the OCaml code to compute the dependency_source (using @bkettle subproject matcher probably).

| CodeTarget of code_target
| LockfileTarget of lockfile
| DependencySourceTarget of dependency_source
]

(*
Expand All @@ -2109,7 +2109,7 @@ type code_target <ocaml attr="deriving show"> = {
*)
analyzer: analyzer;
products: product list;
?lockfile_target: lockfile option;
?dependency_source: dependency_source option;
}

type scanning_roots <ocaml attr="deriving show"> = {
Expand Down
6 changes: 3 additions & 3 deletions semgrep_output_v1.jsonschema

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

4 changes: 2 additions & 2 deletions semgrep_output_v1.proto

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

24 changes: 12 additions & 12 deletions semgrep_output_v1.py

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

16 changes: 8 additions & 8 deletions semgrep_output_v1.ts

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

64 changes: 32 additions & 32 deletions semgrep_output_v1_j.ml

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

2 changes: 1 addition & 1 deletion semgrep_output_v1_j.mli

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