mirror of
https://github.com/mgechev/revive.git
synced 2025-11-25 22:12:38 +02:00
code cleanup (#1054)
This commit is contained in:
@@ -16,10 +16,12 @@ type DeferRule struct {
|
||||
|
||||
func (r *DeferRule) configure(arguments lint.Arguments) {
|
||||
r.Lock()
|
||||
if r.allow == nil {
|
||||
r.allow = r.allowFromArgs(arguments)
|
||||
defer r.Unlock()
|
||||
if r.allow != nil {
|
||||
return // already configured
|
||||
}
|
||||
r.Unlock()
|
||||
|
||||
r.allow = r.allowFromArgs(arguments)
|
||||
}
|
||||
|
||||
// Apply applies the rule to given file.
|
||||
|
||||
Reference in New Issue
Block a user