1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

feat: add check misspelling (#1877)

This commit is contained in:
Bo-Yi Wu
2017-06-05 02:49:46 -05:00
committed by GitHub
parent ed31dff5ab
commit 703d18e50d
29 changed files with 43 additions and 27 deletions

View File

@@ -12,6 +12,7 @@ LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/'
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell go list ./... | grep -v /vendor/))
SOURCES ?= $(shell find . -name "*.go" -type f)
GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*")
TAGS ?=
@@ -73,6 +74,20 @@ lint:
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
.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 -i unknwon $(GOFILES)
.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 -i unknwon $(GOFILES)
.PHONY: test
test:
go test $(PACKAGES)