Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 2.38 KB

File metadata and controls

26 lines (19 loc) · 2.38 KB

Repository Guidelines

Project Structure & Module Organization

buildbroom is a small Go CLI for finding and removing common build artifacts. The entrypoint is main.go, which handles flag parsing and usage text. Core cleanup logic lives in internal/buildbroom/runner.go, and stack markers plus cleanup targets live in internal/buildbroom/rules.go. Tests sit beside the code they cover in *_test.go files. buildbroom.exe is a local build artifact, not source.

Build, Test, and Development Commands

Run commands from the repository root.

  • go run . C:\path\to\workspace runs the CLI in preview mode.
  • go run . --apply --depth 2 --jobs 8 C:\path\to\workspace performs real deletion with explicit discovery and concurrency settings.
  • go build ./... verifies every package compiles.
  • go test ./... runs the full test suite.
  • go test -cover ./... checks package coverage while changing rules or runner behavior.
  • go fmt ./... applies standard Go formatting before review.

Coding Style & Naming Conventions

Follow idiomatic Go: tabs for indentation, lowercase package names, and exported CamelCase names only when symbols must cross package boundaries. Prefer small helpers with direct names such as discoverCandidates or collectTargets. Keep CLI output explicit and stable, because tests assert against usage and summary text.

Testing Guidelines

Use the standard testing package with table-driven tests where behavior varies by flag or stack rule. Name tests with the TestXxx convention and keep them next to the package under test. Use t.TempDir() for filesystem scenarios and cover both preview and apply modes when changing deletion behavior.

Commit & Pull Request Guidelines

This repository currently has no commit history, so use concise imperative commit subjects such as add gradle cleanup targets or fix preview summary output. Keep each commit focused on one logical change. Pull requests should describe the behavior change, list the commands you ran (go test ./..., go build ./...), and include sample CLI output when flags or summary lines change.

Safety & Configuration Notes

Preview mode is the default and should stay the default unless a change explicitly targets CLI semantics. When expanding cleanup rules, prefer well-known build artifacts and avoid patterns that could match source directories, dependencies the tool should traverse, or user data.