-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
62 lines (54 loc) · 1.48 KB
/
.pre-commit-config.yaml
File metadata and controls
62 lines (54 loc) · 1.48 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
56
57
58
59
60
61
62
default_language_version:
python: python3
repos:
# Generic hygiene hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: '\.swift$' # keep xcode indents
# Language-specific formatters/linters
- repo: local
hooks:
# ----- Version sync -----
- id: sync-sdk-version
name: sync SDK version to plist
entry: scripts/sync_version.sh
language: script
files: ^pubspec\.yaml$
pass_filenames: false
# ----- Dart / Flutter -----
- id: dart-fix
name: dart fix
entry: dart fix --apply
language: system
files: \.dart$
pass_filenames: false
- id: dart-format
name: dart format
entry: dart format
language: system
files: \.dart$
- id: flutter-analyze
name: flutter analyze
entry: flutter analyze --no-fatal-infos
language: system
pass_filenames: false
# ----- Kotlin (Android) -----
- id: ktlint-format
name: ktlint format (Kotlin)
entry: ktlint -F
language: system
files: \.kt$
# ----- Swift (iOS) -----
- id: swiftformat
name: swiftformat
entry: swiftformat
language: system
files: \.swift$
- id: swiftlint
name: swiftlint
entry: swiftlint lint --strict
language: system
files: \.swift$