-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
62 lines (53 loc) · 1.56 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
exclude : '.*(\.(asset|meta|mat|unity|prefab))'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
files : .*(\.py|\.cs)
#exclude : '(isort\.cfg|*.(\.svg))' # some weird conflict that is never resolved...
- id: trailing-whitespace
# python tests / linting etc
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
name: black
language_version: python3.8
types: [python]
stages: [commit]
- repo: local
hooks:
- id: lint # python linting
name: lint
entry: python worldofbugs/worldofbugs/test/lint.py
language: system
pass_filenames: false
log_file: logs/lint.log
# TODO it would be nice to have a report here...
- id : unit-test
name : unit-test
entry : coverage run -m unittest discover -s worldofbugs/worldofbugs/test/unit -v
language: system
pass_filenames: false
log_file : logs/unit-test.log
# c-sharp code formatting
- id: astyle
name: astyle
entry: bash worldofbugs/worldofbugs/test/scripts/astyle.sh
language: system
pass_filenames: false
log_file: logs/astyle.log
# run
- id : unity-runtime-test
name : unity-runtime-test
entry : python worldofbugs/worldofbugs/test/unity-test.py
language : system
pass_filenames : false
log_file: logs/unity-test.log