Skip to content

Commit

Permalink
update build settings and linters
Browse files Browse the repository at this point in the history
  • Loading branch information
dmacvicar committed Nov 19, 2023
1 parent 414a4f2 commit e249a1c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.21
-
name: Import GPG key
id: import_gpg
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- main
- staging
paths-ignore:
- '*.md'
- 'website/*'
Expand All @@ -19,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.18.x"]
go-version: ["1.21.x"]
steps:
- uses: actions/setup-go@v3
with:
Expand All @@ -33,17 +34,17 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.0
version: v1.52.2
only-new-issues: true
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- {os: ubuntu-latest, go: 1.18}
- {os: windows-latest, go: 1.18}
- {os: macos-latest, go: 1.18}
- {os: ubuntu-latest, go: 1.21}
- {os: windows-latest, go: 1.21}
- {os: macos-latest, go: 1.21}
timeout-minutes: 10
steps:
- name: Set up Go
Expand Down
25 changes: 23 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,33 @@ linters-settings:
gomnd:
ignored-functions:
- strings.SplitN
depguard:
rules:
main:
files:
- $all
allow:
- $gostd
- "github.com/dmacvicar/terraform-provider-libvirt"
- "github.com/community-terraform-providers/terraform-provider-ignition/v2"
- "github.com/digitalocean/go-libvirt"
- "libvirt.org/go/libvirtxml"
- "github.com/davecgh/go-spew"
- "github.com/google/uuid"
- "github.com/hashicorp/terraform-plugin-sdk/v2"
- "github.com/hooklift/iso9660"
- "github.com/mattn/goveralls"
- "github.com/stretchr/testify"
- "golang.org/x/crypto"
- "golang.org/x/lint"
revive:
rules:
- name: unused-parameter
disabled: true

linters:
enable-all: false
enable:
- ifshort
- unparam
- exhaustive
- godot
Expand All @@ -22,7 +44,6 @@ linters:
- revive
- gocritic
- misspell
- depguard
- lll
- errorlint
- errcheck
Expand Down

0 comments on commit e249a1c

Please sign in to comment.