Skip to content

Commit

Permalink
feat(sca): add types for new potential lockfile/manifest types (#315)
Browse files Browse the repository at this point in the history
This PR adds types for the Python UV & Conan C++ manifests and
lockfiles.

- [x] I ran `make setup && make` to update the generated code after
editing a `.atd` file (TODO: have a CI check)
- [x] I made sure we're still backward compatible with old versions of
the CLI.
For example, the Semgrep backend need to still be able to *consume* data
generated
	  by Semgrep 1.17.0.
See
https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades
  • Loading branch information
salolivares authored Nov 22, 2024
1 parent b35746b commit b1f7b29
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 13 deletions.
4 changes: 4 additions & 0 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,7 @@ type lockfile_kind
| PipRequirementsTxt
| PoetryLock
| PipfileLock
| UvLock
| NpmPackageLockJson
| YarnLock
| PnpmLock
Expand All @@ -1927,6 +1928,7 @@ type lockfile_kind
| PubspecLock
| SwiftPackageResolved (* not a real lockfile *)
| MixLock
| ConanLock
] <ocaml repr="classic">

type manifest_kind
Expand Down Expand Up @@ -1959,6 +1961,8 @@ type manifest_kind
| Pipfile (* Pipfile - https://pipenv.pypa.io/en/latest/pipfile.html *)
| PyprojectToml
(* pyproject.toml - https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ *)
| ConanFileTxt (* conanfile.txt - https://docs.conan.io/2.9/reference/conanfile_txt.html#conanfile-txt *)
| ConanFilePy (* conanfile.py - https://docs.conan.io/2.9/reference/conanfile.html *)
]

type manifest
Expand Down
8 changes: 6 additions & 2 deletions semgrep_output_v1.jsonschema

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.proto

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

80 changes: 78 additions & 2 deletions semgrep_output_v1.py

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

20 changes: 20 additions & 0 deletions semgrep_output_v1.ts

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

37 changes: 33 additions & 4 deletions semgrep_output_v1_j.ml

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

9 changes: 5 additions & 4 deletions semgrep_output_v1_j.mli

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

0 comments on commit b1f7b29

Please sign in to comment.