tickeryzer

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

tickeryzer

Build status

Package tickeryzer defines an Analyzer that checks missing (*time.Ticker).Stop() call, which can cause resources leak.

Installation

With Go modules:
go get github.com/orijtech/tickeryzer/cmd/tickeryzer
Without Go modules:
cd $GOPATH/src/github.com/orijtech/tickeryzer
git checkout v0.0.1
go get
install ./cmd/tickeryzer
With Docker:
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:

tickeryzer github.com/orijtech/tickeryzer/testdata/src/a

or:

tickeryzer ./testdata/src/a/a.go

With Docker:

docker run --volume $(pwd):/app --workdir /app ghcr.io/orijtech/tickeryzer:latest ./testdata/src/a/a.go

Sample output:

/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:

go test

Contributing

All contributions are welcome, please report bug or open a pull request.

Documentation

Index

Constants

View Source
const Doc = `` /* 140-byte string literal not displayed */

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "tickeryzer",
	Doc:  Doc,
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
		ctrlflow.Analyzer,
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL