This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/pkg/universe.dagger.io/x/teddylear@protonmail.com/lua/fmtCheck.cue
Andrea Luzzardi 2bb6445e56 ci: fix CUE linter
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2022-04-12 16:32:43 -07:00

44 lines
608 B
CUE

package lua
import (
"dagger.io/dagger"
"universe.dagger.io/docker"
)
// Checks lua format via Stylua
#StyluaCheck: {
// Files to Copy
source: dagger.#FS
// Any extra formatting args
extraArgs: [...string]
_run: docker.#Build & {
steps: [
docker.#Pull & {
source: "rust:latest"
},
docker.#Run & {
command: {
name: "cargo"
args: ["install", "stylua"]
}
},
docker.#Copy & {
dest: "/tmp"
contents: source
},
docker.#Run & {
command: {
name: "stylua"
args: ["--check", "."] + extraArgs
}
workdir: "/tmp"
},
]
}
}