From 1a774c1c6093dcc54cc8871be5a115cf4072aba5 Mon Sep 17 00:00:00 2001 From: sheya Date: Thu, 2 Jul 2026 16:56:08 +0100 Subject: [PATCH] dev: add pre-commit hooks for shellcheck and golangci-lint --- .pre-commit-config.yaml | 10 ++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..4c0615f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + + - repo: https://github.com/golangci/golangci-lint + rev: v2.12.2 + hooks: + - id: golangci-lint-full diff --git a/README.md b/README.md index 448a7f1..00dfdac 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,20 @@ Build artifacts are written to `bin/`. HYPERSTACK_URL="http://localhost:8000" .tools/bin/task run ``` +## Development + +Install [pre-commit](https://pre-commit.com/) then run: + +```bash +pre-commit install +``` + +Hooks run automatically on `git commit`. To run them manually: + +```bash +pre-commit run --all-files +``` + ## Scripts The `scripts/` directory is part of the public release because it shows how the