forked from ohcnetwork/care
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
59 lines (51 loc) · 1.58 KB
/
.pre-commit-config.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
exclude: 'docs|node_modules|migrations|.git|.tox'
default_stages: [commit]
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
hooks:
- id: trailing-whitespace
files: (^|/)a/.+\.(py|html|sh|css|js)$
- id: check-merge-conflict
name: check for merge conflict
description: Prevent accidentally commiting files with merge conflicts.
- id: end-of-file-fixer
name: fix end of files.
description: Ensures that a file is either empty, or ends with one newline.
- repo: https://github.com/asottile/seed-isort-config
rev: v2.1.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
args: [--line-length=120, --safe]
language_version: python3.7
- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8
language: python
types: [python]
args: ['--config=setup.cfg']
- id: pre-commit-django-migrations
name: Check django migrations
entry: python manage.py makemigrations --dry-run
language: system
types: [python]
pass_filenames: false
require_serial: true
- id: pre-commit-django-tests
name: Run Django unit tests
entry: python manage.py test --settings=config.settings.test -n
language: system
types: [python]
pass_filenames: false
require_serial: true