Merge pull request #2159 from aluzzardi/ci-fix-cue-lint

ci: fix CUE linter
This commit is contained in:
Marcos Nils 2022-04-12 21:02:28 -03:00 committed by GitHub
commit 464c7ad708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 19 deletions

View File

@ -39,7 +39,7 @@ import (
// CACHE: copy only *.cue files // CACHE: copy only *.cue files
docker.#Copy & { docker.#Copy & {
contents: source contents: source
include: ["*.cue", "**/*.cue"] include: [".git", "*.cue", "**/*.cue"]
dest: "/cue" dest: "/cue"
}, },
@ -47,6 +47,8 @@ import (
bash.#Run & { bash.#Run & {
workdir: "/cue" workdir: "/cue"
script: contents: #""" script: contents: #"""
git status
find . -name '*.cue' -not -path '*/cue.mod/*' -print | time xargs -t -n 1 -P 8 cue fmt -s find . -name '*.cue' -not -path '*/cue.mod/*' -print | time xargs -t -n 1 -P 8 cue fmt -s
test -z "$(git status -s . | grep -e "^ M" | grep "\.cue" | cut -d ' ' -f3 | tee /dev/stderr)" test -z "$(git status -s . | grep -e "^ M" | grep "\.cue" | cut -d ' ' -f3 | tee /dev/stderr)"
"""# """#

View File

@ -8,12 +8,7 @@ import (
dagger.#Plan & { dagger.#Plan & {
client: filesystem: "./data/hello": read: contents: dagger.#FS client: filesystem: "./data/hello": read: contents: dagger.#FS
actions: test: { actions: test: simple: fmtCheck: lua.#StyluaCheck & {
simple: {
fmtCheck: lua.#StyluaCheck & {
source: client.filesystem."./data/hello".read.contents source: client.filesystem."./data/hello".read.contents
} }
}
}
} }