From c10b28dbc054ac1ea6b1ce2638881032f818cc6a Mon Sep 17 00:00:00 2001 From: Guillaume ARM Date: Sun, 31 May 2026 02:48:19 +0200 Subject: [PATCH] chore: add git hook installer --- Justfile | 10 ++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Justfile b/Justfile index 939f6a4..feb8b47 100644 --- a/Justfile +++ b/Justfile @@ -5,6 +5,16 @@ default: @just --list +# Install local development tooling. +install: install-git-hooks + +# Install Git hooks for this repository. +install-git-hooks: + @mkdir -p .git/hooks + @printf '%s\n' '#!/bin/sh' '' 'just check' > .git/hooks/pre-push + @chmod +x .git/hooks/pre-push + @printf '%s\n' 'Installed .git/hooks/pre-push' + # Lint all Lua source with luacheck. check: luacheck . diff --git a/README.md b/README.md index 6abac5d..55269ef 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,19 @@ # Trap's ComputerCraft APIs +## Development + +Requirements: +- `just` +- `luacheck` + +After cloning the repository, run: + +``` +just install +``` + +This installs the local Git hooks, including a pre-push hook that runs `just check`. + ## Installation ``` wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua