Commit b002306f by Thomas Barabosch Committed by Enkelmann

Ocp indent (#17)

* Added pre-commit hook for ocp-indent

* Test for one file
parent 095130c0
#!/bin/bash
pat=".*\.ml(i|l|y)?$"
if [[ $1 =~ $pat ]];
then
s1=$(cat $1)
s2=$(ocp-indent $1)
if [ "$s1" == "$s2" ]
then
exit 0
else
echo "$1: ocp-indent"
exit 1
fi
fi
exit 0
JaneStreet
match_clause = 4
\ No newline at end of file
......@@ -35,3 +35,11 @@ repos:
rev: v0.1.0
hooks:
- id: dockerfilelint
- repo: local
hooks:
- id: ocp-indent
name: ocp-indent
language: system
verbose: true
entry: .hooks/ocp-indent.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment