File: pre-commit

package info (click to toggle)
haskell-futhark 0.25.32-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,236 kB
  • sloc: haskell: 100,484; ansic: 12,100; python: 3,440; yacc: 785; sh: 561; javascript: 558; lisp: 399; makefile: 277
file content (26 lines) | stat: -rwxr-xr-x 567 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
#
# Futhark pre-commit hook for quality-checking the commit.
#
# This hook checks the following:
#
#   * Trailing whitespace.
#   * Runs hlint.
#   * Tries to compile Futhark.
#
# It also yells at you to run the test suite, although it doesn't do
# it by itself.

initial=c508f9f531929f6bed868243334417ef6c840cb4 # Hash of initial commit.

fail() {
    echo "Aborting commit due to verification errors."
    echo "If you disagree, use git commit --no-verify."
    exit 1
}

echo Quality-checking commit...
echo

make check-commit || fail
make build || fail