Skip to content

Commit

Permalink
fix lint errors, run golangci-lint on Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Aug 4, 2020
1 parent b44a41d commit 7130606
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.30
22 changes: 22 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
run:
linters-settings:
linters:
disable-all: true
enable:
- deadcode
- goconst
- goimports
- gosimple
- ineffassign
- misspell
- prealloc
- scopelint
- staticcheck
- stylecheck
- structcheck
- unconvert
- unparam
- unused
- varcheck
- vet

2 changes: 1 addition & 1 deletion decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var _ = Describe("Decoder", func() {
Expect(err).To(MatchError(errNoDynamicTable))
})

It("errors when a non-existant static table entry is referenced", func() {
It("errors when a non-existent static table entry is referenced", func() {
data := appendVarInt(nil, 6, 10000)
data[0] ^= 0x80 | 0x40
_, err := decoder.Write(insertPrefix(data))
Expand Down
2 changes: 1 addition & 1 deletion encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var _ = Describe("Encoder", func() {
Expect(data).To(BeEmpty())
})

It("encodes multipe fields", func() {
It("encodes multiple fields", func() {
hf1 := HeaderField{Name: "foobar", Value: "lorem ipsum"}
hf2 := HeaderField{Name: "raboof", Value: "dolor sit amet"}
Expect(encoder.WriteField(hf1)).To(Succeed())
Expand Down
3 changes: 3 additions & 0 deletions integrationtests/interop/interop_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func readQIFs() {
qifDir := currentDir() + "/qifs/qifs"
Expect(qifDir).To(BeADirectory())
filepath.Walk(qifDir, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() {
return nil
}
Expand Down

0 comments on commit 7130606

Please sign in to comment.