-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
98 lines (88 loc) · 2.8 KB
/
.pre-commit-config.yaml
File metadata and controls
98 lines (88 loc) · 2.8 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
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
89
90
91
92
93
94
95
96
97
98
# Pre-commit hooks configuration for prompting-client
# Run `pre-commit install` to set up the git hook scripts
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
- id: check-symlinks
- id: check-added-large-files
- id: check-shebang-scripts-are-executable
exclude: '.+\.(dart|rs)'
- id: destroyed-symlinks
- id: mixed-line-ending
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: .fvmrc
# Rust checks for prompting-client
- repo: local
hooks:
- id: rust-fmt-prompting-client
name: Format Rust code (prompting-client)
entry: bash -c 'cd prompting-client && cargo fmt --all -- --check'
language: system
files: ^prompting-client/.*\.rs$
pass_filenames: false
- id: rust-clippy-prompting-client
name: Lint Rust code (prompting-client)
entry: bash -c 'cd prompting-client && cargo clippy --all-features -- -D warnings'
language: system
files: ^prompting-client/.*\.rs$
pass_filenames: false
# Rust checks for mock-server
- repo: local
hooks:
- id: rust-fmt-mock-server
name: Format Rust code (mock-server)
entry: bash -c 'cd mock-server && cargo fmt --all -- --check'
language: system
files: ^mock-server/.*\.rs$
pass_filenames: false
- id: rust-clippy-mock-server
name: Lint Rust code (mock-server)
entry: bash -c 'cd mock-server && cargo clippy -- -D warnings'
language: system
files: ^mock-server/.*\.rs$
pass_filenames: false
# Flutter/Dart checks using Melos
- repo: local
hooks:
- id: flutter-analyze
name: Analyze Flutter code
entry: bash -c 'melos analyze --fatal-infos'
language: system
files: ^flutter/.*\.dart$
pass_filenames: false
- id: flutter-format
name: Format Flutter code
entry: bash -c 'melos run format:exclude'
language: system
files: ^flutter/.*\.dart$
pass_filenames: false
# Protocol Buffers
- repo: https://github.com/bufbuild/buf
rev: v1.28.1
hooks:
- id: buf-format
files: ^protos/.*\.proto$
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint
args: ["--fix"]
files: \.(md|markdown)$
# YAML linting
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
hooks:
- id: yamllint
args: ["-d", "relaxed"]