Skip to content

Commit 2d5264d

Browse files
authored
chore(sca): add comments to manifest kinds (#305)
In order to consolidate the `manifest_kind` type in interfaces with `Manifest_kind.ml`, this PR: - transfers the comments from the ML file to interfaces - adds `eq`, `show`, and `yojson` derivations to the ATD definition - [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
1 parent c093472 commit 2d5264d

3 files changed

+20
-7
lines changed

semgrep_output_v1.atd

+18-7
Original file line numberDiff line numberDiff line change
@@ -1824,22 +1824,33 @@ type output_format = [
18241824
| Emacs
18251825
]
18261826

1827-
(* TODO: merge with Manifest_kind.ml *)
1828-
type manifest_kind <python decorator="dataclass(frozen=True)"> = [
1829-
| RequirementsIn (* Manifest file for pip *)
1827+
type manifest_kind
1828+
<ocaml attr="deriving show, eq, yojson">
1829+
<python decorator="dataclass(frozen=True)"> = [
1830+
| RequirementsIn
1831+
(* A Pip Requirements.in in file, which follows the format of requirements.txt - https://pip.pypa.io/en/stable/reference/requirements-file-format/ *)
18301832
| PackageJson
1833+
(* An NPM package.json manifest file - https://docs.npmjs.com/cli/v10/configuring-npm/package-json *)
18311834
| Gemfile
1832-
| GoMod
1835+
(* A Ruby Gemfile manifest - https://bundler.io/v2.5/man/gemfile.5.html *)
1836+
| GoMod (* go.mod - https://go.dev/doc/modules/gomod-ref *)
18331837
| CargoToml
1838+
(* cargo.toml - https://doc.rust-lang.org/cargo/reference/manifest.html *)
18341839
| PomXml
1840+
(* A Maven pom.xml manifest file - https://maven.apache.org/guides/introduction/introduction-to-the-pom.html *)
18351841
| BuildGradle
1836-
| ComposerJson
1842+
(* A Gradle build.gradle build file - https://docs.gradle.org/current/userguide/build_file_basics.html *)
1843+
| ComposerJson (* composer.json - https://getcomposer.org/doc/04-schema.md *)
18371844
| NugetManifestJson
1838-
| PubspecYaml
1845+
(* manifest for nuget - could not find a reference; this may not actually exist *)
1846+
| PubspecYaml (* pubspec.yaml - https://dart.dev/tools/pub/pubspec *)
18391847
| PackageSwift
1848+
(* Package.swift - https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html *)
18401849
| MixExs
1841-
| Pipfile
1850+
(* mix.exs - https://hexdocs.pm/elixir/introduction-to-mix.html#project-compilation *)
1851+
| Pipfile (* Pipfile - https://pipenv.pypa.io/en/latest/pipfile.html *)
18421852
| PyprojectToml
1853+
(* pyproject.toml - https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ *)
18431854
]
18441855

18451856
type manifest = {

semgrep_output_v1_j.ml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1_j.mli

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)