diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4b9c2e2..f23de46 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,7 +16,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 @@ -24,7 +24,7 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v6.1.0 with: - version: v1.53 + version: v1.60 - name: Test run: go test -v ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1de8179..c059573 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.golangci.yml b/.golangci.yml index 32045f5..0b9b235 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/applier.go b/applier.go index c5d295e..03d3876 100644 --- a/applier.go +++ b/applier.go @@ -1,3 +1,4 @@ +// Package patch2pr converts Git patches in to GitHub pull requests. package patch2pr import ( diff --git a/cmd/patch2pr/main.go b/cmd/patch2pr/main.go index f7702ef..4eff6db 100644 --- a/cmd/patch2pr/main.go +++ b/cmd/patch2pr/main.go @@ -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 (