1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-19 21:07:46 +02:00

fix: add missing defer when unlocking mutex (#879)

This commit is contained in:
Oleksandr Redko 2023-08-25 14:20:27 +03:00 committed by GitHub
parent 9a87e6fd82
commit 0357df7bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ type FunctionLength struct {
func (r *FunctionLength) configure(arguments lint.Arguments) {
r.Lock()
r.Unlock()
defer r.Unlock()
if !r.configured {
maxStmt, maxLines := r.parseArguments(arguments)
r.maxStmt = int(maxStmt)