-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
71 lines (64 loc) · 2.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
63
64
65
66
67
68
69
70
71
repos:
- repo: local
hooks:
# Python hooks
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: bash -c 'cd projects/python-examples && poetry run black .'
language: system
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [python, pyi]
files: '^projects/python-examples/.*\.py$'
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
entry: bash -c 'cd projects/python-examples && poetry run ruff check --fix'
language: system
types: [python]
require_serial: false
additional_dependencies: []
minimum_pre_commit_version: "0"
files: "^projects/python-examples/(src|tests)/"
- id: mypy
name: mypy
description: "`mypy` will check Python types for correctness"
entry: bash -c 'cd projects/python-examples && poetry run mypy .'
language: system
types_or: [python, pyi]
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"
files: "^projects/python-examples/(src|tests)/"
- id: tealer
name: tealer
description: "Run AlgoKit `Tealer` for TEAL static analysis for Python contracts"
entry: bash -c 'cd projects/python-examples && algokit project run audit-teal'
language: system
files: '^projects/python-examples/smart_contracts/artifacts/.*\.teal$'
# TypeScript hooks
- id: prettier
name: prettier
description: "Prettier: The opinionated TypeScript code formatter"
entry: bash -c 'cd projects/typescript-examples && npm run format'
language: system
types_or: [ts, tsx]
- id: eslint
name: eslint
description: "Run 'eslint' for TypeScript linting"
entry: bash -c 'cd projects/typescript-examples && npm run lint'
language: system
types_or: [ts, tsx]
# - id: audit
# name: audit
# description: "Run AlgoKit `audit` for static analysis of TypeScript code"
# entry: bash -c 'cd projects/typescript-examples && algokit project run audit'
# language: system
# files: '^.*\.ts$'
- id: audit-teal
name: audit-teal
description: "Run AlgoKit `audit-teal` for static analysis of TEAL contracts"
entry: bash -c 'cd projects/typescript-examples && algokit project run audit-teal'
language: system
files: '^projects/typescript-examples/.*\.teal$'