Browse Source

Added git hooks.

master
Franco Masotti 1 year ago
parent
commit
23059dc06b
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 1
      .gitignore
  2. 16
      .pre-commit-config.yaml
  3. 15
      Makefile
  4. 12
      Pipfile

1
.gitignore vendored

@ -0,0 +1 @@
/Pipfile.lock

16
.pre-commit-config.yaml

@ -0,0 +1,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/frnmst/md-toc
rev: '7.0.5' # or a specific git tag from md-toc
hooks:
- id: md-toc
args: [-p, 'github', '-l6'] # CLI options

15
Makefile

@ -0,0 +1,15 @@
#!/usr/bin/make -f
# Copyright (c) 2017 Franco Masotti.
# See LICENSE file for details.
default: install-dev
install-dev:
pipenv install --dev
pipenv run pre-commit install
uninstall-dev:
pipenv --rm
.PHONY: default install-dev uninstall-dev

12
Pipfile

@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
pre-commit = '~=2.9'
[requires]
python_version = "3.9"