diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..124d14c --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -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 diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..fb067dd --- /dev/null +++ b/.golangci.yml @@ -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 + diff --git a/decoder_test.go b/decoder_test.go index 24f08e2..5886efb 100644 --- a/decoder_test.go +++ b/decoder_test.go @@ -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)) diff --git a/encoder_test.go b/encoder_test.go index 92744bb..e8c6f00 100644 --- a/encoder_test.go +++ b/encoder_test.go @@ -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()) diff --git a/integrationtests/interop/interop_suite_test.go b/integrationtests/interop/interop_suite_test.go index 08f859b..8fa31cd 100644 --- a/integrationtests/interop/interop_suite_test.go +++ b/integrationtests/interop/interop_suite_test.go @@ -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 }