forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
88 lines (88 loc) · 3.85 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
exclude: (\.git/|\.tox/|\.venv/|build/|static/|dist/|node_modules/|kolibripip\.pex)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
- id: end-of-file-fixer
exclude: '^.+?(\.json|\.po)$'
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [
'flake8-print==5.0.0'
]
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.3.3
hooks:
- id: reorder-python-imports
language_version: python3
- repo: local
hooks:
- id: lint-frontend
name: Linting of JS, Vue, SCSS and CSS files
description: This hook handles all frontend linting for Kolibri
entry: yarn run lint-frontend:format
language: system
files: \.(js|vue|scss|css)$
- repo: local
hooks:
- id: no-auto-migrations
name: no auto-named migrations
entry: We do not allow _auto_ in migration names. Please give the migration a telling name.
language: fail
files: .*/migrations/.*_auto_.*\.py$
exclude: (?x)^(
kolibri/core/auth/migrations/0002_auto_20170608_2125\.py|
kolibri/core/auth/migrations/0003_auto_20170621_0958\.py|
kolibri/core/auth/migrations/0004_auto_20170816_1607\.py|
kolibri/core/auth/migrations/0005_auto_20170818_1203\.py|
kolibri/core/auth/migrations/0006_auto_20171206_1207\.py|
kolibri/core/auth/migrations/0007_auto_20171226_1125\.py|
kolibri/core/auth/migrations/0008_auto_20180222_1244\.py|
kolibri/core/auth/migrations/0009_auto_20180301_1123\.py|
kolibri/core/auth/migrations/0010_auto_20180320_1320\.py|
kolibri/core/auth/migrations/0013_auto_20180917_1213\.py|
kolibri/core/auth/migrations/0014_auto_20190815_1421\.py|
kolibri/core/content/migrations/0003_auto_20170607_1212\.py|
kolibri/core/content/migrations/0004_auto_20170825_1038\.py|
kolibri/core/content/migrations/0005_auto_20171009_0903\.py|
kolibri/core/content/migrations/0006_auto_20171128_1703\.py|
kolibri/core/content/migrations/0007_auto_20180212_1155\.py|
kolibri/core/content/migrations/0008_auto_20180429_1709\.py|
kolibri/core/content/migrations/0009_auto_20180410_1139\.py|
kolibri/core/content/migrations/0011_auto_20180907_1017\.py|
kolibri/core/content/migrations/0012_auto_20180910_1702\.py|
kolibri/core/content/migrations/0013_auto_20180919_1142\.py|
kolibri/core/content/migrations/0014_auto_20181218_1132\.py|
kolibri/core/content/migrations/0015_auto_20190125_1715\.py|
kolibri/core/content/migrations/0016_auto_20190124_1639\.py|
kolibri/core/content/migrations/0017_auto_20190415_1855\.py|
kolibri/core/device/migrations/0004_auto_20190306_0553\.py|
kolibri/core/device/migrations/0005_auto_20191203_0951\.py|
kolibri/core/exams/migrations/0003_auto_20190426_1015\.py|
kolibri/core/lessons/migrations/0002_auto_20180221_1115\.py|
kolibri/core/logger/migrations/0002_auto_20170518_1031\.py|
kolibri/core/logger/migrations/0003_auto_20170531_1140\.py|
kolibri/core/logger/migrations/0005_auto_20180514_1419\.py|
)$
- id: no-swappable-auth-migrations
name: No migrations with swappable auth models (settings.AUTH_USER_MODEL)
entry: settings\.AUTH_USER_MODEL
language: pygrep
files: migrations/.*\.py$
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
language_version: python3
# Always keep black as the final hook so it reformats any other reformatting.
- repo: https://github.com/python/black
rev: 20.8b1
hooks:
- id: black
additional_dependencies: ['click==8.0.4']