diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-08-31 10:08:38 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-08-31 10:10:55 +0300 |
commit | dca2432cb194e0cd92477bc58ea7c0b4cda3fc4a (patch) | |
tree | dddd01aabaaf716561ce6673d6b9e07fa975fb5c /Makefile | |
parent | 27c3563ac0210ed3a1b610b68ef45f2335ad02be (diff) |
Makefile: Replace formatting checks with linting
Add the gofumpt linting rule to golangci. This allows us to replace our
"check-formatting" Makefile target with a run of golangci-lint.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -311,7 +311,7 @@ rspec: build prepare-tests .PHONY: verify ## Verify that various files conform to our expectations. -verify: check-mod-tidy check-formatting notice-up-to-date check-proto rubocop +verify: check-mod-tidy notice-up-to-date check-proto rubocop lint .PHONY: check-mod-tidy check-mod-tidy: @@ -328,11 +328,6 @@ lint: ${GOLANGCI_LINT} libgit2 lint-strict: lint ${Q}GOLANGCI_LINT_CONFIG=$(SOURCE_DIR)/.golangci-strict.yml $(MAKE) lint -.PHONY: check-formatting -check-formatting: ${GOIMPORTS} ${GOFUMPT} - ${Q}${GOIMPORTS} -l $(call find_go_sources) | awk '{ print } END { if(NR>0) { print "goimports error, run make format"; exit(1) } }' - ${Q}${GOFUMPT} -l $(call find_go_sources) | awk '{ print } END { if(NR>0) { print "Formatting error, run make format"; exit(1) } }' - .PHONY: format ## Run Go formatter and adjust imports. format: ${GOIMPORTS} ${GOFUMPT} |