Skip to content

Commit

Permalink
feat: added cocoapods lockfile to the list of supported lockfiles (#330)
Browse files Browse the repository at this point in the history
Added necessary interface changes to support 1) a new ecosystem,
cocoapods, 2) new lockfile + manifest types for cocoapods, and 3) a new
parser type for (you guessed it) cocoapods.

- [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.50.0.
See
https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades
	  Note that the types related to the semgrep-core JSON output or the
	  semgrep-core RPC do not need to be backward compatible!

Co-authored-by: Aaron Acosta <[email protected]>
  • Loading branch information
aaronmichaelacosta and Aaron Acosta authored Dec 17, 2024
1 parent 1c82453 commit 632b1de
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 9 deletions.
5 changes: 5 additions & 0 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ type ecosystem
| Nuget <json name="nuget">
| Pub <json name="pub">
| SwiftPM <json name="swiftpm">
| Cocoapods <json name="cocoapods">
(* Deprecated: Mix is a build system, should use Hex, which is the ecosystem *)
| Mix <json name="mix">
| Hex <json name="hex">
Expand Down Expand Up @@ -1674,6 +1675,7 @@ type sca_parser_name = [
| Composer_lock <json name="composer_lock">
| Pubspec_lock <json name="pubspec_lock">
| Package_swift <json name="package_swift">
| Podfile_lock <json name="podfile_lock">
| Package_resolved <json name="package_resolved">
| Mix_lock <json name="mix_lock">
]
Expand Down Expand Up @@ -2025,6 +2027,7 @@ type lockfile_kind
| NugetPackagesLockJson
| PubspecLock
| SwiftPackageResolved (* not a real lockfile *)
| PodfileLock
| MixLock
| ConanLock
] <ocaml repr="classic">
Expand Down Expand Up @@ -2067,6 +2070,8 @@ type manifest_kind
(* Package.swift
* https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html *)
| PackageSwift
(* Podfile - https://guides.cocoapods.org/using/the-podfile.html *)
| Podfile
(* mix.exs
* https://hexdocs.pm/elixir/introduction-to-mix.html#project-compilation *)
| MixExs
Expand Down
4 changes: 4 additions & 0 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.

84 changes: 80 additions & 4 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.

Loading

0 comments on commit 632b1de

Please sign in to comment.