-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
60 lines (54 loc) · 1.5 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
60
exclude: .*migrations\/.*
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: debug-statements
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: check-ast
- id: fix-byte-order-marker
- id: check-json
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- id: no-commit-to-branch
- id: end-of-file-fixer
- id: name-tests-test
args: ['--django']
- repo: local
hooks:
- id: check-datetime-now
name: check_datetime_now
description: Prefer datetime.utcnow() ou django.utils.timezone
language: pygrep
entry: 'datetime\.now\(\)'
types: [python]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ['--profile=black', '--skip-glob=*/migrations/*']
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
exclude: ^migrations/
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
args: ['--exclude=docs/*,*migrations*', '--ignore=E501,W503',]
- repo: local
hooks:
- id: tests
name: "Running unit tests"
entry: python manage.py test
verbose: true
pass_filenames: false
language: system