diff --git a/cli/connhelper/internal/syntax/parser.go b/cli/connhelper/internal/syntax/parser.go index d0382299fb..06b1222f43 100644 --- a/cli/connhelper/internal/syntax/parser.go +++ b/cli/connhelper/internal/syntax/parser.go @@ -24,7 +24,7 @@ const ( // LangMirBSDKorn corresponds to the MirBSD Korn Shell, also known as // mksh, as described at http://www.mirbsd.org/htman/i386/man1/mksh.htm. - // Note that it shares some features with Bash, due to the the shared + // Note that it shares some features with Bash, due to the shared // ancestry that is ksh. // // We currently follow mksh version 59. diff --git a/cli/connhelper/internal/syntax/quote.go b/cli/connhelper/internal/syntax/quote.go index 6f27eba12d..628fa4891c 100644 --- a/cli/connhelper/internal/syntax/quote.go +++ b/cli/connhelper/internal/syntax/quote.go @@ -45,6 +45,8 @@ const ( // // Some strings do not require any quoting and are returned unchanged. // Those strings can be directly surrounded in single quotes as well. +// +//nolint:gocyclo // ignore "cyclomatic complexity 35 of func `Quote` is high (> 16) (gocyclo)" func Quote(s string, lang LangVariant) (string, error) { if s == "" { // Special case; an empty string must always be quoted, @@ -100,7 +102,7 @@ func Quote(s string, lang LangVariant) (string, error) { if nonPrintable { b.WriteString("$'") lastRequoteIfHex := false - offs := 0 + offs = 0 for rem := s; len(rem) > 0; { nextRequoteIfHex := false r, size := utf8.DecodeRuneInString(rem)