Skip to content

Commit

Permalink
chore: clean up configuration and Makefile targets
Browse files Browse the repository at this point in the history
- Remove `.editorconfig` file
- Remove `.revive.toml` file
- Change `gofumpt` flag from `-l -s` to `-l -w` in `Makefile`
- Remove `install-embedmd`, `embedmd-check`, and `embedmd` targets from `Makefile`
- Remove `lint`, `misspell-check`, and `misspell` targets from `Makefile`

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Oct 31, 2024
1 parent e779000 commit c650d57
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 101 deletions.
42 changes: 0 additions & 42 deletions .editorconfig

This file was deleted.

25 changes: 0 additions & 25 deletions .revive.toml

This file was deleted.

35 changes: 1 addition & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
.PHONY: test

GO ?= go
GOFMT ?= gofumpt -l -s
GOFMT ?= gofumpt -l -w
PACKAGES ?= $(shell $(GO) list ./...)
GOFILES := $(shell find . -name "*.go" -type f)

install-embedmd:
@hash embedmd > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/campoy/embedmd; \
fi

embedmd-check: install-embedmd
embedmd -d *.md

embedmd: install-embedmd
embedmd -w *.md

.PHONY: fmt
fmt:
$(GOFMT) -w $(GOFILES)
Expand All @@ -35,26 +22,6 @@ test: fmt-check
vet:
$(GO) vet ./...

lint:
@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/mgechev/revive; \
fi
revive -config .revive.toml ./... || exit 1

.PHONY: misspell-check
misspell-check:
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -error ./...

.PHONY: misspell
misspell:
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/client9/misspell/cmd/misspell; \
fi
misspell -w $(GOFILES)

clean:
$(GO) clean -modcache -cache -i
find . -name "coverage.txt" -delete

0 comments on commit c650d57

Please sign in to comment.