Skip to content

Commit

Permalink
refactor: fix 'use-any' revive issues (#1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Jan 22, 2025
1 parent 7d97f54 commit 77616f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lint/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

// Arguments is type used for the arguments of a rule.
type Arguments = []interface{}
type Arguments = []any

// FileFilters is type used for modeling file filters to apply to rules.
type FileFilters = []*FileFilter
Expand Down
2 changes: 1 addition & 1 deletion lint/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (f *File) ToPosition(pos token.Pos) token.Position {
}

// Render renders a node.
func (f *File) Render(x interface{}) string {
func (f *File) Render(x any) string {
var buf bytes.Buffer
if err := printer.Fprint(&buf, f.Pkg.fset, x); err != nil {
panic(err)
Expand Down
1 change: 1 addition & 0 deletions revive.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ warningCode = 1
[rule.unreachable-code]
[rule.unused-parameter]
[rule.useless-break]
[rule.use-any]
[rule.var-declaration]
[rule.var-naming]

0 comments on commit 77616f0

Please sign in to comment.