diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62ece30ee..438f6b459 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78e456f01..a9a0ca221 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - staging paths-ignore: - '*.md' - 'website/*' @@ -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: @@ -33,7 +34,7 @@ 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 @@ -41,9 +42,9 @@ jobs: 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 diff --git a/.golangci.yaml b/.golangci.yaml index dc6c924f3..3fc03c5e9 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -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 @@ -22,7 +44,6 @@ linters: - revive - gocritic - misspell - - depguard - lll - errorlint - errcheck