Files
system76-embedded-controller/scripts/hooks/pre-commit.sh
Tim Crawford 58f9ed4051 Run lints at pre-commit
Install a hook to run lints at pre-commit to force issues to be fixed
during development.

This introduces a 5-10 second delay when committing due to how slow
clang-format is.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00

8 lines
146 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only
make lint 2>/dev/null || {
echo -e "\nissues found, not committing"
exit 1
}