Skip to content

Commit 5f19a36

Browse files
qvalentinguilhas07
andauthored
test: validate go templates with go (#30)
* test: parse testcases with gotemplate this ensures all testcases obey the gotemplate grammar and we are compatible with the official implementation * chore: remove seperator from testnames * test: add go test to package.json * chore: setup go in ci * fix: block argument is not optional * chore: generate grammar * test: refactor loop * test: split string constant test * chore: replace for with range loop * fix: merge fix * typo Co-authored-by: Guilherme Soares <[email protected]> * chore: cleanup --------- Co-authored-by: Guilherme Soares <[email protected]>
1 parent 845c471 commit 5f19a36

File tree

13 files changed

+6468
-7236
lines changed

13 files changed

+6468
-7236
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
- uses: actions/setup-python@v4
1717
with:
1818
python-version: '3.11'
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: '1.23'
1922
- uses: actions/setup-node@v3
2023
with:
2124
node-version: '18'

dialects/helm/src/grammar.json

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -566,20 +566,12 @@
566566
}
567567
},
568568
{
569-
"type": "CHOICE",
570-
"members": [
571-
{
572-
"type": "FIELD",
573-
"name": "argument",
574-
"content": {
575-
"type": "SYMBOL",
576-
"name": "_pipeline"
577-
}
578-
},
579-
{
580-
"type": "BLANK"
581-
}
582-
]
569+
"type": "FIELD",
570+
"name": "argument",
571+
"content": {
572+
"type": "SYMBOL",
573+
"name": "_pipeline"
574+
}
583575
},
584576
{
585577
"type": "SYMBOL",

dialects/helm/src/node-types.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
"fields": {
191191
"argument": {
192192
"multiple": false,
193-
"required": false,
193+
"required": true,
194194
"types": [
195195
{
196196
"type": "assignment",

0 commit comments

Comments
 (0)