mirror of
https://github.com/ironfox-oss/IronFox.git
synced 2026-09-16 16:32:45 -04:00
Notably: - We now always provide our own copies of both `shellcheck` and `shfmt` (via `get_sources.sh`) - Set-up of the pre-commit hook is now at `lint-hook.sh`, so we can call it directly (and give users a way to set-up the hook directly if necessary) - The `lint` CI stage is now performed on Fedora instead of Alpine (like the rest of the build process), but only the minimal set-up is performed to download and set-up the necessary tools Signed-off-by: celenity <celenity@celenity.dev>
16 lines
536 B
Bash
Executable File
16 lines
536 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# IronFox pre-commit hook: lints staged shell scripts with shellcheck + shfmt.
|
|
#
|
|
# Enabled by pointing git at this directory (done automatically by
|
|
# scripts/lint-hook.sh):
|
|
# git config core.hooksPath scripts/git-hooks
|
|
#
|
|
# This is a convenience only. It can be bypassed with `git commit --no-verify`,
|
|
# and it is not installed on fresh clones until bootstrap runs — so CI (the
|
|
# `lint-scripts` job) remains the real enforcement gate.
|
|
|
|
set -euo pipefail
|
|
|
|
exec "$(git rev-parse --show-toplevel)/scripts/lint.sh" --staged
|