Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.5 KB

File metadata and controls

67 lines (42 loc) · 1.5 KB

TDD Guard Go Reporter

Go test reporter that captures test results for TDD Guard validation.

Requirements

Installation

go install github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go@latest

Configuration

Basic Usage

Pipe go test -json output to the reporter:

go test -json ./... 2>&1 | tdd-guard-go

Project Root Configuration

For projects where tests run in subdirectories, specify the project root:

go test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project/root

Configuration Rules

  • Path must be absolute when using -project-root flag
  • Current directory must be within the configured project root
  • Falls back to current directory if not specified

Makefile Integration

Add to your Makefile:

test:
	go test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project/root

How It Works

The reporter acts as a filter that:

  1. Reads go test -json output from stdin
  2. Passes the output through to stdout unchanged
  3. Parses test results and transforms them to TDD Guard format
  4. Saves results to .claude/tdd-guard/data/test.json

This design allows it to be inserted into existing test pipelines without disrupting output.

More Information

License

MIT