From 8223281252967d86e4a12a3f1285272808e10fa5 Mon Sep 17 00:00:00 2001 From: Charles-Axel Dein Date: Tue, 21 Jul 2020 09:31:05 +0200 Subject: [PATCH] Add pre-commit --- .git_hooks/install_hooks.sh | 3 --- .git_hooks/pre-commit | 3 --- .pre-commit-config.yaml | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) delete mode 100755 .git_hooks/install_hooks.sh delete mode 100755 .git_hooks/pre-commit create mode 100644 .pre-commit-config.yaml diff --git a/.git_hooks/install_hooks.sh b/.git_hooks/install_hooks.sh deleted file mode 100755 index 1bbc7e6..0000000 --- a/.git_hooks/install_hooks.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -ln -s ./../../.git_hooks/pre-commit .git/hooks/pre-commit diff --git a/.git_hooks/pre-commit b/.git_hooks/pre-commit deleted file mode 100755 index 287c1a7..0000000 --- a/.git_hooks/pre-commit +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -doctoc --title "# Table of Contents" . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d8a60cb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace +- repo: https://github.com/psf/black + rev: 19.3b0 + hooks: + - id: black +- repo: https://github.com/thlorenz/doctoc + rev: v1.4.0 + hooks: + - id: doctoc