mirror of
https://github.com/mgechev/revive.git
synced 2025-07-15 01:04:40 +02:00
better messages for rules' config errors (#563)
This commit is contained in:
@ -16,9 +16,7 @@ var (
|
||||
|
||||
// Apply applies the rule to given file.
|
||||
func (r *FileHeaderRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure {
|
||||
if len(arguments) != 1 {
|
||||
panic(`invalid configuration for "file-header" rule`)
|
||||
}
|
||||
checkNumberOfArguments(1, arguments, r.Name())
|
||||
|
||||
header, ok := arguments[0].(string)
|
||||
if !ok {
|
||||
|
Reference in New Issue
Block a user