Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.88 KB

File metadata and controls

33 lines (28 loc) · 1.88 KB

Repository Guidelines

Project Structure & Module Organization

  • Core Lua modules live in lua/gitsigns/ (config, handlers, utilities).
  • Repo maintenance scripts live in scripts/.
  • User-facing commands are wired in plugin/gitsigns.vim
  • Help files under doc/ get regenerated by scripts/gen_help.lua.
  • Specs plus fixtures sit in test/, relying on helpers in test/gs_helpers.lua.
  • Tooling binaries (Stylua, nvim-test, EmmyLua) are cached in deps/.

Build, Test, and Development Commands

  • make build: run Stylua over lua/, test/, and scripts/, then regenerate help files before committing.
  • make test [FILTER=pattern]: execute the functional suite via nvim-test with the default Neovim runner.
  • make doc / make doc-check: regenerate help from lua/gitsigns/config.lua and fail if docs drift.
  • make format-check or make format: lint or autoformat Lua sources.
  • make emmylua-check: run optional static analysis after fetching the analyzer.
  • Read etc/testing.md for the test matrix, test-selection guidance, and troubleshooting notes.

Coding Style & Naming Conventions

  • Lua code must have emmylua/LuaCATS type annotations
  • 2-space indentation, 100-character columns, single quotes for strings.
  • Run make format and make emmylua-check after changing any code
  • When creating simple util functions. Use Neovim's :help command to see if anything already exists.

Testing Guidelines

  • Add or update tests for risky, non-obvious, or broad changes; see etc/testing.md for details.

Commit & Pull Request Guidelines

  • Read etc/commit-message.md before creating or amending commits.
  • Read etc/pull-request.md before pushing a branch or opening a PR.
  • Ensure make build, the relevant make test-*, and make doc-check all pass locally.
  • Treat failed required local checks as blocking unless the user explicitly approves proceeding with known failures.