Merge pull request #59 from blocklayerhq/cue-lint-all

lint all cue files
This commit is contained in:
Andrea Luzzardi 2021-01-20 21:46:31 -08:00 committed by GitHub
commit 05b45aa636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 574 additions and 660 deletions

View File

@ -19,7 +19,7 @@ test:
.PHONY: cuefmt
cuefmt:
@(cd ./dagger && cue fmt -s ./... && cue trim -s ./...)
@(cue fmt -s ./... && cue trim -s ./...)
.PHONY: lint
lint: generate cuefmt

View File

@ -1,5 +1,3 @@
package testing
#dagger: {
compute: true
}
#dagger: compute: true

View File

@ -1,5 +1,3 @@
package testing
#dagger: {
compute: 123
}
#dagger: compute: 123

View File

@ -1,5 +1,3 @@
package testing
#dagger: {
compute: "whatever"
}
#dagger: compute: "whatever"

View File

@ -1,7 +1,3 @@
package testing
#dagger: {
compute: {
whatever: "wrong"
}
}
#dagger: compute: whatever: "wrong"

View File

@ -1,7 +1,6 @@
package testing
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -10,6 +9,5 @@ package testing
do: "exec"
args: ["true"]
dir: "/"
}
]
}
},
]

View File

@ -14,7 +14,7 @@ bar: string
do: "exec"
dir: "/"
args: ["sh", "-c", "echo \(foo.bar)"]
}
},
]
foo: bar: bar
}

View File

@ -3,8 +3,7 @@ package testing
test1: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -21,14 +20,12 @@ test1: {
format: "string"
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -45,5 +42,4 @@ test2: {
format: "string"
},
]
}
}

View File

@ -14,8 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -32,14 +31,12 @@ test1: {
format: "string"
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -65,5 +62,4 @@ test2: {
format: "string"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -21,5 +20,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -10,7 +10,7 @@ package testing
args: ["sh", "-c", #"""
echo "$foo"
"""#]
env: foo: {lala: "lala"}
env: foo: lala: "lala"
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
},

View File

@ -10,4 +10,4 @@ package testing
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
},
}
]

View File

@ -3,8 +3,7 @@ package testing
test: {
bool
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -13,7 +12,7 @@ test: {
do: "exec"
args: ["sh", "-c", """
printf "true" > /tmp/out
"""
""",
]
dir: "/"
},
@ -24,6 +23,4 @@ test: {
format: "bool"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
teststring: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -13,7 +12,7 @@ teststring: {
do: "exec"
args: ["sh", "-c", """
echo something > /tmp/out
"""
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
@ -25,5 +24,4 @@ teststring: {
format: "lalalalal"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
teststring: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -16,5 +15,4 @@ teststring: {
format: "string"
},
]
}
}

View File

@ -2,10 +2,9 @@ package testing
test: {
string
=~ "^NAAAA.+"
=~"^NAAAA.+"
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -14,7 +13,7 @@ test: {
do: "exec"
args: ["sh", "-c", """
printf something > /tmp/out
"""
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
@ -26,5 +25,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -1,9 +1,6 @@
package testing
test: {
#dagger: {
compute: [
test: #dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -12,7 +9,7 @@ test: {
do: "exec"
args: ["sh", "-c", """
echo '{"something": "something"}' > /tmp/out
"""
""",
]
dir: "/"
},
@ -22,6 +19,4 @@ test: {
source: "/tmp/out"
format: "json"
},
]
}
}
]

View File

@ -3,8 +3,7 @@ package testing
test: {
number
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -13,7 +12,7 @@ test: {
do: "exec"
args: ["sh", "-c", """
echo -123.5 > /tmp/out
"""
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
@ -25,5 +24,4 @@ test: {
format: "number"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -13,7 +12,7 @@ test: {
do: "exec"
args: ["sh", "-c", """
printf something > /tmp/out
"""
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
@ -25,5 +24,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -2,10 +2,9 @@ package testing
test: {
string
=~ "^some.+"
=~"^some.+"
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -14,7 +13,7 @@ test: {
do: "exec"
args: ["sh", "-c", """
printf something > /tmp/out
"""
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
@ -26,5 +25,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -1,9 +1,6 @@
package testing
test: {
#dagger: {
compute: [
test: #dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
@ -13,7 +10,7 @@ test: {
args: ["sh", "-c", """
echo "--- # Shopping list
[milk, pumpkin pie, eggs, juice]" > /tmp/out
"""
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
@ -24,6 +21,4 @@ test: {
source: "/tmp/out"
format: "yaml"
},
]
}
}
]

View File

@ -1,46 +1,36 @@
package testing
busybox1: {
#dagger: compute: [
busybox1: #dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
},
]
}
]
busybox2: {
#dagger: compute: [
busybox2: #dagger: compute: [
{
do: "fetch-container"
ref: "busybox:latest"
},
]
}
]
busybox3: {
#dagger: compute: [
busybox3: #dagger: compute: [
{
do: "fetch-container"
ref: "busybox:1.33-musl"
},
]
}
]
busybox4: {
#dagger: compute: [
busybox4: #dagger: compute: [
{
do: "fetch-container"
ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
},
]
}
]
busybox5: {
#dagger: compute: [
busybox5: #dagger: compute: [
{
do: "fetch-container"
ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
},
]
}
]

View File

@ -4,5 +4,5 @@ package testing
{
do: "fetch-container"
ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5"
}
},
]

View File

@ -4,5 +4,5 @@ package testing
{
do: "fetch-container"
ref: "doesnotexist"
}
},
]

View File

@ -4,5 +4,5 @@ package testing
{
do: "fetch-container"
ref: "alpine:doesnotexist"
}
},
]

View File

@ -1,11 +1,9 @@
package testing
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "master"
}
]
}
},
]

View File

@ -1,9 +1,7 @@
package testing
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-git"
}
]
}
},
]

View File

@ -1,11 +1,9 @@
package testing
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-git"
remote: "pork://pork"
ref: "master"
}
]
}
},
]

View File

@ -1,11 +1,9 @@
package testing
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "lalalalal"
}
]
}
},
]

View File

@ -1,11 +1,9 @@
package testing
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/lalalala.git"
ref: "master"
}
]
}
},
]

View File

@ -3,8 +3,7 @@ package testing
test1: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -15,14 +14,12 @@ test1: {
format: "string"
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "busybox"}]
@ -33,5 +30,4 @@ test2: {
format: "string"
},
]
}
}

View File

@ -14,8 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: component
@ -26,14 +25,12 @@ test1: {
format: "string"
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: #dagger: compute: [{
@ -53,5 +50,4 @@ test2: {
format: "string"
},
]
}
}

View File

@ -1,11 +1,9 @@
package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -16,5 +14,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -23,5 +22,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -29,5 +28,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -29,5 +28,4 @@ test: {
format: "string"
},
]
}
}

View File

@ -3,8 +3,7 @@ package testing
test: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -23,5 +22,4 @@ test: {
format: "string"
},
]
}
}