https://github.com/orijtech/tickeryzer
Check missing (*time.Ticker).Stop() call, which can cause resources leak.
https://github.com/orijtech/tickeryzer
golang security static-analysis
Last synced: 4 months ago
JSON representation
Check missing (*time.Ticker).Stop() call, which can cause resources leak.
- Host: GitHub
- URL: https://github.com/orijtech/tickeryzer
- Owner: orijtech
- License: apache-2.0
- Created: 2021-01-04T05:43:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T11:38:18.000Z (over 2 years ago)
- Last Synced: 2024-04-18T05:16:53.932Z (about 2 years ago)
- Topics: golang, security, static-analysis
- Language: Go
- Homepage:
- Size: 31.3 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tickeryzer

Package tickeryzer defines an [Analyzer](analyzer_link) that checks missing (*time.Ticker).Stop() call,
which can cause resources leak.
## Installation
### With Go modules:
```sh
go get github.com/orijtech/tickeryzer/cmd/tickeryzer
```
### Without Go modules:
```sh
cd $GOPATH/src/github.com/orijtech/tickeryzer
git checkout v0.0.1
go get
install ./cmd/tickeryzer
```
### With Docker:
```sh
docker pull ghcr.io/orijtech/tickeryzer:latest
```
## Usage
You can run `tickeryzer` either on a Go package or Go files, the same way as
other Go tools work.
Example:
```sh
tickeryzer github.com/orijtech/tickeryzer/testdata/src/a
```
or:
```sh
tickeryzer ./testdata/src/a/a.go
```
With Docker:
```sh
docker run --volume $(pwd):/app --workdir /app ghcr.io/orijtech/tickeryzer:latest ./testdata/src/a/a.go
```
Sample output:
```text
/go/src/github.com/orijtech/tickeryzer/testdata/a/a.go:9:2: missing ticker.Stop() call
```
## Development
Go 1.15+
### Running test
Add test case to `testdata/src/a` directory, then run:
```shell script
go test
```
## Contributing
All contributions are welcome, please report bug or open a pull request.
[analyzer_link]: https://pkg.go.dev/golang.org/x/tools/go/analysis#Analyzer