Skip to content

Commit e249a1c

Browse files
committed
update build settings and linters
1 parent 414a4f2 commit e249a1c

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: Set up Go
2929
uses: actions/setup-go@v2
3030
with:
31-
go-version: 1.18
31+
go-version: 1.21
3232
-
3333
name: Import GPG key
3434
id: import_gpg

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- main
10+
- staging
1011
paths-ignore:
1112
- '*.md'
1213
- 'website/*'
@@ -19,7 +20,7 @@ jobs:
1920
runs-on: ubuntu-latest
2021
strategy:
2122
matrix:
22-
go-version: ["1.18.x"]
23+
go-version: ["1.21.x"]
2324
steps:
2425
- uses: actions/setup-go@v3
2526
with:
@@ -33,17 +34,17 @@ jobs:
3334
- name: golangci-lint
3435
uses: golangci/golangci-lint-action@v3
3536
with:
36-
version: v1.50.0
37+
version: v1.52.2
3738
only-new-issues: true
3839
build:
3940
name: Build
4041
runs-on: ${{ matrix.os }}
4142
strategy:
4243
matrix:
4344
include:
44-
- {os: ubuntu-latest, go: 1.18}
45-
- {os: windows-latest, go: 1.18}
46-
- {os: macos-latest, go: 1.18}
45+
- {os: ubuntu-latest, go: 1.21}
46+
- {os: windows-latest, go: 1.21}
47+
- {os: macos-latest, go: 1.21}
4748
timeout-minutes: 10
4849
steps:
4950
- name: Set up Go

.golangci.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@ linters-settings:
99
gomnd:
1010
ignored-functions:
1111
- strings.SplitN
12+
depguard:
13+
rules:
14+
main:
15+
files:
16+
- $all
17+
allow:
18+
- $gostd
19+
- "github.com/dmacvicar/terraform-provider-libvirt"
20+
- "github.com/community-terraform-providers/terraform-provider-ignition/v2"
21+
- "github.com/digitalocean/go-libvirt"
22+
- "libvirt.org/go/libvirtxml"
23+
- "github.com/davecgh/go-spew"
24+
- "github.com/google/uuid"
25+
- "github.com/hashicorp/terraform-plugin-sdk/v2"
26+
- "github.com/hooklift/iso9660"
27+
- "github.com/mattn/goveralls"
28+
- "github.com/stretchr/testify"
29+
- "golang.org/x/crypto"
30+
- "golang.org/x/lint"
31+
revive:
32+
rules:
33+
- name: unused-parameter
34+
disabled: true
1235

1336
linters:
1437
enable-all: false
1538
enable:
16-
- ifshort
1739
- unparam
1840
- exhaustive
1941
- godot
@@ -22,7 +44,6 @@ linters:
2244
- revive
2345
- gocritic
2446
- misspell
25-
- depguard
2647
- lll
2748
- errorlint
2849
- errcheck

0 commit comments

Comments
 (0)