From 90da98f70cf1d52a491b60e63dd397dc5c6f42e3 Mon Sep 17 00:00:00 2001 From: GrosQuildu Date: Thu, 14 Nov 2024 10:08:37 +0100 Subject: [PATCH] add todo false positives --- go/missing-runlock-on-rwmutex.go | 1 + go/missing-unlock-before-return.go | 1 + 2 files changed, 2 insertions(+) diff --git a/go/missing-runlock-on-rwmutex.go b/go/missing-runlock-on-rwmutex.go index faabfa6..5cdca02 100644 --- a/go/missing-runlock-on-rwmutex.go +++ b/go/missing-runlock-on-rwmutex.go @@ -124,6 +124,7 @@ func (c *RWContainer) inc6b(name string) error { defer func() { fmt.Println("before runlock") unlocker() + // todook: missing-runlock-on-rwmutex fmt.Println("after runlock") }() // todook: missing-runlock-on-rwmutex diff --git a/go/missing-unlock-before-return.go b/go/missing-unlock-before-return.go index 5b1c610..2103948 100644 --- a/go/missing-unlock-before-return.go +++ b/go/missing-unlock-before-return.go @@ -152,6 +152,7 @@ func (c *Container) inc6b(name string) error { defer func() { fmt.Println("before unlock") unlocker() + // todook: missing-unlock-before-return fmt.Println("after unlock") }() // todook: missing-unlock-before-return