Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-10-14 14:47:48 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-10-14 14:49:12 +0300
commit5df7c2bf5ec7ccfccee28c38fe3838a21b1a66e3 (patch)
treea29b8f4d04e403118a48e051af4cc85130c9b793 /tools
parent20ca46da3e1fc95fcd08d330862c7fef69e71301 (diff)
tools/golangci-lint: Fix Viper v1.13 breaking the Revive linter config
The upgrade to Viper v1.13 has introduced a change to lower-case all config entries in arrays via 5247643 (Recurse into arrays when converting keys to lowercase, 2022-06-23). This in turn breaks our ability to pass the `allowTypesBefore` argument to the Revive linter as it performs an exact match for the arguments. Let's unblock the upgrade to golangci-lint v1.50.0 by excluding Viper v1.13 for the time being.
Diffstat (limited to 'tools')
-rw-r--r--tools/golangci-lint/go.mod8
-rw-r--r--tools/golangci-lint/go.sum3
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/golangci-lint/go.mod b/tools/golangci-lint/go.mod
index 7172e72e6..56f1a9164 100644
--- a/tools/golangci-lint/go.mod
+++ b/tools/golangci-lint/go.mod
@@ -136,7 +136,7 @@ require (
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
- github.com/spf13/viper v1.13.0 // indirect
+ github.com/spf13/viper v1.12.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
@@ -174,3 +174,9 @@ require (
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
)
+
+// https://github.com/spf13/viper/commit/5247643f02358b40d01385b0dbf743b659b0133f
+// converted Viper to lower-case keys in arrays. As the Revive linter
+// depends on exact matches for its configuration this breaks our ability
+// to set the "allowTypesBefore" option.
+exclude github.com/spf13/viper v1.13.0
diff --git a/tools/golangci-lint/go.sum b/tools/golangci-lint/go.sum
index 6bd117668..678eb3a7e 100644
--- a/tools/golangci-lint/go.sum
+++ b/tools/golangci-lint/go.sum
@@ -806,9 +806,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM=
+github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
-github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU=
-github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw=
github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0=
github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I=
github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc=