mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 18:39:58 +00:00
TUN-8866: Add linter to cloudflared repository
## Summary To improve our code, this commit adds a linter that will start checking for issues from this commit onwards, also forcing issues to be fixed on the file changed and not only on the changes themselves. This should help improve our code quality overtime. Closes TUN-8866
This commit is contained in:
11
Makefile
11
Makefile
@@ -255,4 +255,13 @@ vet:
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
goimports -l -w -local github.com/cloudflare/cloudflared $$(go list -mod=vendor -f '{{.Dir}}' -a ./... | fgrep -v tunnelrpc/proto)
|
||||
@goimports -l -w -local github.com/cloudflare/cloudflared $$(go list -mod=vendor -f '{{.Dir}}' -a ./... | fgrep -v tunnelrpc/proto)
|
||||
@go fmt $$(go list -mod=vendor -f '{{.Dir}}' -a ./... | fgrep -v tunnelrpc/proto)
|
||||
|
||||
.PHONY: fmt-check
|
||||
fmt-check:
|
||||
@./fmt-check.sh
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
@golangci-lint run
|
||||
|
Reference in New Issue
Block a user