Skip to content

Commit cd24df5

Browse files
author
Ryan
authored
ci(golangci-lint): switch to latest (#870)
* ci(golangci-lint): switch to latest remove schema override since it was fixed in upstream Signed-off-by: hackercat <[email protected]> * fix: apply lint fixes
1 parent 11f6ee3 commit cd24df5

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
CGO_ENABLED: 0
2323
with:
24-
version: v1.40.0
24+
version: latest
2525
- uses: github/super-linter@v3
2626
env:
2727
DEFAULT_BRANCH: master

.golangci.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# yaml-language-server: $schema=https://schemastore.pages.dev/schemas/json/golangci-lint.json
2-
# Your editor might complain about invalid types, but this is correct config
3-
# above schema should prevent editor from "shouting" about this
4-
# Minimum golangci-lint version required: v1.40.0
1+
# Minimum golangci-lint version required: v1.42.0
52
run:
63
timeout: 3m
74

@@ -32,7 +29,7 @@ linters:
3229
enable:
3330
- megacheck
3431
- govet
35-
- golint
32+
- revive
3633
- gocyclo
3734
- gosec
3835
- unconvert

pkg/runner/runner_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/nektos/act/pkg/model"
1717
)
1818

19-
var baseImage string = "node:12-buster-slim"
19+
var baseImage = "node:12-buster-slim"
2020

2121
func init() {
2222
if p := os.Getenv("ACT_TEST_IMAGE"); p != "" {

pkg/runner/step_context.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ func (sc *StepContext) execAsDocker(ctx context.Context, action *model.Action, a
560560

561561
if !correctArchExists {
562562
log.Debugf("image '%s' for architecture '%s' will be built from context '%s", image, rc.Config.ContainerArchitecture, contextDir)
563-
var actionContainer container.Container = nil
563+
var actionContainer container.Container
564564
if localAction {
565565
actionContainer = sc.RunContext.JobContainer
566566
}

0 commit comments

Comments
 (0)