-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (46 loc) · 1.28 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (46 loc) · 1.28 KB
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
# Setting up a Python environment and prek (pre-commit hooks).
# >>> python3 -m venv .venv
# Unix or MacOS:
# >>> source .venv/bin/activate
# Windows:
# >>> .venv\Scripts\activate.bat
# >>> pip install --upgrade pip
# >>> pip install prek
# >>> prek install
# >>> prek run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
files: \.kt$
- id: end-of-file-fixer
files: \.kt$
- id: check-yaml
- repo: https://github.com/to-sta/spdx-checker-pre-commit
rev: 0.1.7
hooks:
- id: spdx-license-checker
name: run spdx-checker license check
args: [-l, GPL-3.0-or-later, --fix, --continue-on-error]
types_or: [kotlin]
- repo: local
hooks:
- id: formatKotlin
name: formatKotlin
entry: sh -c './gradlew formatKotlin'
language: system
types: [kotlin]
files: \.kt$
- id: ktlint
name: ktlint
entry: sh -c './gradlew lintKotlin'
language: system
types: [kotlin]
files: \.kt$
- id: detekt
name: detekt
entry: sh -c './gradlew detekt'
language: system
types: [kotlin]
files: \.kt$