Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finishing reading when read canceled #156

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
run:
deadline: 10m

issues:
exclude-rules:

# Exclude `for i, _ :=`, since that doesn't work in old go
- linters:
- gosimple
text: "should omit value from range"
- linters:
- golint
text: "should omit 2nd value from range"

# Exclude underscore warnings, too much work
# for a semi-vendored wrapper
- linters:
- golint
path: usb/lowlevel/libusb/libusb.go
text: "don't use underscores"

# Exclude all cap warnings, too much work
# for a semi-vendored wrapper
- linters:
- golint
path: usb/lowlevel/libusb/libusb.go
text: "ALL_CAPS"

# Exclude long lines warnings, too much work
# for a semi-vendored wrapper
- linters:
- lll
path: usb/lowlevel/libusb/libusb.go

# Exclude noinit warnings, too much work
# for a semi-vendored wrapper
- linters:
- lll
path: usb/lowlevel/hidapi/hid.go

# Before we split into internal/non-internal, ignore comments
- linters:
- golint
text: "(comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)"

exclude-use-default: false

linters:
enable:
- golint
- govet
- staticcheck
- gosec
- stylecheck
- interfacer
- unconvert
- dupl
- goconst
- gocyclo
- gofmt
- goimports
- maligned
- depguard
- misspell
- lll
- unparam
- nakedret
- prealloc
- scopelint
- gochecknoinits
- gocritic

linters-settings:
gofmt:
# causes errors in old go
simplify: false
9 changes: 0 additions & 9 deletions .gometalinter

This file was deleted.

13 changes: 3 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ matrix:
- go get github.com/karalabe/xgo
- cd release/macos
- make all
- env: TEST=go-vet
- env: TEST=golangci
script:
- go vet ./...
- env: TEST=go-fmt
script:
- gofmt -d *.go ./server ./server/status ./server/api ./usb ./wire ./core ./memorywriter
- env: TEST=metalinter
script:
- go get -u github.com/alecthomas/gometalinter
- gometalinter --install
- gometalinter
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.15.0
- golangci-lint run
- env: TEST=version-check
script:
- diff -u VERSION <(grep "const version" trezord.go | cut -f 2 -d '"')
Expand Down
Loading