Skip to content

Latest commit

 

History

History
97 lines (71 loc) · 3.63 KB

File metadata and controls

97 lines (71 loc) · 3.63 KB

Development Guide

This page is for contributor workflows. Keep the repository root README for installation and product usage, and use docs/ for deeper operational material.

Common Local Commands

make fmt
make lint
make test
make test-review-ui
make preview-review-ui
make check
make ci
make build
make release VERSION=v0.1.0

What make check Runs

make check is the main local developer gate. It currently:

  • validates Go file layout
  • checks gofmt
  • runs go vet
  • runs go test ./...

make deploy remains an alias for make release.

Review UI Testing

Use make test-review-ui when you are changing the interactive dataset review experience. It runs the focused CLI tests that cover:

  • line-oriented cleanr dataset review -interactive
  • the Bubble Tea review model and structured terminal layout

Use make preview-review-ui when you want to launch the live review UI locally against a canned dataset and inspect the terminal experience directly.

If your local Homebrew Go toolchain lives somewhere other than /opt/homebrew/opt/go/libexec, override:

make test-review-ui UI_GOROOT=/path/to/go UI_GOPATH=$HOME/go
make preview-review-ui UI_GOROOT=/path/to/go UI_GOPATH=$HOME/go

What make ci Runs

make ci is the local parity command for .github/workflows/ci.yml. It runs:

  • changed-file test-presence validation against your local base ref
  • gofmt drift checks
  • go vet
  • gocyclo with the repository complexity budget
  • scc to flag changed non-test Go files that grow past 400 code lines
  • golangci-lint with funlen, gocognit, and maintidx for new maintainability issues
  • go test ./... on the current OS
  • the Linux amd64 snapshot build
  • the internal coverage gate
  • govulncheck
  • semgrep scan --config auto --baseline-commit <merge-base> --error
  • doc review and DCO checks when the base branch is develop

Local behavior differs from hosted GitHub Actions in two places:

  • the test suite runs only on your current OS instead of the GitHub Ubuntu and macOS matrix
  • PR-only checks use a local Git base ref, resolved from CLEANR_CI_BASE_REF, PR_BASE_REF, your upstream branch, or common origin/* defaults
  • the gocyclo gate compares changed files against the base ref and fails only on new or worsened complexity violations, so existing baseline debt on the target branch does not block local pre-commit checks
  • the scc gate compares changed files against the base ref and fails only on new or worsened god-file size regressions
  • the golangci-lint gate uses .golangci.yml and reports only new issues against the merge-base of your base ref and HEAD
  • the govulncheck step is skipped with a warning when the scanner cannot be installed for your local Go toolchain
  • the semgrep step is skipped with a warning when the semgrep binary is not installed locally

Set CI_BASE_REF=<ref> when you want to force the comparison target, for example make ci CI_BASE_REF=origin/develop.

Local Build Outputs

  • make build writes the CLI binary to dist/cleanr
  • make release VERSION=vX.Y.Z writes release artifacts to dist/releases/<version>/
  • make homebrew-formula ... writes dist/releases/<version>/cleanr.rb

Release and Packaging

The detailed release pipeline now lives in release-automation.md. Use that page for:

  • Release Please metadata
  • branch-driven prerelease automation
  • tagged GitHub Releases
  • GHCR publishing
  • Homebrew tap sync

Related Docs