Skip to content
forked from axcdnt/snitch

Snitch is the tool that keeps your tests under surveillence.

License

Notifications You must be signed in to change notification settings

fishybell/snitch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snitch

contributions welcome Build Status Go Report Card

Snitch is a binary that helps your TDD cycle (or not) by watching tests and implementations of Go files. It works by scanning files, checking the modification date on save and re-running your tests.

It's usual in Go projects to keep the implementation and tests under the same package, so this binary follows this convention.

This tool focuses on Go developers. With a few LOCs we get interesting stuff.

Inspiration

It was a Friday afternoon and I was writing code, but had nothing to watch and report my tests while I changed code.

Inspired by Guard, I decided to build this and thought more people could benefit from it.

Forked from snitch, but with quieter defaults.

Features

  • Automatically runs your tests
  • Re-scan new files, so no need to restart
  • Runs on a package basis
  • Shows test coverage percentage
  • Desktop notifications on macOS and Linux (via notify-send)

Requirements

Go 1.12+

The binary is go-gettable. Make sure you have GOPATH correctly set and added to the $PATH:

go get -u github.com/fishybell/snitch

After go-getting the binary, it will probably be available on your terminal.

Run

▶ snitch --help
Usage of snitch:
  -tags Passes build tags to go test
  -d    Run with some debug output
  -f    [f]ull: Always run entire build
  -interval duration
        The interval (in seconds) for scanning files (default 1s)
  -m string
        The modules mode (passed to -mod= at test time) (default "mod")
  -n    [n]otify: Use system notifications
  -o    [o]nce: Only fail once, don't run subsequent tests
  -path string
        The root path to be watched (default "/Users/nbell/devel/rediq-deal-aggregator")
  -q    [q]uiet: Only print failing tests (use -q=false to be noisy again) (default true)
  -s    [s]mart: Run entire build when no test files are found
  -v    [v]ersion: Print the current version and exit

Feedback is welcome. I hope you enjoy it!

About

Snitch is the tool that keeps your tests under surveillence.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.3%
  • Makefile 3.7%