From f2f547f60ae2e995dc59766b718fe09162d5c9e9 Mon Sep 17 00:00:00 2001 From: ashmrtn Date: Thu, 27 Apr 2023 16:49:09 -0700 Subject: [PATCH] Update golangci-lint to 1.52.2 (#3253) --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [x] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/workflows/ci.yml | 2 +- src/Makefile | 4 ++-- src/internal/common/crash/crash.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5063ac277..3d2e1da78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -416,7 +416,7 @@ jobs: with: # Keep pinned to a verson as sometimes updates will add new lint # failures in unchanged code. - version: v1.50.1 + version: v1.52.2 working-directory: src skip-pkg-cache: true skip-build-cache: true diff --git a/src/Makefile b/src/Makefile index fff36d78c..74119b3d9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ # This must match the version defined in .github/workflows/lint.yaml. -WANTED_LINT_VERSION := 1.50.1 +WANTED_LINT_VERSION := 1.52.2 LINT_VERSION := $(shell golangci-lint version | cut -d' ' -f4) HAS_LINT := $(shell which golangci-lint) @@ -82,4 +82,4 @@ load-test: ./pkg/repository/loadtest/repository_load_test.go getM365: - go build -o getM365 cmd/getM365/main.go \ No newline at end of file + go build -o getM365 cmd/getM365/main.go diff --git a/src/internal/common/crash/crash.go b/src/internal/common/crash/crash.go index 05a5baf2d..bc1c53159 100644 --- a/src/internal/common/crash/crash.go +++ b/src/internal/common/crash/crash.go @@ -45,12 +45,12 @@ func Recovery(ctx context.Context, r any, namespace string) error { for i := 1; i < 10; i++ { _, file, line, ok := runtime.Caller(i) if j > 0 { - if strings.Contains(file, "panic.go") { - j = 0 - } else { + if !strings.Contains(file, "panic.go") { inFile = fmt.Sprintf(": file %s - line %d", file, line) break } + + j = 0 } // skip the location where Recovery() gets called.