Skip to content

Commit

Permalink
Update Go version in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Dec 1, 2024
1 parent e63d71b commit f12cdd5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/test_and_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Restore cache
uses: actions/cache@v1
- name: Set up Go
uses: actions/setup-go@v5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: |
go mod download
go-version: 1.23

- name: Test
run: go test
Expand All @@ -37,9 +25,9 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: v1.29
args: --disable-all --enable=goimports --enable=golint --enable=govet
version: v1.62.2
args: '--disable-all --enable=goimports --enable=govet --exclude "printf: non-constant format string"'
3 changes: 2 additions & 1 deletion plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import (

// flags for Analyzer.Flag.
// If you would like to specify flags for your plugin, you can put them via 'ldflags' as below.
// $ go build -buildmode=plugin -ldflags "-X 'main.flags=-opt val'" github.com/sanposhiho/wastedassign/plugin/wastedassign
//
// $ go build -buildmode=plugin -ldflags "-X 'main.flags=-opt val'" github.com/sanposhiho/wastedassign/plugin/wastedassign
var flags string

// AnalyzerPlugin provides analyzers as a plugin.
Expand Down

0 comments on commit f12cdd5

Please sign in to comment.