Skip to content

Commit b7b8ceb

Browse files
authored
Build with Go 1.23 (#110)
Also fix deprecated linters and associated errors.
1 parent be29066 commit b7b8ceb

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: "1.20"
19+
go-version: "1.23"
2020

2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

2424
- name: Lint
2525
uses: golangci/[email protected]
2626
with:
27-
version: v1.53
27+
version: v1.60
2828

2929
- name: Test
3030
run: go test -v ./...

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v5
1616
with:
17-
go-version: "1.20"
17+
go-version: "1.23"
1818

1919
- name: Checkout
2020
uses: actions/checkout@v4

.golangci.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,49 @@ run:
44
linters:
55
disable-all: true
66
enable:
7-
- deadcode
87
- errcheck
98
- gofmt
109
- goimports
11-
- golint
1210
- govet
1311
- ineffassign
12+
- misspell
13+
- revive
1414
- typecheck
1515
- unconvert
16-
- varcheck
16+
- unused
1717

1818
issues:
1919
exclude-use-default: false
2020
exclude-rules:
2121
- path: cmd/patch2pr/
2222
text: "should have( a package)? comment"
23+
- path: internal/
24+
text: "should have( a package)? comment"
2325

24-
linter-settings:
26+
linters-settings:
27+
errcheck:
28+
exclude-functions:
29+
- fmt.Fprintln(os.Stdout)
2530
goimports:
2631
local-prefixes: github.com/bluekeyes/patch2pr
32+
revive:
33+
rules:
34+
# enable all rules from golint
35+
- name: context-keys-type
36+
- name: time-naming
37+
- name: var-declaration
38+
- name: unexported-return
39+
- name: errorf
40+
- name: blank-imports
41+
- name: context-as-argument
42+
- name: dot-imports
43+
- name: error-return
44+
- name: error-strings
45+
- name: error-naming
46+
- name: exported
47+
- name: increment-decrement
48+
- name: var-naming
49+
- name: package-comments
50+
- name: range
51+
- name: receiver-naming
52+
- name: indent-error-flow

applier.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package patch2pr converts Git patches in to GitHub pull requests.
12
package patch2pr
23

34
import (

cmd/patch2pr/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ import (
1616
"time"
1717

1818
"github.com/bluekeyes/go-gitdiff/gitdiff"
19+
"github.com/google/go-github/v63/github"
20+
1921
"github.com/bluekeyes/patch2pr"
2022
"github.com/bluekeyes/patch2pr/internal"
21-
"github.com/google/go-github/v63/github"
2223
)
2324

2425
var (

0 commit comments

Comments
 (0)