Skip to content

Commit affa7d1

Browse files
build(deps): bump github.com/OpenPeeDeeP/depguard/v2 from 2.1.0 to 2.2.0 (#4207)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 0baed20 commit affa7d1

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.golangci.reference.yml

+4
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ linters-settings:
205205
rules:
206206
# Name of a rule.
207207
main:
208+
# Used to determine the package matching priority.
209+
# There are three different modes: `original`, `strict`, and `lax`.
210+
# Default: "original"
211+
list-mode: lax
208212
# List of file globs that will match this list of settings to compare against.
209213
# Default: $all
210214
files:

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/BurntSushi/toml v1.3.2
1414
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
1515
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0
16-
github.com/OpenPeeDeeP/depguard/v2 v2.1.0
16+
github.com/OpenPeeDeeP/depguard/v2 v2.2.0
1717
github.com/alecthomas/go-check-sumtype v0.1.3
1818
github.com/alexkohler/nakedret/v2 v2.0.2
1919
github.com/alexkohler/prealloc v1.0.0

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,10 @@ type DepGuardSettings struct {
289289
}
290290

291291
type DepGuardList struct {
292-
Files []string `mapstructure:"files"`
293-
Allow []string `mapstructure:"allow"`
294-
Deny []DepGuardDeny `mapstructure:"deny"`
292+
ListMode string `mapstructure:"list-mode"`
293+
Files []string `mapstructure:"files"`
294+
Allow []string `mapstructure:"allow"`
295+
Deny []DepGuardDeny `mapstructure:"deny"`
295296
}
296297

297298
type DepGuardDeny struct {

pkg/golinters/depguard.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ func NewDepguard(settings *config.DepGuardSettings) *goanalysis.Linter {
1515
if settings != nil {
1616
for s, rule := range settings.Rules {
1717
list := &depguard.List{
18-
Files: rule.Files,
19-
Allow: rule.Allow,
18+
ListMode: rule.ListMode,
19+
Files: rule.Files,
20+
Allow: rule.Allow,
2021
}
2122

2223
// because of bug with Viper parsing (split on dot) we use a list of struct instead of a map.

0 commit comments

Comments
 (0)