nsqio / go-diskqueue

A Go package providing a filesystem-backed FIFO queue
MIT License
471 stars 101 forks source link

Added linter config for non-checked error block. #25

Closed yusufpapurcu closed 3 years ago

yusufpapurcu commented 3 years ago

I added inline linter config for specific lines. This configs disable error checks for added lines.

mreiferson commented 3 years ago

Thanks for the PR. Curious what linter this is for? Here's the output I get for golint:

$ golint
diskqueue.go:19:6: exported type LogLevel should have comment or be unexported
diskqueue.go:22:2: exported const DEBUG should have comment (or a comment on this block) or be unexported
diskqueue.go:29:6: exported type AppLogFunc should have comment or be unexported
diskqueue.go:47:6: exported type Interface should have comment or be unexported
diskqueue.go:407:2: should replace d.depth += 1 with d.depth++
diskqueue.go:560:2: should replace d.depth -= 1 with d.depth--
ploxiln commented 3 years ago

the particular linter that flags these lines is https://github.com/kisielk/errcheck

but this ignore syntax is for "golangci-lint", which runs many different linters built into a single binary/process. It's kinda like how flake8 runs pyflakes - pyflakes doesn't have an ignore feature, but flake8 adds one on top.

https://golangci-lint.run/usage/linters/

yusufpapurcu commented 3 years ago

Oh I can understand. Thanks for information. I'm closing this pr.