2022-09-20 11:55:01 -07:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
rev: v3.2.0
|
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: check-added-large-files
|
2023-01-10 12:02:14 -08:00
|
|
|
exclude: package-lock.json
|
2022-11-24 05:14:29 -08:00
|
|
|
# Hook to format many type of files in the repo
|
|
|
|
# including solidity contracts.
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
|
|
rev: "v2.7.1"
|
|
|
|
hooks:
|
|
|
|
- id: prettier
|
|
|
|
additional_dependencies:
|
|
|
|
- "prettier@2.7.1"
|
|
|
|
- "prettier-plugin-solidity@1.0.0-rc.1"
|
2022-09-20 11:55:01 -07:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
2022-11-24 05:14:29 -08:00
|
|
|
# Hooks for the remote executor
|
2022-11-28 09:22:48 -08:00
|
|
|
- id: cargo-fmt-remote-executor
|
|
|
|
name: Cargo format for remote executor
|
2022-09-20 11:55:01 -07:00
|
|
|
language: "rust"
|
2023-01-24 10:06:22 -08:00
|
|
|
entry: cargo +nightly fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --config-path rustfmt.toml
|
2022-09-20 11:55:01 -07:00
|
|
|
pass_filenames: false
|
2023-01-24 10:06:22 -08:00
|
|
|
files: governance/remote_executor
|
2022-11-28 09:22:48 -08:00
|
|
|
- id: cargo-clippy-remote-executor
|
|
|
|
name: Cargo clippy for remote executor
|
2022-09-20 11:55:01 -07:00
|
|
|
language: "rust"
|
2023-01-24 10:06:22 -08:00
|
|
|
entry: cargo +nightly clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
2022-09-20 11:55:01 -07:00
|
|
|
pass_filenames: false
|
2023-01-24 10:06:22 -08:00
|
|
|
files: governance/remote_executor
|
2022-11-24 05:14:29 -08:00
|
|
|
# Hooks for the attester
|
2022-11-28 09:22:48 -08:00
|
|
|
- id: cargo-fmt-attester
|
|
|
|
name: Cargo format for attester
|
2022-11-24 05:14:29 -08:00
|
|
|
language: "rust"
|
2023-01-24 10:06:22 -08:00
|
|
|
entry: cargo +nightly fmt --manifest-path ./wormhole_attester/Cargo.toml --all -- --config-path rustfmt.toml
|
2022-11-24 05:14:29 -08:00
|
|
|
pass_filenames: false
|
2023-01-24 10:06:22 -08:00
|
|
|
files: wormhole_attester
|
2022-11-28 09:22:48 -08:00
|
|
|
- id: cargo-clippy-attester
|
|
|
|
name: Cargo clippy for attester
|
|
|
|
language: "rust"
|
|
|
|
entry: |
|
|
|
|
bash -c 'EMITTER_ADDRESS=0 BRIDGE_ADDRESS=0 cargo +nightly clippy --manifest-path \
|
2023-01-24 10:06:22 -08:00
|
|
|
./wormhole_attester/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings'
|
2022-11-28 09:22:48 -08:00
|
|
|
pass_filenames: false
|
2023-01-24 10:06:22 -08:00
|
|
|
files: wormhole_attester
|
2022-11-25 02:16:58 -08:00
|
|
|
# Hooks for cosmwasm contract
|
2022-11-28 09:22:48 -08:00
|
|
|
- id: cargo-fmt-cosmwasm
|
|
|
|
name: Cargo format for cosmwasm contract
|
2022-11-25 02:16:58 -08:00
|
|
|
language: "rust"
|
2023-01-24 10:06:22 -08:00
|
|
|
entry: cargo +nightly fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml
|
2022-11-25 02:16:58 -08:00
|
|
|
pass_filenames: false
|
2023-01-24 10:06:22 -08:00
|
|
|
files: target_chains/cosmwasm
|
2022-11-28 09:22:48 -08:00
|
|
|
- id: cargo-clippy-cosmwasm
|
|
|
|
name: Cargo clippy for cosmwasm contract
|
|
|
|
language: "rust"
|
2023-01-24 10:06:22 -08:00
|
|
|
entry: cargo +nightly clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
2022-11-28 09:22:48 -08:00
|
|
|
pass_filenames: false
|
2023-01-24 10:06:22 -08:00
|
|
|
files: target_chains/cosmwasm
|
2023-03-30 05:27:02 -07:00
|
|
|
# Hooks for Hermes
|
|
|
|
- id: cargo-fmt-hermes
|
|
|
|
name: Cargo format for Pyth Hermes
|
2023-03-15 10:18:05 -07:00
|
|
|
language: "rust"
|
2023-03-30 05:27:02 -07:00
|
|
|
entry: cargo +nightly fmt --manifest-path ./hermes/Cargo.toml --all -- --config-path rustfmt.toml
|
2023-03-15 10:18:05 -07:00
|
|
|
pass_filenames: false
|
2023-03-30 05:27:02 -07:00
|
|
|
files: hermes
|
2023-04-21 11:56:51 -07:00
|
|
|
# Hooks for message buffer contract
|
|
|
|
- id: cargo-fmt-message-buffer
|
|
|
|
name: Cargo format for message buffer contract
|
2023-03-29 09:56:03 -07:00
|
|
|
language: "rust"
|
2023-05-04 10:47:35 -07:00
|
|
|
entry: cargo +nightly fmt --manifest-path ./pythnet/message_buffer/Cargo.toml --all -- --config-path rustfmt.toml
|
2023-03-29 09:56:03 -07:00
|
|
|
pass_filenames: false
|
2023-04-25 08:45:16 -07:00
|
|
|
files: message_buffer
|
2023-04-21 11:56:51 -07:00
|
|
|
- id: cargo-clippy-message-buffer
|
|
|
|
name: Cargo clippy for message buffer contract
|
2023-03-29 09:56:03 -07:00
|
|
|
language: "rust"
|
2023-05-04 10:47:35 -07:00
|
|
|
entry: cargo +nightly clippy --manifest-path ./pythnet/message_buffer/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
2023-03-29 09:56:03 -07:00
|
|
|
pass_filenames: false
|
2023-04-25 08:45:16 -07:00
|
|
|
files: message_buffer
|
2023-04-09 19:38:29 -07:00
|
|
|
# Hooks for solana receiver contract
|
|
|
|
- id: cargo-fmt-solana-receiver
|
|
|
|
name: Cargo format for solana target chain contract
|
|
|
|
language: "rust"
|
|
|
|
entry: cargo +nightly fmt --manifest-path ./target_chains/solana/Cargo.toml --all -- --config-path rustfmt.toml
|
|
|
|
pass_filenames: false
|
|
|
|
files: target_chains/solana
|
|
|
|
- id: cargo-clippy-solana-receiver
|
|
|
|
name: Cargo clippy for solana target chain contract
|
|
|
|
language: "rust"
|
|
|
|
entry: cargo +nightly clippy --manifest-path ./target_chains/solana/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
|
|
|
pass_filenames: false
|
|
|
|
files: target_chains/solana
|