1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-05 00:28:53 +02:00
This commit is contained in:
chavacava
2022-04-10 09:06:59 +02:00
committed by GitHub
parent b9814276b6
commit 31fbdb1833
23 changed files with 275 additions and 119 deletions

View File

@ -10,13 +10,9 @@ import (
type NestedStructs struct{}
// Apply applies the rule to given file.
func (r *NestedStructs) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure {
func (r *NestedStructs) Apply(file *lint.File, _ lint.Arguments) []lint.Failure {
var failures []lint.Failure
if len(arguments) > 0 {
panic(r.Name() + " doesn't take any arguments")
}
walker := &lintNestedStructs{
fileAST: file.AST,
onFailure: func(failure lint.Failure) {