aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gitlab.com
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-12-05 15:10:03 +0100
committerTaras Madan <tarasmadan@google.com>2023-12-06 11:31:44 +0000
commit2ab72b4feef2c97f22f90cfbf9e45a6cfcd08bda (patch)
treea6d19b94b6399fcc00a6cfa430885cd349dd1533 /vendor/gitlab.com
parente08e8f492d31d672cc245944c185f8aadf2ee695 (diff)
vendor: updates
Diffstat (limited to 'vendor/gitlab.com')
-rw-r--r--vendor/gitlab.com/bosi/decorder/.gitlab-ci.yml8
-rw-r--r--vendor/gitlab.com/bosi/decorder/analyzer.go10
2 files changed, 13 insertions, 5 deletions
diff --git a/vendor/gitlab.com/bosi/decorder/.gitlab-ci.yml b/vendor/gitlab.com/bosi/decorder/.gitlab-ci.yml
index f3ec4f21a..73e1273b3 100644
--- a/vendor/gitlab.com/bosi/decorder/.gitlab-ci.yml
+++ b/vendor/gitlab.com/bosi/decorder/.gitlab-ci.yml
@@ -12,7 +12,7 @@ stages:
test:
stage: test
- image: golang:1.20.6@sha256:cfc9d1b07b1ef4f7a4571f0b60a99646a92ef76adb7d9943f4cb7b606c6554e2
+ image: golang:1.21.0@sha256:b490ae1f0ece153648dd3c5d25be59a63f966b5f9e1311245c947de4506981aa
before_script:
- set -eu
- if [[ -f .env.pipeline ]];then cp .env.pipeline .env;fi
@@ -27,7 +27,7 @@ test:
lint:source-code:
stage: test
- image: golangci/golangci-lint:v1.53.3-alpine@sha256:b61d8503f0ad16499c023772301ec8c0f2559bf76c28d228c390446c5e647f55
+ image: golangci/golangci-lint:v1.54.2-alpine@sha256:e950721f6ae622dcc041f57cc0b61c3a78d4bbfc588facfc8b0166901a9f4848
script:
- apk add make bash
- make settings
@@ -36,7 +36,7 @@ lint:source-code:
license-check:
stage: test
- image: golang:1.20.6@sha256:cfc9d1b07b1ef4f7a4571f0b60a99646a92ef76adb7d9943f4cb7b606c6554e2
+ image: golang:1.21.0@sha256:b490ae1f0ece153648dd3c5d25be59a63f966b5f9e1311245c947de4506981aa
before_script:
- set -eu
- if [[ -f .env.pipeline ]];then cp .env.pipeline .env;fi
@@ -53,7 +53,7 @@ license-check:
pages:
stage: release
- image: golang:1.20.6@sha256:cfc9d1b07b1ef4f7a4571f0b60a99646a92ef76adb7d9943f4cb7b606c6554e2
+ image: golang:1.21.0@sha256:b490ae1f0ece153648dd3c5d25be59a63f966b5f9e1311245c947de4506981aa
only:
- tags
script:
diff --git a/vendor/gitlab.com/bosi/decorder/analyzer.go b/vendor/gitlab.com/bosi/decorder/analyzer.go
index f48612944..08f82ccc1 100644
--- a/vendor/gitlab.com/bosi/decorder/analyzer.go
+++ b/vendor/gitlab.com/bosi/decorder/analyzer.go
@@ -5,6 +5,7 @@ import (
"go/ast"
"go/token"
"strings"
+ "sync"
"golang.org/x/tools/go/analysis"
)
@@ -65,6 +66,7 @@ var (
token.CONST: false,
token.VAR: false,
}
+ decLock sync.Mutex
)
//nolint:lll
@@ -79,10 +81,16 @@ func init() {
Analyzer.Flags.BoolVar(&opts.disableInitFuncFirstCheck, FlagDiffc, false, "option to disable check that init function is always first function in file")
}
-func run(pass *analysis.Pass) (interface{}, error) {
+func initDec() {
+ decLock.Lock()
decNumConf[token.TYPE] = opts.disableTypeDecNumCheck
decNumConf[token.CONST] = opts.disableConstDecNumCheck
decNumConf[token.VAR] = opts.disableVarDecNumCheck
+ decLock.Unlock()
+}
+
+func run(pass *analysis.Pass) (interface{}, error) {
+ initDec()
for _, f := range pass.Files {
ast.Inspect(f, runDeclNumAndDecOrderCheck(pass))