Skip to content

Commit e5b6f12

Browse files
committed
run golangci-lint as GitHub Action
1 parent e157c8a commit e5b6f12

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

Diff for: .github/workflows/linter.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on: [push, pull_request]
2+
name: linter
3+
4+
jobs:
5+
lint:
6+
strategy:
7+
matrix:
8+
go-version: [1.x]
9+
platform: [ubuntu-latest]
10+
runs-on: ${{ matrix.platform }}
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: golangci-lint
16+
uses: golangci/golangci-lint-action@v2
17+
with:
18+
version: v1.32

Diff for: .golangci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
linters:
2+
enable:
3+
- dogsled
4+
- dupl
5+
- gofmt
6+
- goimports
7+
- gosec
8+
- misspell
9+
- nakedret
10+
- stylecheck
11+
- unconvert
12+
- unparam
13+
- whitespace

Diff for: query/encode_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ func TestIsEmptyValue(t *testing.T) {
368368
want := tt.empty
369369
if got != want {
370370
t.Errorf("isEmptyValue(%v) returned %t; want %t", tt.value, got, want)
371-
372371
}
373372
}
374373
}

0 commit comments

Comments
 (0)