Skip to content

Commit aa7de27

Browse files
Order tasks alphabetically
1 parent 36a4171 commit aa7de27

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

Taskfile.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ includes:
44
dist: ./DistTasks.yml
55

66
tasks:
7+
build:
8+
desc: Build the project
9+
deps:
10+
- task: go:build
11+
12+
check:
13+
desc: Check fmt and lint
14+
cmds:
15+
- test -z $(go fmt ./...)
16+
- go vet ./...
17+
- task: go:lint
18+
- task: config:check
19+
- task: general:check-formatting
20+
721
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml
822
general:cache-dep-licenses:
923
desc: Cache dependency license metadata
@@ -29,6 +43,25 @@ tasks:
2943
cmds:
3044
- licensed status
3145

46+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml
47+
general:check-formatting:
48+
desc: Check basic formatting style of all files
49+
cmds:
50+
- |
51+
if ! which ec &>/dev/null; then
52+
echo "ec not found or not in PATH."
53+
echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
54+
exit 1
55+
fi
56+
- ec
57+
58+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml
59+
go:build:
60+
desc: Build the Go code
61+
dir: "{{.DEFAULT_GO_MODULE_PATH}}"
62+
cmds:
63+
- go build -v {{.LDFLAGS}}
64+
3265
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
3366
go:fix:
3467
desc: Modernize usages of outdated APIs
@@ -58,31 +91,6 @@ tasks:
5891
{{default "-min_confidence 0.8 -set_exit_status" .GO_LINT_FLAGS}} \
5992
{{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
6093
61-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml
62-
go:build:
63-
desc: Build the Go code
64-
dir: "{{.DEFAULT_GO_MODULE_PATH}}"
65-
cmds:
66-
- go build -v {{.LDFLAGS}}
67-
68-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
69-
go:vet:
70-
desc: Check for errors in Go code
71-
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
72-
cmds:
73-
- go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
74-
75-
build:
76-
desc: Build the project
77-
deps:
78-
- task: go:build
79-
80-
test:
81-
desc: Run tests
82-
cmds:
83-
- task: test-unit
84-
- task: go:test-integration
85-
8694
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
8795
go:test:
8896
desc: Run unit tests
@@ -99,26 +107,18 @@ tasks:
99107
{{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}} \
100108
{{.TEST_LDFLAGS}}
101109
102-
check:
103-
desc: Check fmt and lint
110+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
111+
go:vet:
112+
desc: Check for errors in Go code
113+
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
104114
cmds:
105-
- test -z $(go fmt ./...)
106-
- go vet ./...
107-
- task: go:lint
108-
- task: config:check
109-
- task: general:check-formatting
115+
- go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
110116

111-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml
112-
general:check-formatting:
113-
desc: Check basic formatting style of all files
117+
test:
118+
desc: Run tests
114119
cmds:
115-
- |
116-
if ! which ec &>/dev/null; then
117-
echo "ec not found or not in PATH."
118-
echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
119-
exit 1
120-
fi
121-
- ec
120+
- task: test-unit
121+
- task: go:test-integration
122122

123123
vars:
124124
PROJECT_NAME: "uno-r4-wifi-fwuploader-plugin"

0 commit comments

Comments
 (0)