diff options
author | silverwind <me@silverwind.io> | 2020-08-16 23:43:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-16 17:43:09 -0400 |
commit | d285b5d35a44bf9fde0682532aeef9550f78cf83 (patch) | |
tree | a9cab79365287a7a11a5ab3c5d4684f90fe75e9c /Makefile | |
parent | d1e67d7adefeff79c9aa5128c09eb53bd6e473a9 (diff) | |
download | gitea-d285b5d35a44bf9fde0682532aeef9550f78cf83.tar.gz gitea-d285b5d35a44bf9fde0682532aeef9550f78cf83.zip |
Add 'checks' Make and CI tasks (#12352)
* Add 'checks' Make and CI tasks
Introduce new "checks" targets that perform tasks that we've been piling
onto the linting tasks. This will make the linter tasks faster and
hopefully encourage some users to use them locally.
* add checks to --help
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -154,13 +154,16 @@ help: @echo " - build build everything" @echo " - frontend build frontend files" @echo " - backend build backend files" + @echo " - watch-frontend watch frontend files and continuously rebuild" + @echo " - watch-backend watch backend files and continuously rebuild" @echo " - clean delete backend and integration files" @echo " - clean-all delete backend, frontend and integration files" @echo " - lint lint everything" @echo " - lint-frontend lint frontend files" @echo " - lint-backend lint backend files" - @echo " - watch-frontend watch frontend files and continuously rebuild" - @echo " - watch-backend watch backend files and continuously rebuild" + @echo " - check run various consistency checks" + @echo " - check-frontend check frontend files" + @echo " - check-backend check backend files" @echo " - webpack build webpack files" @echo " - svg build svg files" @echo " - fomantic build fomantic files" @@ -290,17 +293,26 @@ fmt-check: exit 1; \ fi; -.PHONY: lint -lint: lint-backend lint-frontend +.PHONY: checks +checks: checks-frontend checks-backend -.PHONY: lint-backend -lint-backend: golangci-lint revive vet swagger-check swagger-validate test-vendor +.PHONY: checks-frontend +checks-frontend: svg-check + +.PHONY: checks-backend +checks-backend: misspell-check test-vendor swagger-check swagger-validate + +.PHONY: lint +lint: lint-frontend lint-backend .PHONY: lint-frontend -lint-frontend: node_modules svg-check +lint-frontend: node_modules npx eslint web_src/js build webpack.config.js npx stylelint web_src/less +.PHONY: lint-backend +lint-backend: golangci-lint revive vet + .PHONY: watch-frontend watch-frontend: node-check $(FOMANTIC_DEST) node_modules rm -rf $(WEBPACK_DEST_ENTRIES) |