Skip to content

Commit

Permalink
chore: no need of fmt or vet, already managed by golanci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
prometherion committed May 31, 2021
1 parent 40bdf0c commit b349042
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ jobs:
run: if [[ $(git diff | wc -l) -gt 0 ]]; then echo ">>> Untracked generated files have not been committed" && git --no-pager diff && exit 1; fi
- name: Checking if manifests generated untracked files
run: test -z "$(git ls-files --others --exclude-standard 2> /dev/null)"
- run: make fmt vet
- name: Checking if source code is not formatted
run: test -z "$(git diff 2> /dev/null)"
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ BUILD_DATE ?= $$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-
all: manager

# Run tests
test: generate fmt vet manifests
test: generate manifests
go test ./... -coverprofile cover.out

# Build manager binary
manager: generate fmt vet
go build -o bin/manager main.go

# Run against the configured Kubernetes cluster in ~/.kube/config
run: generate fmt vet manifests
run: generate manifests
go run ./main.go

# Install CRDs into a cluster
Expand All @@ -70,14 +70,6 @@ remove: manifests kustomize
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases

# Run go fmt against code
fmt:
go fmt ./...

# Run go vet against code
vet:
go vet ./...

# Generate code
generate: controller-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
Expand Down

0 comments on commit b349042

Please sign in to comment.