Skip to content

Commit

Permalink
add the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso committed Feb 13, 2024
1 parent 49148f9 commit fba6256
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/check-manifest-generation-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Make manifests && generate
run: |
make manifests && make generate
- name: Setup Go
uses: actions/setup-go@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
crd-to-yaml
dist/
.idea
bin
cty
wasm/wasm
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,26 @@ bootstrap: ## Installs necessary third party components

##@ Testing

test: lint ## Lints Krok then runs all tests
test: lint ## Lints the project then runs all tests
go test -count=1 ./...

clean: ## Runs go clean
go clean -i

lint: ## Runs golangci-lint on crd
golangci-lint run ./...
## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)

GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.55.2

golangci-lint: $(GOLANGCI_LINT)
$(GOLANGCI_LINT): $(LOCALBIN)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)

lint: golangci-lint ## Run golangci-lint.
$(GOLANGCI_LINT) run

##@ Utilities

Expand Down
Binary file added bin/golangci-lint
Binary file not shown.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/maxence-charriere/go-app/v9 v9.8.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
gopkg.in/yaml.v2 v2.4.0
k8s.io/apiextensions-apiserver v0.29.1
k8s.io/apimachinery v0.29.1
)
Expand All @@ -26,6 +25,7 @@ require (
golang.org/x/net v0.21.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
Expand Down

0 comments on commit fba6256

Please sign in to comment.