diff --git a/semgrep_output_v1.atd b/semgrep_output_v1.atd index 2995768f..6d1d40df 100644 --- a/semgrep_output_v1.atd +++ b/semgrep_output_v1.atd @@ -2089,6 +2089,8 @@ type manifest_kind | ConanFileTxt (* conanfile.py - https://docs.conan.io/2.9/reference/conanfile.html *) | ConanFilePy + (* .csproj - https://docs.microsoft.com/en-us/dotnet/core/tools/csproj *) + | Csproj ] type manifest diff --git a/semgrep_output_v1.jsonschema b/semgrep_output_v1.jsonschema index 7e3ab501..08169527 100644 --- a/semgrep_output_v1.jsonschema +++ b/semgrep_output_v1.jsonschema @@ -1700,7 +1700,8 @@ { "const": "Pipfile" }, { "const": "PyprojectToml" }, { "const": "ConanFileTxt" }, - { "const": "ConanFilePy" } + { "const": "ConanFilePy" }, + { "const": "Csproj" } ] }, "manifest": { diff --git a/semgrep_output_v1.proto b/semgrep_output_v1.proto index b1937edd..e41c61fc 100644 --- a/semgrep_output_v1.proto +++ b/semgrep_output_v1.proto @@ -1,6 +1,6 @@ // Generated by jsonschema2protobuf. DO NOT EDIT! // Source file: semgrep_output_v1.jsonschema -// Source file sha256 digest: 25e0e40433e3ae6acc541edaf39cff2ad383ceb1e71630e89b6baa0b8346d465 +// Source file sha256 digest: d9baa6fa076fda6a6d6524f2169a1649bb55d75db50fe2ed88b98a517f2acfa2 syntax = "proto3"; diff --git a/semgrep_output_v1.py b/semgrep_output_v1.py index 9a88ea07..87c7834f 100644 --- a/semgrep_output_v1.py +++ b/semgrep_output_v1.py @@ -3507,11 +3507,28 @@ def to_json_string(self, **kw: Any) -> str: return json.dumps(self.to_json(), **kw) +@dataclass(frozen=True) +class Csproj: + """Original type: manifest_kind = [ ... | Csproj | ... ]""" + + @property + def kind(self) -> str: + """Name of the class representing this variant.""" + return 'Csproj' + + @staticmethod + def to_json() -> Any: + return 'Csproj' + + def to_json_string(self, **kw: Any) -> str: + return json.dumps(self.to_json(), **kw) + + @dataclass(frozen=True) class ManifestKind: """Original type: manifest_kind = [ ... ]""" - value: Union[RequirementsIn, PackageJson, Gemfile, GoMod_, CargoToml, PomXml, BuildGradle, SettingsGradle, ComposerJson, NugetManifestJson, PubspecYaml, PackageSwift, MixExs, Pipfile, PyprojectToml, ConanFileTxt, ConanFilePy] + value: Union[RequirementsIn, PackageJson, Gemfile, GoMod_, CargoToml, PomXml, BuildGradle, SettingsGradle, ComposerJson, NugetManifestJson, PubspecYaml, PackageSwift, MixExs, Pipfile, PyprojectToml, ConanFileTxt, ConanFilePy, Csproj] @property def kind(self) -> str: @@ -3555,6 +3572,8 @@ def from_json(cls, x: Any) -> 'ManifestKind': return cls(ConanFileTxt()) if x == 'ConanFilePy': return cls(ConanFilePy()) + if x == 'Csproj': + return cls(Csproj()) _atd_bad_json('ManifestKind', x) _atd_bad_json('ManifestKind', x) diff --git a/semgrep_output_v1.ts b/semgrep_output_v1.ts index 2d2eca58..770d37e6 100644 --- a/semgrep_output_v1.ts +++ b/semgrep_output_v1.ts @@ -940,6 +940,7 @@ export type ManifestKind = | { kind: 'PyprojectToml' } | { kind: 'ConanFileTxt' } | { kind: 'ConanFilePy' } +| { kind: 'Csproj' } export type Manifest = { kind: ManifestKind; @@ -3859,6 +3860,8 @@ export function writeManifestKind(x: ManifestKind, context: any = x): any { return 'ConanFileTxt' case 'ConanFilePy': return 'ConanFilePy' + case 'Csproj': + return 'Csproj' } } @@ -3898,6 +3901,8 @@ export function readManifestKind(x: any, context: any = x): ManifestKind { return { kind: 'ConanFileTxt' } case 'ConanFilePy': return { kind: 'ConanFilePy' } + case 'Csproj': + return { kind: 'Csproj' } default: _atd_bad_json('ManifestKind', x, context) throw new Error('impossible') diff --git a/semgrep_output_v1_j.ml b/semgrep_output_v1_j.ml index b478df55..b407995f 100644 --- a/semgrep_output_v1_j.ml +++ b/semgrep_output_v1_j.ml @@ -9506,6 +9506,7 @@ let write_manifest_kind = ( | `PyprojectToml -> Buffer.add_string ob "\"PyprojectToml\"" | `ConanFileTxt -> Buffer.add_string ob "\"ConanFileTxt\"" | `ConanFilePy -> Buffer.add_string ob "\"ConanFilePy\"" + | `Csproj -> Buffer.add_string ob "\"Csproj\"" ) let string_of_manifest_kind ?(len = 1024) x = let ob = Buffer.create len in @@ -9585,6 +9586,10 @@ let read_manifest_kind = ( Yojson.Safe.read_space p lb; Yojson.Safe.read_gt p lb; `ConanFilePy + | "Csproj" -> + Yojson.Safe.read_space p lb; + Yojson.Safe.read_gt p lb; + `Csproj | x -> Atdgen_runtime.Oj_run.invalid_variant_tag p x ) @@ -9624,6 +9629,8 @@ let read_manifest_kind = ( `ConanFileTxt | "ConanFilePy" -> `ConanFilePy + | "Csproj" -> + `Csproj | x -> Atdgen_runtime.Oj_run.invalid_variant_tag p x )