From af32e60b37e08877a22d89cc5d4ab3a1b6e55d44 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 26 May 2021 18:45:11 -0700 Subject: [PATCH] fix cue fmt Signed-off-by: Andrea Luzzardi --- .dagger/env/dev/plan/main.cue | 6 ++--- Makefile | 4 +--- cmd/spec.cue | 22 +++++++++---------- .../cue.mod/pkg/dagger.io/def/main.cue | 4 ++-- .../pkg/dagger.io/nonoptional/main.cue | 6 ++--- .../cue.mod/pkg/dagger.io/optional/main.cue | 4 ++-- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/.dagger/env/dev/plan/main.cue b/.dagger/env/dev/plan/main.cue index 731662df..50cbd540 100644 --- a/.dagger/env/dev/plan/main.cue +++ b/.dagger/env/dev/plan/main.cue @@ -10,7 +10,6 @@ import ( // Dagger source code source: dagger.#Artifact @dagger(input) - test: { // Go unit tests unit: { @@ -52,12 +51,11 @@ build: { }).read.data } - // Execute `dagger help` usage: os.#Container & { command: "dagger help" - let binpath="/usr/local/dagger/bin" - mount: "\(binpath)": from: build.binaries + let binpath = "/usr/local/dagger/bin" + mount: "\(binpath)": from: build.binaries shell: search: "\(binpath)": true } diff --git a/Makefile b/Makefile index 84457c4c..55a4a84d 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,7 @@ golint: .PHONY: cuefmt cuefmt: - @(cue fmt -s ./stdlib/...) - @(cue fmt -s ./examples/*/) - @(cue fmt -s ./tests/...) + @(find . -name '*.cue' -exec cue fmt -s {} \;) .PHONY: cuelint cuelint: cuefmt diff --git a/cmd/spec.cue b/cmd/spec.cue index 69ff78a0..0aabc2f6 100644 --- a/cmd/spec.cue +++ b/cmd/spec.cue @@ -41,19 +41,19 @@ import ( flag: { "--environment": { - alt: "-d" + alt: "-d" description: """ - Select an environment + Select an environment - If no environment is specified, dagger searches for environments using the current - directory as input. + If no environment is specified, dagger searches for environments using the current + directory as input. - * If exactly one environment matches the search, it is selected. - * If there is more than one match, the user is prompted to select one. - * If there is no match, the command returns an error. - """ - arg: "NAME" + * If exactly one environment matches the search, it is selected. + * If there is more than one match, the user is prompted to select one. + * If there is no match, the command returns an error. + """ + arg: "NAME" } "--log-format": { arg: "string" @@ -164,9 +164,7 @@ import ( history: description: "List past changes to an environment" - delete: { - description: "Delete an environment after taking it offline (WARNING: may destroy infrastructure)" - } + delete: description: "Delete an environment after taking it offline (WARNING: may destroy infrastructure)" plan: { description: "Manage an environment plan" diff --git a/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/dagger.io/def/main.cue b/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/dagger.io/def/main.cue index 2f3a74a8..c7139a34 100644 --- a/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/dagger.io/def/main.cue +++ b/tests/ops/exec/undefined/with_pkg_def/cue.mod/pkg/dagger.io/def/main.cue @@ -11,7 +11,7 @@ package def do: "exec" dir: "/" args: ["sh", "-c", """ - echo success - """] + echo success + """] }, ] diff --git a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/dagger.io/nonoptional/main.cue b/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/dagger.io/nonoptional/main.cue index 13c1711b..494701ae 100644 --- a/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/dagger.io/nonoptional/main.cue +++ b/tests/ops/exec/undefined/with_pkg_mandatory/cue.mod/pkg/dagger.io/nonoptional/main.cue @@ -11,8 +11,8 @@ dang: string do: "exec" dir: "/" args: ["sh", "-c", """ - echo "This test SHOULD fail, because this SHOULD be executed" - exit 1 - """] + echo "This test SHOULD fail, because this SHOULD be executed" + exit 1 + """] }, ] diff --git a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/dagger.io/optional/main.cue b/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/dagger.io/optional/main.cue index c171f2e6..be6b1a70 100644 --- a/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/dagger.io/optional/main.cue +++ b/tests/ops/exec/undefined/with_pkg_optional/cue.mod/pkg/dagger.io/optional/main.cue @@ -11,7 +11,7 @@ dang?: string do: "exec" dir: "/" args: ["sh", "-c", """ - echo success - """] + echo success + """] }, ]