Open-Source Wikis

/

fzf

/

How to contribute

/

Tooling

junegunn/fzf

Tooling

The tools that build, lint, generate, and release fzf.

Build system

The Makefile is the single source of truth. Highlights:

Target What it does
make / make all Build the platform-specific binary into target/.
make install Build and copy to bin/fzf.
make build Cross-platform snapshot build via goreleaser (.goreleaser.yml).
make release Tagged release build + GitHub release upload. Requires GITHUB_TOKEN.
make test Go unit tests (src, src/algo, src/tui, src/util).
make itest Ruby integration tests through tmux.
make bench Microbenchmarks under src/.
make lint gofmt + rubocop + shell update check.
make fmt gofmt + shell/update.sh rewrite.
make generate go generate ./... (regenerates actiontype_string.go, eventtype_string.go).
make docker Builds and runs the Dockerfile.
make docker-test Same image, runs the test suite inside it.
make update go get -u && go mod tidy.

make derives VERSION and REVISION from git via git describe --abbrev=0 and git log -n 1 --pretty=format:%h --abbrev=8. Override with FZF_VERSION / FZF_REVISION.

Cross-compilation

goreleaser is configured in .goreleaser.yml for many target combinations: macOS amd64/arm64, Linux amd64/386/s390x/arm5/arm6/arm7/arm8/ppc64le/riscv64/loong64, FreeBSD/OpenBSD, Windows amd64/386. The matching binary names follow the fzf-<goos>_<goarch> pattern (see the conditional logic in Makefile).

Linters

  • gofmt -s -d src — gofmt with simplification, no actual rewriting in lint mode.
  • bundle exec rubocop — uses .rubocop.yml. The Gemfile.lock pins gem versions so CI is reproducible.
  • shell/update.sh --check — re-runs the include-splicing and asserts no diff against the on-disk per-shell scripts.
  • typos.toml + .github/workflows/typos.yml — spell-checks code and docs.
  • .github/workflows/codeql-analysis.yml — GitHub CodeQL static analysis.
  • .github/workflows/depsreview.yaml — dependency review on PRs.

Code generators

File Generator Source of truth
src/actiontype_string.go golang.org/x/tools/cmd/stringer -type=actionType actionType constants in src/options.go
src/tui/eventtype_string.go stringer -type=EventType EventType constants in src/tui/tui.go

make generate invokes go generate ./... which runs both stringer commands. The generated files have a // Code generated ... DO NOT EDIT. header — don't hand-edit them.

CI workflows

All under .github/workflows/:

File Purpose
linux.yml Ubuntu 24.04: lint, unit tests, fuzz tests, integration tests under tmux.
macos.yml macOS equivalent.
codeql-analysis.yml CodeQL static analysis.
depsreview.yaml Block PRs that introduce vulnerable deps.
typos.yml typos spell checker.
labeler.yml Auto-label PRs based on changed paths (config in .github/labeler.yml).
winget.yml Submits manifests to microsoft/winget-pkgs on release.

Shell update tooling

shell/update.sh is a small bash script that walks the bash/zsh/fish scripts under shell/ and the wrappers in bin/ (fzf-tmux, fzf-preview.sh, install, uninstall) and:

  1. Inlines blocks marked #----BEGIN INCLUDE filename / #----END INCLUDE from shell/common.sh.
  2. Optionally runs shfmt -w on the result (depending on flags).
  3. With --check, errors out if any file is out of date.

The list of scripts it processes is the BASH_SCRIPTS variable at the top of the Makefile.

Other notable files

  • Dockerfile + Gemfile + Gemfile.lock — let you reproduce the test environment in a container.
  • .tool-versionsasdf/mise pinning of Go and Ruby versions used in development.
  • .editorconfig — basic indentation rules.
  • .goreleaser.yml — release artifacts and archive layouts.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Tooling – fzf wiki | Factory