-
Notifications
You must be signed in to change notification settings - Fork 332
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
179 lines (179 loc) · 6.47 KB
/
.pre-commit-config.yaml
File metadata and controls
179 lines (179 loc) · 6.47 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: >
(?x)^(
target_chains/sui/vendor/|
patches/|
apps/hermes/server/proto/vendor/
)
- id: end-of-file-fixer
exclude: >
(?x)^(
target_chains/sui/vendor/|
patches/|
apps/api-reference/public/currency-icons/|
apps/hermes/server/proto/vendor/
)
- id: check-added-large-files
exclude: >
(?x)^(
target_chains/sui/vendor/|
patches/
)
- repo: local
hooks:
- id: turbo-fix-format
name: Run turbo fix on packages
language: system
entry: sh -c 'pnpm turbo fix'
pass_filenames: false
# Hooks for the remote executor
- id: cargo-fmt-remote-executor
name: Cargo format for remote executor
language: "rust"
entry: cd governance/remote_executor && cargo fmt
pass_filenames: false
files: governance/remote_executor
- id: cargo-clippy-remote-executor
name: Cargo clippy for remote executor
language: "rust"
entry: cd governance/remote_executor && cargo clippy --all-targets -- --deny warnings
pass_filenames: false
files: governance/remote_executor
# Hooks for cosmwasm contract
- id: cargo-fmt-cosmwasm
name: Cargo format for cosmwasm contract
language: "rust"
entry: cd target_chains/cosmwasm && cargo fmt
pass_filenames: false
files: target_chains/cosmwasm
- id: cargo-clippy-cosmwasm
name: Cargo clippy for cosmwasm contract
language: "rust"
entry: cd target_chains/cosmwasm && cargo clippy --all-targets -- --deny warnings
pass_filenames: false
files: target_chains/cosmwasm
# Hooks for Hermes
- id: cargo-fmt-hermes
name: Cargo format for Hermes
language: "rust"
entry: cd apps/hermes/server && cargo fmt
pass_filenames: false
files: apps/hermes
- id: cargo-clippy-hermes
name: Cargo clippy for Hermes
language: "rust"
entry: cd apps/hermes/server && cargo clippy --all-targets -- --deny warnings
pass_filenames: false
files: apps/hermes
# Hooks for Quorum
- id: cargo-fmt-quorum
name: Cargo format for Quorum
language: "rust"
entry: cargo fmt -p quorum
pass_filenames: false
files: apps/quorum
- id: cargo-clippy-quorum
name: Cargo clippy for Quorum
language: "rust"
entry: cargo clippy -p quorum --all-targets -- --deny warnings
pass_filenames: false
files: apps/quorum
# Hooks for Fortuna
- id: cargo-fmt-fortuna
name: Cargo format for Fortuna
language: "rust"
entry: cargo fmt -p fortuna
pass_filenames: false
files: apps/fortuna
- id: cargo-sqlx-fortuna
name: Cargo sqlx prepare check for Fortuna
language: "script"
entry: ./apps/fortuna/check-sqlx.sh
pass_filenames: false
files: apps/fortuna
- id: cargo-clippy-fortuna
name: Cargo clippy for Fortuna
language: "rust"
entry: cargo clippy -p fortuna --all-targets -- --deny warnings
pass_filenames: false
files: apps/fortuna
# Hooks for message buffer contract
- id: cargo-fmt-message-buffer
name: Cargo format for message buffer contract
language: "rust"
entry: cd pythnet/message_buffer && cargo fmt
pass_filenames: false
files: pythnet/message_buffer
- id: cargo-clippy-message-buffer
name: Cargo clippy for message buffer contract
language: "rust"
entry: cd pythnet/message_buffer && cargo clippy --all-targets -- --deny warnings
pass_filenames: false
files: pythnet/message_buffer
# Hooks for pythnet_sdk
- id: cargo-fmt-pythnet-sdk
name: Cargo format for pythnet SDK
language: "rust"
entry: cargo fmt -p pythnet-sdk
pass_filenames: false
files: pythnet/pythnet_sdk
- id: cargo-clippy-pythnet-sdk
name: Cargo clippy for pythnet SDK
language: "rust"
entry: cargo clippy -p pythnet-sdk --all-targets -- --deny warnings
pass_filenames: false
files: pythnet/pythnet_sdk
# Hooks for solana receiver contract
- id: cargo-fmt-pyth-solana-receiver
name: Cargo format for solana target chain contract
language: "rust"
entry: cd target_chains/solana && cargo fmt
pass_filenames: false
files: target_chains/solana
- id: cargo-clippy-pyth-solana-receiver
name: Cargo clippy for solana target chain contract
language: "rust"
entry: cd target_chains/solana/ && cargo clippy --all-targets -- --deny warnings
pass_filenames: false
files: target_chains/solana
# Hooks for Lazer
- id: cargo-fmt-lazer
name: Cargo format for Lazer
language: "rust"
entry: cargo fmt -p pyth-lazer-protocol -p pyth-lazer-client -p pyth-lazer-publisher-sdk
pass_filenames: false
files: lazer
- id: cargo-clippy-lazer
name: Cargo clippy for Lazer
language: "rust"
entry: cargo clippy -p pyth-lazer-protocol -p pyth-lazer-client -p pyth-lazer-publisher-sdk --all-targets -- --deny warnings
pass_filenames: false
files: lazer
- id: cargo-fmt-stylus-sdk
name: Cargo format for Stylus SDK
language: "rust"
entry: cd target_chains/ethereum/sdk/stylus && cargo fmt
pass_filenames: false
files: target_chains/ethereum/sdk/stylus
- id: cargo-clippy-stylus-sdk
name: Cargo clippy for Stylus SDK
language: "rust"
entry: cd target_chains/ethereum/sdk/stylus && cargo clippy --all-targets -- --deny warnings
pass_filenames: false
files: target_chains/ethereum/sdk/stylus
- id: fmt-aptos-lazer
name: Format Aptos Lazer contracts
language: system
entry: aptos move fmt --package-path lazer/contracts/aptos
pass_filenames: false
files: lazer/contracts/aptos
- id: lint-aptos-lazer
name: Lint Aptos Lazer contracts
language: system
entry: aptos move lint --package-dir lazer/contracts/aptos --dev
pass_filenames: false
files: lazer/contracts/aptos