lint all cue files

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-01-20 18:26:10 -08:00
parent 843f24d763
commit 6ab7f88007
46 changed files with 574 additions and 660 deletions

View File

@ -15,7 +15,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"
@ -22,13 +21,11 @@ test1: {
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -46,4 +43,3 @@ test2: {
},
]
}
}

View File

@ -14,8 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -33,13 +32,11 @@ test1: {
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "fetch-container"
ref: "busybox"
@ -66,4 +63,3 @@ test2: {
},
]
}
}

View File

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

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: "/"
},
@ -25,5 +24,3 @@ test: {
},
]
}
}

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: "/"
@ -26,4 +25,3 @@ teststring: {
},
]
}
}

View File

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

View File

@ -4,8 +4,7 @@ test: {
string
=~"^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: "/"
@ -27,4 +26,3 @@ test: {
},
]
}
}

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: "/"
},
@ -23,5 +20,3 @@ test: {
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: "/"
@ -26,4 +25,3 @@ test: {
},
]
}
}

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: "/"
@ -26,4 +25,3 @@ test: {
},
]
}
}

View File

@ -4,8 +4,7 @@ test: {
string
=~"^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: "/"
@ -27,4 +26,3 @@ test: {
},
]
}
}

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: "/"
@ -25,5 +22,3 @@ test: {
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"}]
@ -16,13 +15,11 @@ test1: {
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "busybox"}]
@ -34,4 +31,3 @@ test2: {
},
]
}
}

View File

@ -14,8 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: component
@ -27,13 +26,11 @@ test1: {
},
]
}
}
test2: {
string
#dagger: {
compute: [
#dagger: compute: [
{
do: "load"
from: #dagger: compute: [{
@ -54,4 +51,3 @@ test2: {
},
]
}
}

View File

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

View File

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

View File

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

View File

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

View File

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