Skip to content

Commit

Permalink
Build with Go 1.23 (#110)
Browse files Browse the repository at this point in the history
Also fix deprecated linters and associated errors.
  • Loading branch information
bluekeyes authored Aug 27, 2024
1 parent be29066 commit b7b8ceb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.23"

- name: Checkout
uses: actions/checkout@v4

- name: Lint
uses: golangci/golangci-lint-action@v6.1.0
with:
version: v1.53
version: v1.60

- name: Test
run: go test -v ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.23"

- name: Checkout
uses: actions/checkout@v4
Expand Down
34 changes: 30 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,49 @@ run:
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gofmt
- goimports
- golint
- govet
- ineffassign
- misspell
- revive
- typecheck
- unconvert
- varcheck
- unused

issues:
exclude-use-default: false
exclude-rules:
- path: cmd/patch2pr/
text: "should have( a package)? comment"
- path: internal/
text: "should have( a package)? comment"

linter-settings:
linters-settings:
errcheck:
exclude-functions:
- fmt.Fprintln(os.Stdout)
goimports:
local-prefixes: github.com/bluekeyes/patch2pr
revive:
rules:
# enable all rules from golint
- name: context-keys-type
- name: time-naming
- name: var-declaration
- name: unexported-return
- name: errorf
- name: blank-imports
- name: context-as-argument
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: package-comments
- name: range
- name: receiver-naming
- name: indent-error-flow
1 change: 1 addition & 0 deletions applier.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package patch2pr converts Git patches in to GitHub pull requests.
package patch2pr

import (
Expand Down
3 changes: 2 additions & 1 deletion cmd/patch2pr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import (
"time"

"github.com/bluekeyes/go-gitdiff/gitdiff"
"github.com/google/go-github/v63/github"

"github.com/bluekeyes/patch2pr"
"github.com/bluekeyes/patch2pr/internal"
"github.com/google/go-github/v63/github"
)

var (
Expand Down

0 comments on commit b7b8ceb

Please sign in to comment.