You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
Enable gocritic and don't ignore globally (#3159)
Use `nolint` directives instead. From #2960
This commit is contained in:
@@ -24,7 +24,7 @@ func generateScriptWindows(commands []string) string {
|
||||
var buf bytes.Buffer
|
||||
for _, command := range commands {
|
||||
escaped := fmt.Sprintf("%q", command)
|
||||
escaped = strings.Replace(escaped, "$", `\$`, -1)
|
||||
escaped = strings.ReplaceAll(escaped, "$", `\$`)
|
||||
buf.WriteString(fmt.Sprintf(
|
||||
traceScriptWin,
|
||||
escaped,
|
||||
|
||||
@@ -32,7 +32,7 @@ var (
|
||||
)
|
||||
|
||||
func dnsName(i string) (string, error) {
|
||||
res := strings.Replace(i, "_", "-", -1)
|
||||
res := strings.ReplaceAll(i, "_", "-")
|
||||
|
||||
if found := dnsPattern.FindStringIndex(res); found == nil {
|
||||
return "", ErrDNSPatternInvalid
|
||||
|
||||
Reference in New Issue
Block a user