Skip to content

Commit 5114fb1

Browse files
authored
Add lint configuration and GitHub action (#5)
1 parent da87617 commit 5114fb1

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/go.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Go
2+
on:
3+
pull_request:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
verify:
9+
name: Verify
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Set up Go 1.16
13+
uses: actions/setup-go@v2
14+
with:
15+
go-version: 1.16
16+
17+
- name: Check out code into the Go module directory
18+
uses: actions/checkout@v2
19+
20+
- name: Lint
21+
uses: golangci/golangci-lint-action@v2
22+
with:
23+
version: v1.28
24+
25+
- name: Test
26+
run: go test -v ./...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/patch2pr

.golangci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
run:
2+
tests: false
3+
4+
linters:
5+
disable-all: true
6+
enable:
7+
- deadcode
8+
- errcheck
9+
- gofmt
10+
- goimports
11+
- golint
12+
- govet
13+
- ineffassign
14+
- typecheck
15+
- unconvert
16+
- varcheck
17+
18+
issues:
19+
exclude-use-default: false
20+
exclude-rules:
21+
- path: cmd/patch2pr/
22+
text: "should have( a package)? comment"
23+
24+
linter-settings:
25+
goimports:
26+
local-prefixes: github.com/bluekeyes/patch2pr

0 commit comments

Comments
 (0)