diff --git a/.github/workflows/cgo.yml b/.github/workflows/cgo.yml index baec980ec5b..1d2f50138dc 100644 --- a/.github/workflows/cgo.yml +++ b/.github/workflows/cgo.yml @@ -1205,10 +1205,10 @@ jobs: # legacy custom analyzer findings in tests or other analyzer families. # Note: -test=false intentionally scopes this gate to production code only. - name: Run custom linters - run: make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror -uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak -errortypeassertion -execcommandwithoutcontext -sprintfint -test=false" + run: make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror -uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak -errortypeassertion -execcommandwithoutcontext -sprintfint -stringsindexcontains -stringscountcontains -test=false" - name: Run custom linters (wasm) - run: GOOS=js GOARCH=wasm make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror -uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak -errortypeassertion -execcommandwithoutcontext -sprintfint -test=false" LINTER_PACKAGES="./pkg/console ./pkg/parser ./pkg/styles ./pkg/tty ./pkg/workflow" + run: GOOS=js GOARCH=wasm make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror -uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak -errortypeassertion -execcommandwithoutcontext -sprintfint -stringsindexcontains -stringscountcontains -test=false" LINTER_PACKAGES="./pkg/console ./pkg/parser ./pkg/styles ./pkg/tty ./pkg/workflow" # Ensure no action shell scripts invoke python or python3 - name: Lint action shell scripts diff --git a/pkg/cli/compile_update_check.go b/pkg/cli/compile_update_check.go index 166ac280421..a92692d22c0 100644 --- a/pkg/cli/compile_update_check.go +++ b/pkg/cli/compile_update_check.go @@ -299,7 +299,7 @@ func hasExplicitMinorComponent(version string) bool { if idx := strings.IndexAny(core, "-+"); idx >= 0 { core = core[:idx] } - return strings.Count(core, ".") >= 1 + return strings.Contains(core, ".") } func printCompileUpdateNotification(notification *compileUpdateNotification) {