Skip to content

Latest commit

 

History

History
93 lines (66 loc) · 3.81 KB

File metadata and controls

93 lines (66 loc) · 3.81 KB

Contributing to Cowardly

Thank you for your interest in contributing. This document explains how to get set up, run checks, and open a pull request.

Requirements

  • To run the app: macOS (cowardly is macOS-only at runtime).
  • To build, test, and lint: either use the dev container (recommended on Linux/WSL or if you prefer a container) or install locally:
    • Go 1.25.6+Install Go
    • Optional for local checks: golangci-lint, prettier, yamllint (CI will run these on your PR if you don’t have them).

Getting started

Option A — Dev container (macOS, Linux, WSL)

  1. Fork the repo on GitHub, clone your fork, then open it in VS Code or Cursor.
  2. Install the Dev Containers extension.
  3. Run “Reopen in Container” from the command palette. The container provides Go, make, Prettier, yamllint, and golangci-lint.
  4. In the container terminal, run make build and make test to confirm everything works. (The TUI itself only runs on macOS; use the host if you need to test it.)

Option B — Local (macOS)

  1. Fork the repository on GitHub, then clone your fork:

    git clone https://github.com/YOUR_USERNAME/cowardly.git
    cd cowardly
  2. Build and run to confirm everything works:

    make build
    make run

See README.md for usage and docs/SETUP.md for repo setup (Renovate, Gitleaks, etc.).

Making changes

  1. Create a branch for your change:

    git checkout -b feat/my-feature
  2. Make your edits. Some pointers:

  3. Run checks before opening a PR:

    make test
    make lint
    make format-check
    make lint-yaml

    Fix any failures so CI passes.

  4. Commit and push to your fork, then open a pull request with a short description of the change.

Development commands

Command Description
make build Build binary to bin/cowardly
make run Build and run the TUI
make dev Clean, then build and run
make test Run tests
make lint Run golangci-lint
make fmt Format Go code and tidy modules
make format Format Markdown/YAML/JSON with Prettier
make format-check Check formatting (CI)
make lint-yaml Run yamllint on YAML files

Pull request process

  • Keep PRs focused; prefer smaller changes over large ones.
  • For bugs or new features, opening an issue first is welcome (not required).
  • CI runs on every push and PR: gitleaks, prettier (format check), yaml-lint. All must pass before merge.
  • Maintainers will review and may request changes.

Further reading