From 10c3e33660cae64ef96426a27c07c004eec85ca3 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Fri, 2 Oct 2020 13:44:36 +0200 Subject: [PATCH] comment false positive --- crypto/keyring/keyring.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 99c9101fb730..0d0e41b7c3da 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -643,6 +643,10 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { buf := bufio.NewReader(buf) pass, err := input.GetPassword("Enter keyring passphrase:", buf) if err != nil { + // NOTE: LGTM.io reports a false positive alert that states we are printing the password, + // but we only log the error. + // + // lgtm [go/clear-text-logging] fmt.Fprintln(os.Stderr, err) continue } @@ -658,6 +662,10 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { reEnteredPass, err := input.GetPassword("Re-enter keyring passphrase:", buf) if err != nil { + // NOTE: LGTM.io reports a false positive alert that states we are printing the password, + // but we only log the error. + // + // lgtm [go/clear-text-logging] fmt.Fprintln(os.Stderr, err) continue }