From 04ae2726179b6d83e9be8d05a39ee38e2b30a1a3 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Thu, 12 Sep 2019 18:52:24 +0200
Subject: [PATCH] Add pre-push

---
 pre-push | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100755 pre-push

diff --git a/pre-push b/pre-push
new file mode 100755
index 0000000..7acebc2
--- /dev/null
+++ b/pre-push
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Checks run before every push
+# has to be copied to .git/hooks
+
+echo "Running pre-push hook"
+echo "Running flake8 check"
+flake8 --append-config=.flake8 src
+
+# $? stores exit value of the last command
+if [ $? -ne 0 ]; then
+ echo "flake8 failed"
+ exit 1
+fi
+
-- 
GitLab