Skip to content

Commit

Permalink
update CI workflow to use golangci-lint v1.60.3 & go version 1.23.0 ;…
Browse files Browse the repository at this point in the history
… update .golangci-lint.yaml
  • Loading branch information
0pcom committed Sep 23, 2024
1 parent 8f7c401 commit 54f5d92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
- name: Setup golang
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.23.x
- name: Check out code
uses: actions/checkout@v3
- name: Install Requirements
run: |
GO111MODULES=off; go mod vendor
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
- name: Setup SSH Key Build and run e2e
run : |
make e2e-build
Expand Down
17 changes: 7 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# options for analysis running
run:
# default concurrency is a available CPU number
concurrency: 1
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 10m
deadline: 3m

# exit code when at least one issue was found, default is 1
issues-exit-code: 1
Expand Down Expand Up @@ -45,7 +45,7 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true
Expand All @@ -66,8 +66,7 @@ linters-settings:
check-blank: true
govet:
# report about shadowed variables
check-shadowing: true

shadow: true
# Obtain type information from installed (to $GOPATH/pkg) package files:
# golangci-lint will execute `go install -i` and `go test -i` for analyzed packages
# before analyzing them.
Expand All @@ -81,7 +80,7 @@ linters-settings:
# 2. you use go >= 1.10
# 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI.
use-installed-packages: false
revive:
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
Expand Down Expand Up @@ -145,26 +144,24 @@ linters-settings:
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
goimports:
local-prefixes: github.com/skycoin/skywire


linters:
enable:
- revive
- goimports
- unused
- unparam
- errcheck
- gosimple
- staticcheck
- unused
- ineffassign
- typecheck
- gosec
- megacheck
- misspell
- nakedret
enable-all: false
disable:
disable-all: true
presets:
fast: false
Expand Down

0 comments on commit 54f5d92

Please sign in to comment.