From 24990062ad18b1f89aa0bd7367b90852d756c59e Mon Sep 17 00:00:00 2001 From: joeduffy Date: Wed, 12 Apr 2017 11:01:16 -0700 Subject: [PATCH] Run golint during make This change runs golint during make by default, but suppresses the class of errors we are currently permitting into the code (just those about public documentation on APIs). --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2707edf06..e17a7cb0a 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ -.PHONY: build install lint nolint test vet +.PHONY: build install lint lint_quiet test vet PROJECT=github.com/pulumi/coconut PROJECT_PKGS=$(shell go list ./... | grep -v /vendor/) -default: test nolint vet install +default: test lint_quiet vet install build: @echo "\033[0;32mBUILD:\033[0m" @@ -18,9 +18,11 @@ lint: @golint cmd/... @golint pkg/... -nolint: - @echo "\033[0;32mLINT:\033[0m" - @echo "\033[0;33mgolint not run on build automatically; to run, make lint\033[0m" +lint_quiet: + @echo "\033[0;32mLINT (quiet):\033[0m" + @$(shell golint cmd/... | grep -v "or be unexported") + @$(shell golint pkg/... | grep -v "or be unexported") + @echo "\033[0;33mgolint was run quietly; to run with noisy errors, run 'make lint'\033[0m" test: @echo "\033[0;32mTEST:\033[0m"