Skip to content

Commit 2564325

Browse files
authored
feat: add powershell (#442)
- [x] I ran `make setup && make` to update the generated code after editing a `.atd` file - [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! - [x] Any accompanying changes in `semgrep-proprietary` are approved and ready to merge once this PR is merged
1 parent 7c3c2fb commit 2564325

4 files changed

Lines changed: 40 additions & 0 deletions

File tree

Language.ml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type t =
3030
| Move_on_aptos
3131
| Ocaml
3232
| Php
33+
| Powershell
3334
| Promql
3435
| Protobuf
3536
| Python2
@@ -456,6 +457,19 @@ let list = [
456457
shebangs = [{|php|}];
457458
tags = [];
458459
};
460+
{
461+
id = Powershell;
462+
id_string = "powershell";
463+
name = "Powershell";
464+
keys = [{|powershell|}];
465+
exts = [{|.ps1|}];
466+
maturity = Alpha;
467+
example_ext = None;
468+
excluded_exts = [];
469+
reverse_exts = None;
470+
shebangs = [];
471+
tags = [];
472+
};
459473
{
460474
id = Promql;
461475
id_string = "promql";

Language.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type t =
3030
| Move_on_aptos
3131
| Ocaml
3232
| Php
33+
| Powershell
3334
| Promql
3435
| Protobuf
3536
| Python2

generate.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,14 @@ def to_json(self):
467467
maturity=Maturity.GA,
468468
shebangs=["php"]
469469
),
470+
Language(
471+
comment="",
472+
id_="powershell",
473+
name="Powershell",
474+
keys=["powershell"],
475+
exts=[".ps1"],
476+
maturity=Maturity.ALPHA,
477+
),
470478
Language(
471479
comment="",
472480
id_="promql",

lang.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,23 @@
549549
"is_target_language": true,
550550
"tags": []
551551
},
552+
{
553+
"id": "powershell",
554+
"name": "Powershell",
555+
"keys": [
556+
"powershell"
557+
],
558+
"maturity": "alpha",
559+
"exts": [
560+
".ps1"
561+
],
562+
"example_ext": null,
563+
"excluded_exts": [],
564+
"reverse_exts": null,
565+
"shebangs": [],
566+
"is_target_language": true,
567+
"tags": []
568+
},
552569
{
553570
"id": "promql",
554571
"name": "Prometheus Query Language",

0 commit comments

Comments
 (0)