From 33a7c9495025d3d7d6e5738df9f848a6cd973714 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sun, 7 Jan 2024 18:36:19 -0800 Subject: [PATCH] Fix linter Signed-off-by: Tamal Saha --- Makefile | 5 +++-- main.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3c7531ef..74b1b01b 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + SHELL=/bin/bash -o pipefail GO_PKG := kmodules.xyz @@ -199,7 +200,7 @@ unit-tests: $(BUILD_DIRS) # ./hack/test.sh $(SRC_PKGS) \ # " -ADDTL_LINTERS := goconst,gofmt,goimports,unparam +ADDTL_LINTERS := gofmt,goimports,unparam .PHONY: lint lint: $(BUILD_DIRS) @@ -218,7 +219,7 @@ lint: $(BUILD_DIRS) --env GO111MODULE=on \ --env GOFLAGS="-mod=vendor" \ $(BUILD_IMAGE) \ - golangci-lint run --enable $(ADDTL_LINTERS) --deadline=10m --skip-files="generated.*\.go$\" --skip-dirs-use-default + golangci-lint run --enable $(ADDTL_LINTERS) --enable gofmt,goimports,unparam --deadline=10m --skip-files="generated.*\.go$\" --skip-dirs-use-default $(BUILD_DIRS): @mkdir -p $@ diff --git a/main.go b/main.go index 22843623..43a773db 100644 --- a/main.go +++ b/main.go @@ -122,7 +122,7 @@ func NewClient() (client.Client, error) { _ = clientgoscheme.AddToScheme(scheme) _ = v1.AddToScheme(scheme) - ctrl.SetLogger(klogr.New()) + ctrl.SetLogger(klogr.New()) // nolint:staticcheck cfg := ctrl.GetConfigOrDie() cfg.QPS = 100 cfg.Burst = 100