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 .PHONY: cuefmt
cuefmt: cuefmt:
@(cd ./dagger && cue fmt -s ./... && cue trim -s ./...) @(cue fmt -s ./... && cue trim -s ./...)
.PHONY: lint .PHONY: lint
lint: generate cuefmt lint: generate cuefmt

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,8 +3,7 @@ package testing
test1: { test1: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
@ -22,13 +21,11 @@ test1: {
}, },
] ]
} }
}
test2: { test2: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
@ -46,4 +43,3 @@ test2: {
}, },
] ]
} }
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,8 +3,7 @@ package testing
test1: { test1: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]
@ -16,13 +15,11 @@ test1: {
}, },
] ]
} }
}
test2: { test2: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "busybox"}] from: [{do: "fetch-container", ref: "busybox"}]
@ -34,4 +31,3 @@ test2: {
}, },
] ]
} }
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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