Skip to content

Commit

Permalink
Merge pull request warewulf#1201 from anderbubble/purge
Browse files Browse the repository at this point in the history
Spring cleaning - removing dead code and other source tree care
  • Loading branch information
mslacken authored Oct 19, 2024
2 parents 1780736 + df92a27 commit 1ca2dd1
Show file tree
Hide file tree
Showing 20 changed files with 397 additions and 1,043 deletions.
492 changes: 387 additions & 105 deletions LICENSE_DEPENDENCIES.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ etc/bash_completion.d/wwctl: wwctl
lint: $(config)
$(GOLANGCI_LINT) run --build-tags "$(WW_GO_BUILD_TAGS)" --timeout=5m ./...

.PHONY: deadcode
deadcode: $(config)
$(GOLANG_DEADCODE) -test ./...

.PHONY: vet
vet: $(config)
go vet ./...
Expand Down Expand Up @@ -221,6 +225,7 @@ wwapird: vendor
dist: vendor

lint: $(GOLANGCI_LINT)
deadcode: $(GOLANG_DEADCODE)

protofiles = internal/pkg/api/routes/wwapiv1/routes.pb.go \
internal/pkg/api/routes/wwapiv1/routes.pb.gw.go \
Expand Down
5 changes: 5 additions & 0 deletions Tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ GO_TOOLS_VENDOR := $(addprefix vendor/, $(GO_TOOLS))
GOLANGCI_LINT := $(TOOLS_BIN)/golangci-lint
GOLANGCI_LINT_VERSION := v1.56.2

GOLANG_DEADCODE := $(TOOLS_BIN)/deadcode

PROTOC := $(TOOLS_BIN)/protoc
PROTOC_GEN_GO := $(TOOLS_BIN)/protoc-gen-go
PROTOC_GEN_GO_GRPC := $(TOOLS_BIN)/protoc-gen-go-grpc
Expand All @@ -32,6 +34,9 @@ $(GO_TOOLS_BIN):
$(GOLANGCI_LINT):
curl -qq -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TOOLS_BIN) $(GOLANGCI_LINT_VERSION)

$(GOLANG_DEADCODE):
GOBIN="$(PWD)/$(TOOLS_BIN)" go install golang.org/x/tools/cmd/[email protected]

$(PROTOC): $(TOOLS_DIR)
cd $(TOOLS_DIR) && curl -LO $(PROTOC_URL) && unzip -o $(notdir $(PROTOC_URL))
touch --no-create $(PROTOC) # by default the timestamp is preserved from the archive
Expand Down
File renamed without changes.
Loading

0 comments on commit 1ca2dd1

Please sign in to comment.