Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eatonphil/deferlint
Linter for finding defer statements in Go loops
https://github.com/eatonphil/deferlint
Last synced: 23 days ago
JSON representation
Linter for finding defer statements in Go loops
- Host: GitHub
- URL: https://github.com/eatonphil/deferlint
- Owner: eatonphil
- License: mit
- Created: 2019-07-16T13:07:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-19T08:07:07.000Z (over 5 years ago)
- Last Synced: 2024-10-13T04:13:05.352Z (about 1 month ago)
- Language: Go
- Size: 3.91 KB
- Stars: 32
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MD
Awesome Lists containing this project
README
# deferlint
This package warns when defer is used within loops.
## Example
```bash
$ go get github.com/eatonphil/deferlint
$ go vet -vettool=/Users/philipeaton/go/bin/deferlint ./tests
# github.com/eatonphil/deferlint/tests
tests/deferloop.go:7:3: defer in loop found "defer f()"
```## References
https://github.com/fatih/addlint