Skip to content

Commit c6fe8e0

Browse files
committed
Minor fixups
1 parent 42db11d commit c6fe8e0

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ linters:
77
- goheader
88
- gosec
99
- misspell
10+
- govet
11+
- ineffassign
12+
- staticcheck
13+
- unused
1014
settings:
1115
goheader:
1216
template: |-

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ clean:
4242
cloudstack-ccm: ${CMD_SRC}
4343
go build -ldflags ${LDFLAGS} -o $@ $^
4444

45-
test:
45+
test: gofmt
4646
go test -v
4747
go vet
48-
@(echo "gofmt -l"; FMTFILES="$$(gofmt -l .)"; if test -n "$${FMTFILES}"; then echo "Go files that need to be reformatted (use 'go fmt'):\n$${FMTFILES}"; exit 1; fi)
4948

50-
docker:
49+
docker: gofmt
5150
docker build . -t apache/cloudstack-kubernetes-provider:${GIT_COMMIT_SHORT}
5251
docker tag apache/cloudstack-kubernetes-provider:${GIT_COMMIT_SHORT} apache/cloudstack-kubernetes-provider:latest
5352
ifneq (${GIT_IS_TAG},NOT_A_TAG)
5453
docker tag apache/cloudstack-kubernetes-provider:${GIT_COMMIT_SHORT} apache/cloudstack-kubernetes-provider:${GIT_TAG}
5554
endif
5655

57-
lint:
56+
lint: gofmt
5857
@(echo "Running golangci-lint...")
5958
golangci-lint run
59+
60+
gofmt:
6061
@(echo "Running gofmt...")
6162
@(echo "gofmt -l"; FMTFILES="$$(gofmt -l .)"; if test -n "$${FMTFILES}"; then echo "Go files that need to be reformatted (use 'go fmt'):\n$${FMTFILES}"; exit 1; fi)
62-

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ If you don't have a 'real' CloudStack installation, you can also launch a local
161161
### Debugging
162162

163163
You can use the VSCode extension [Go](https://marketplace.visualstudio.com/items?itemName=golang.go) to debug the CCM.
164-
Add the following configuration to the `.vscode/launch.json` file use it to launch the CCM.
164+
Add the following configuration to the `.vscode/launch.json` file to launch the CCM and debug it.
165165

166166
```json
167167
{
@@ -179,7 +179,7 @@ Add the following configuration to the `.vscode/launch.json` file use it to laun
179179
"--cloud-config=${workspaceFolder}/cloud-config",
180180
"--kubeconfig=${env:HOME}/.kube/config",
181181
"--leader-elect=false",
182-
"--v=5"
182+
"--v=4"
183183
],
184184
"showLog": true,
185185
"trace": "verbose"

0 commit comments

Comments
 (0)