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 .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"
@ -21,14 +20,12 @@ test1: {
format: "string" format: "string"
}, },
] ]
}
} }
test2: { test2: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
@ -45,5 +42,4 @@ test2: {
format: "string" format: "string"
}, },
] ]
}
} }

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"
@ -32,14 +31,12 @@ test1: {
format: "string" format: "string"
}, },
] ]
}
} }
test2: { test2: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
@ -65,5 +62,4 @@ test2: {
format: "string" format: "string"
}, },
] ]
}
} }

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"
@ -21,5 +20,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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: "/"
}, },
@ -24,6 +23,4 @@ test: {
format: "bool" format: "bool"
}, },
] ]
}
} }

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: "/"
@ -25,5 +24,4 @@ teststring: {
format: "lalalalal" format: "lalalalal"
}, },
] ]
}
} }

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"
@ -16,5 +15,4 @@ teststring: {
format: "string" format: "string"
}, },
] ]
}
} }

View File

@ -2,10 +2,9 @@ package testing
test: { 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: "/"
@ -26,5 +25,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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: "/"
}, },
@ -22,6 +19,4 @@ test: {
source: "/tmp/out" source: "/tmp/out"
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: "/"
@ -25,5 +24,4 @@ test: {
format: "number" format: "number"
}, },
] ]
}
} }

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

View File

@ -2,10 +2,9 @@ package testing
test: { 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: "/"
@ -26,5 +25,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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: "/"
@ -24,6 +21,4 @@ test: {
source: "/tmp/out" source: "/tmp/out"
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"}]
@ -15,14 +14,12 @@ test1: {
format: "string" format: "string"
}, },
] ]
}
} }
test2: { test2: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "busybox"}] from: [{do: "fetch-container", ref: "busybox"}]
@ -33,5 +30,4 @@ test2: {
format: "string" format: "string"
}, },
] ]
}
} }

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
@ -26,14 +25,12 @@ test1: {
format: "string" format: "string"
}, },
] ]
}
} }
test2: { test2: {
string string
#dagger: { #dagger: compute: [
compute: [
{ {
do: "load" do: "load"
from: #dagger: compute: [{ from: #dagger: compute: [{
@ -53,5 +50,4 @@ test2: {
format: "string" format: "string"
}, },
] ]
}
} }

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"}]
@ -16,5 +14,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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"}]
@ -23,5 +22,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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"}]
@ -29,5 +28,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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"}]
@ -29,5 +28,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }

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"}]
@ -23,5 +22,4 @@ test: {
format: "string" format: "string"
}, },
] ]
}
} }