diff --git a/go.mod b/go.mod index 9fbe0c54..66c1dd46 100644 --- a/go.mod +++ b/go.mod @@ -120,8 +120,8 @@ require ( github.com/yeya24/promlinter v0.2.0 github.com/ykadowak/zerologlint v0.1.3 gitlab.com/bosi/decorder v0.4.1 + go-simpler.org/musttag v0.8.0 go-simpler.org/sloglint v0.3.0 - go.tmz.dev/musttag v0.7.2 golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea golang.org/x/tools v0.15.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index ffd1136e..a2ed22f7 100644 --- a/go.sum +++ b/go.sum @@ -589,7 +589,9 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= -go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E= +go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= +go-simpler.org/musttag v0.8.0 h1:DR4UTgetNNhPRNo02rkK1hwDTRzAPotN+ZqYpdtEwWc= +go-simpler.org/musttag v0.8.0/go.mod h1:fiNdCkXt2S6je9Eblma3okjnlva9NT1Eg/WUt19rWu8= go-simpler.org/sloglint v0.3.0 h1:E6TR0w4io+F1mkdvFaCRKEpf19S2+lnEYiDM2Z6bClk= go-simpler.org/sloglint v0.3.0/go.mod h1:/RQr0TeTf89IyRjLJ9ogUbIp1Zs5zJJAj02pwQoDQdg= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -598,8 +600,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.tmz.dev/musttag v0.7.2 h1:1J6S9ipDbalBSODNT5jCep8dhZyMr4ttnjQagmGYR5s= -go.tmz.dev/musttag v0.7.2/go.mod h1:m6q5NiiSKMnQYokefa2xGoyoXnrswCbJ0AWYzf4Zs28= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= diff --git a/pkg/golinters/musttag.go b/pkg/golinters/musttag.go index d9ea7efc..72d91958 100644 --- a/pkg/golinters/musttag.go +++ b/pkg/golinters/musttag.go @@ -1,7 +1,7 @@ package golinters import ( - "go.tmz.dev/musttag" + "go-simpler.org/musttag" "golang.org/x/tools/go/analysis" "github.com/golangci/golangci-lint/pkg/config" diff --git a/pkg/lint/lintersdb/manager.go b/pkg/lint/lintersdb/manager.go index bdccfd35..4f784800 100644 --- a/pkg/lint/lintersdb/manager.go +++ b/pkg/lint/lintersdb/manager.go @@ -658,7 +658,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { WithSince("v1.51.0"). WithLoadForGoAnalysis(). WithPresets(linter.PresetStyle, linter.PresetBugs). - WithURL("https://github.com/tmzane/musttag"), + WithURL("https://github.com/go-simpler/musttag"), linter.NewConfig(golinters.NewNakedret(nakedretCfg)). WithSince("v1.19.0"). diff --git a/test/testdata/musttag.go b/test/testdata/musttag.go index ebb6ce69..d9ed7d9b 100644 --- a/test/testdata/musttag.go +++ b/test/testdata/musttag.go @@ -8,11 +8,11 @@ import ( // builtin functions: func musttagJSON() { - var user struct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at " + var user struct { Name string Email string `json:"email"` } - json.Marshal(user) + json.Marshal(user) // want "the given struct should be annotated with the `json` tag" } // custom functions from config: diff --git a/test/testdata/musttag_custom.go b/test/testdata/musttag_custom.go index 537c6697..0e6f8202 100644 --- a/test/testdata/musttag_custom.go +++ b/test/testdata/musttag_custom.go @@ -9,18 +9,18 @@ import ( // builtin functions: func musttagJSONCustom() { - var user struct { // want "`anonymous struct` should be annotated with the `json` tag as it is passed to `json.Marshal` at " + var user struct { Name string Email string `json:"email"` } - json.Marshal(user) + json.Marshal(user) // want "the given struct should be annotated with the `json` tag" } // custom functions from config: func musttagASN1Custom() { - var user struct { // want "`anonymous struct` should be annotated with the `asn1` tag as it is passed to `asn1.Marshal` at " + var user struct { Name string Email string `asn1:"email"` } - asn1.Marshal(user) + asn1.Marshal(user) // want "the given struct should be annotated with the `asn1` tag" }