mirror of
https://github.com/mgechev/revive.git
synced 2025-03-25 21:29:16 +02:00
parent
7c2ebbda24
commit
3116818e59
@ -11,17 +11,19 @@ import (
|
||||
|
||||
// FunctionLength lint.
|
||||
type FunctionLength struct {
|
||||
maxStmt int
|
||||
maxLines int
|
||||
maxStmt int
|
||||
maxLines int
|
||||
configured bool
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
func (r *FunctionLength) configure(arguments lint.Arguments) {
|
||||
r.Lock()
|
||||
if r.maxLines == 0 {
|
||||
if !r.configured {
|
||||
maxStmt, maxLines := r.parseArguments(arguments)
|
||||
r.maxStmt = int(maxStmt)
|
||||
r.maxLines = int(maxLines)
|
||||
r.configured = true
|
||||
}
|
||||
r.Unlock()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user