Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Results can be exported to different report formats. Which can be imported into
```yaml
allowed:
modules: # List of allowed modules
- gopkg.in/yaml.v3
- go.yaml.in/yaml/v3
- github.com/go-xmlfmt/xmlfmt
- github.com/phayes/checkstyle
- github.com/mitchellh/go-homedir
Expand Down Expand Up @@ -91,7 +91,7 @@ Flags:
```
╰─ ./gomodguard -r checkstyle -f gomodguard-checkstyle.xml ./...

info: allowed modules, [gopkg.in/yaml.v3 github.com/go-xmlfmt/xmlfmt github.com/phayes/checkstyle github.com/mitchellh/go-homedir]
info: allowed modules, [go.yaml.in/yaml/v3 github.com/go-xmlfmt/xmlfmt github.com/phayes/checkstyle github.com/mitchellh/go-homedir]
info: allowed module prefixes, [golang.org]
info: blocked modules, [github.com/uudashr/go-module]
info: found `2` blocked modules in the go.mod file, [github.com/gofrs/uuid github.com/uudashr/go-module]
Expand Down
2 changes: 1 addition & 1 deletion _example/allOptions/.gomodguard.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allowed:
modules: # List of allowed modules
- gopkg.in/yaml.v3
- go.yaml.in/yaml/v3
- github.com/go-xmlfmt/xmlfmt
- github.com/Masterminds/semver
- github.com/ryancurrah/gomodguard
Expand Down
2 changes: 1 addition & 1 deletion _example/indirectDep/.gomodguard.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allowed:
modules: # List of allowed modules
- gopkg.in/yaml.v3
- go.yaml.in/yaml/v3
- github.com/go-xmlfmt/xmlfmt
- github.com/Masterminds/semver
- github.com/ryancurrah/gomodguard
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d
github.com/stretchr/testify v1.11.1
go.yaml.in/yaml/v3 v3.0.4
golang.org/x/mod v0.34.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

retract v1.2.1 // Originally tagged for commit hash that was subsequently removed, and replaced by another commit hash
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI=
golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/phayes/checkstyle"
"github.com/ryancurrah/gomodguard"
"github.com/ryancurrah/gomodguard/internal/filesearch"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions processor_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestProcessorSetBlockedModulesWithAllowList(t *testing.T) {
config := &Configuration{
Allowed: Allowed{
Modules: []string{
"gopkg.in/yaml.v3",
"go.yaml.in/yaml/v3",
"github.com/go-xmlfmt/xmlfmt",
"github.com/Masterminds/semver/v3",
"github.com/ryancurrah/gomodguard",
Expand Down Expand Up @@ -223,8 +223,8 @@ func TestProcessorSetBlockedModulesWithAllowList(t *testing.T) {
Require: []*modfile.Require{
{
Mod: module.Version{
Path: "gopkg.in/yaml.v3",
Version: "v3.0.1",
Path: "go.yaml.in/yaml/v3",
Version: "v3.0.4",
},
},
{
Expand Down Expand Up @@ -398,7 +398,7 @@ func TestProcessorSetBlockedModulesWithIndirectDependency(t *testing.T) {
config: &Configuration{
Allowed: Allowed{
Modules: []string{
"gopkg.in/yaml.v3",
"go.yaml.in/yaml/v3",
"github.com/go-xmlfmt/xmlfmt",
"github.com/Masterminds/semver/v3",
"github.com/ryancurrah/gomodguard",
Expand Down Expand Up @@ -447,7 +447,7 @@ func TestProcessorSetBlockedModulesWithIndirectDependency(t *testing.T) {
config: &Configuration{
Allowed: Allowed{
Modules: []string{
"gopkg.in/yaml.v3",
"go.yaml.in/yaml/v3",
"github.com/go-xmlfmt/xmlfmt",
"github.com/Masterminds/semver/v3",
"github.com/ryancurrah/gomodguard",
Expand Down
2 changes: 1 addition & 1 deletion processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestProcessorProcessFiles(t *testing.T) { //nolint:funlen
config := &gomodguard.Configuration{
Allowed: gomodguard.Allowed{
Modules: []string{
"gopkg.in/yaml.v3",
"go.yaml.in/yaml/v3",
"github.com/go-xmlfmt/xmlfmt",
"github.com/Masterminds/semver/v3",
"github.com/ryancurrah/gomodguard",
Expand Down
Loading