Skip to content

Commit

Permalink
feat: remove mod tidy lint (#106)
Browse files Browse the repository at this point in the history
# Description

Remove gno mod tidy checker

# Related Issues

-
gnoswap-labs/gnoswap#424 (review)
- gnolang/gno#3123
  • Loading branch information
notJoon authored Dec 9, 2024
1 parent 5cb450e commit 76e1c3a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 263 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/fzipp/gocyclo v0.6.0
github.com/goccy/go-graphviz v0.2.9
github.com/stretchr/testify v1.9.0
golang.org/x/tools v0.27.0
golang.org/x/tools v0.28.0
)

require (
Expand All @@ -22,8 +22,8 @@ require (
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/image v0.21.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.19.0 // indirect
)

Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,21 @@ golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
1 change: 0 additions & 1 deletion internal/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ var allRuleConstructors = ruleMap{
"repeated-regex-compilation": NewRepeatedRegexCompilationRule,
"useless-break": NewUselessBreakRule,
"defer-issues": NewDeferRule,
"gno-mod-tidy": NewMissingModPackageRule,
"slice-bounds-check": NewSliceBoundCheckRule,
"const-error-declaration": NewConstErrorDeclarationRule,
}
Expand Down
108 changes: 0 additions & 108 deletions internal/lints/missing_package_mod.go

This file was deleted.

125 changes: 0 additions & 125 deletions internal/lints/missing_package_mod_test.go

This file was deleted.

26 changes: 0 additions & 26 deletions internal/rule_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,32 +313,6 @@ func (r *DeferRule) SetSeverity(severity tt.Severity) {
r.severity = severity
}

type MissingModPackageRule struct {
severity tt.Severity
}

func NewMissingModPackageRule() LintRule {
return &MissingModPackageRule{
severity: tt.SeverityError,
}
}

func (r *MissingModPackageRule) Check(filename string, node *ast.File, fset *token.FileSet) ([]tt.Issue, error) {
return lints.DetectMissingModPackage(filename, node, fset, r.severity)
}

func (r *MissingModPackageRule) Name() string {
return "gno-mod-tidy"
}

func (r *MissingModPackageRule) Severity() tt.Severity {
return r.severity
}

func (r *MissingModPackageRule) SetSeverity(severity tt.Severity) {
r.severity = severity
}

type ConstErrorDeclarationRule struct {
severity tt.Severity
}
Expand Down

0 comments on commit 76e1c3a

Please sign in to comment.