build(deps): bump github.com/OpenPeeDeeP/depguard/v2 from 2.1.0 to 2.2.0 ()

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-11-17 10:49:40 +01:00 committed by GitHub
parent 0baed20d7a
commit affa7d119c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 8 deletions

@ -205,6 +205,10 @@ linters-settings:
rules:
# Name of a rule.
main:
# Used to determine the package matching priority.
# There are three different modes: `original`, `strict`, and `lax`.
# Default: "original"
list-mode: lax
# List of file globs that will match this list of settings to compare against.
# Default: $all
files:

2
go.mod

@ -13,7 +13,7 @@ require (
github.com/BurntSushi/toml v1.3.2
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0
github.com/OpenPeeDeeP/depguard/v2 v2.1.0
github.com/OpenPeeDeeP/depguard/v2 v2.2.0
github.com/alecthomas/go-check-sumtype v0.1.3
github.com/alexkohler/nakedret/v2 v2.0.2
github.com/alexkohler/prealloc v1.0.0

4
go.sum generated

@ -60,8 +60,8 @@ github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 h1:3ZBs7LAezy8gh0uECsA6C
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY=
github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ=
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA=
github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ=
github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk=
github.com/alecthomas/go-check-sumtype v0.1.3 h1:M+tqMxB68hcgccRXBMVCPI4UJ+QUfdSx0xdbypKCqA8=
github.com/alecthomas/go-check-sumtype v0.1.3/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ=

@ -289,9 +289,10 @@ type DepGuardSettings struct {
}
type DepGuardList struct {
Files []string `mapstructure:"files"`
Allow []string `mapstructure:"allow"`
Deny []DepGuardDeny `mapstructure:"deny"`
ListMode string `mapstructure:"list-mode"`
Files []string `mapstructure:"files"`
Allow []string `mapstructure:"allow"`
Deny []DepGuardDeny `mapstructure:"deny"`
}
type DepGuardDeny struct {

@ -15,8 +15,9 @@ func NewDepguard(settings *config.DepGuardSettings) *goanalysis.Linter {
if settings != nil {
for s, rule := range settings.Rules {
list := &depguard.List{
Files: rule.Files,
Allow: rule.Allow,
ListMode: rule.ListMode,
Files: rule.Files,
Allow: rule.Allow,
}
// because of bug with Viper parsing (split on dot) we use a list of struct instead of a map.