aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-06-05 02:49:46 -0500
committerGitHub <noreply@github.com>2017-06-05 02:49:46 -0500
commit703d18e50d69974779c5fab0d1bb6c082a3923fd (patch)
tree7837f4e248e7bfc4f91993dad64ab71efe01e26a /Makefile
parented31dff5ab9e3bc618c647acca2d3f34e720a2d7 (diff)
downloadgitea-703d18e50d69974779c5fab0d1bb6c082a3923fd.tar.gz
gitea-703d18e50d69974779c5fab0d1bb6c082a3923fd.zip
feat: add check misspelling (#1877)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6b0c0327a4..2566677d68 100644
--- a/Makefile
+++ b/Makefile
@@ -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)