commit f32cb5dc09b903f4e544c092afcb9c7c613ca618 Author: Roberto Alsina Date: Fri Jun 16 14:04:21 2023 -0300 Initial code diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..528cc18 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,6 @@ +- id: ameba + name: Ameba + description: Check Crystal files using ameba + entry: bin/ameba.sh + language: script + files: (\.cr)$ diff --git a/bin/ameba.sh b/bin/ameba.sh new file mode 100755 index 0000000..385fd17 --- /dev/null +++ b/bin/ameba.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if command ameba != 0; then + echo "Ameba needs to be installed" + exit 1 +fi + +ameba "$@" +exit $?