summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2022-01-03 03:30:40 +0800
committerGitHub <noreply@github.com>2022-01-02 19:30:40 +0000
commit948949f42989bbbb701a51cfe9d6bd3cd6b246c8 (patch)
tree45b2e4e49afa0e06ce396cab334007d956e1cf1e /Makefile
parent766cb481f71144a150c48b04197a2396f4174baa (diff)
downloadgitea-948949f42989bbbb701a51cfe9d6bd3cd6b246c8.tar.gz
gitea-948949f42989bbbb701a51cfe9d6bd3cd6b246c8.zip
chore(lint): use golangci-lint to call revive and misspell checker. (#18145)
replace revive and misspell with golangci-lint Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 2 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 4800bb4806..00318b4afd 100644
--- a/Makefile
+++ b/Makefile
@@ -186,8 +186,6 @@ help:
@echo " - generate-swagger generate the swagger spec from code comments"
@echo " - swagger-validate check if the swagger spec is valid"
@echo " - golangci-lint run golangci-lint linter"
- @echo " - revive run revive linter"
- @echo " - misspell check for misspellings"
@echo " - vet examines Go source code and reports suspicious constructs"
@echo " - test[\#TestSpecificName] run unit test"
@echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
@@ -280,29 +278,6 @@ errcheck:
@echo "Running errcheck..."
@errcheck $(GO_PACKAGES)
-.PHONY: revive
-revive:
- @hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) install github.com/mgechev/revive@v1.1.2; \
- fi
- @revive -config .revive.toml -exclude=./vendor/... ./...
-
-.PHONY: misspell-check
-misspell-check:
- @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) install github.com/client9/misspell/cmd/misspell@v0.3.4; \
- fi
- @echo "Running misspell-check..."
- @$(GO) run build/code-batch-process.go misspell -error -i unknwon '{file-list}'
-
-.PHONY: misspell
-misspell:
- @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
- $(GO) install github.com/client9/misspell/cmd/misspell@v0.3.4; \
- fi
- @echo "Running go misspell..."
- @$(GO) run build/code-batch-process.go misspell -w -i unknwon '{file-list}'
-
.PHONY: fmt-check
fmt-check:
# get all go files and run go fmt on them
@@ -320,7 +295,7 @@ checks: checks-frontend checks-backend
checks-frontend: svg-check
.PHONY: checks-backend
-checks-backend: misspell-check test-vendor swagger-check swagger-validate
+checks-backend: test-vendor swagger-check swagger-validate
.PHONY: lint
lint: lint-frontend lint-backend
@@ -332,7 +307,7 @@ lint-frontend: node_modules
npx editorconfig-checker templates
.PHONY: lint-backend
-lint-backend: golangci-lint revive vet
+lint-backend: golangci-lint vet
.PHONY: watch
watch: