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-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 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-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 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-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-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 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-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 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
|
2024-03-27 05:55:26 -07:00
|
|
|
name: Cargo format for Hermes
|
|
|
|
language: "rust"
|
2024-04-15 02:45:22 -07:00
|
|
|
entry: cargo +nightly-2024-03-26 fmt --manifest-path ./apps/hermes/Cargo.toml --all -- --config-path rustfmt.toml
|
2024-03-27 05:55:26 -07:00
|
|
|
pass_filenames: false
|
2024-04-15 02:45:22 -07:00
|
|
|
files: apps/hermes
|
2024-03-27 05:55:26 -07:00
|
|
|
- id: cargo-clippy-hermes
|
|
|
|
name: Cargo clippy for Hermes
|
2023-03-15 10:18:05 -07:00
|
|
|
language: "rust"
|
2024-04-15 02:45:22 -07:00
|
|
|
entry: cargo +nightly-2024-03-26 clippy --manifest-path ./apps/hermes/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
2023-03-15 10:18:05 -07:00
|
|
|
pass_filenames: false
|
2024-04-15 02:45:22 -07:00
|
|
|
files: apps/hermes
|
2023-10-20 09:41:05 -07:00
|
|
|
# Hooks for Fortuna
|
|
|
|
- id: cargo-fmt-fortuna
|
|
|
|
name: Cargo format for Fortuna
|
2023-10-18 14:35:25 -07:00
|
|
|
language: "rust"
|
2024-04-17 06:16:41 -07:00
|
|
|
entry: cargo +nightly-2023-07-23 fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --config-path rustfmt.toml
|
2023-10-18 14:35:25 -07:00
|
|
|
pass_filenames: false
|
2024-04-17 06:16:41 -07:00
|
|
|
files: apps/fortuna
|
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-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 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-05-22 10:31:54 -07:00
|
|
|
files: pythnet/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-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 clippy --manifest-path ./pythnet/message_buffer/Cargo.toml --tests --fix --allow-dirty --allow-staged --features test-bpf -- -D warnings
|
2023-03-29 09:56:03 -07:00
|
|
|
pass_filenames: false
|
2023-05-22 10:31:54 -07:00
|
|
|
files: pythnet/message_buffer
|
|
|
|
# Hooks for pythnet_sdk
|
|
|
|
- id: cargo-fmt-pythnet-sdk
|
|
|
|
name: Cargo format for pythnet SDK
|
|
|
|
language: "rust"
|
2024-01-08 10:09:31 -08:00
|
|
|
entry: cargo +nightly-2023-07-23 fmt --manifest-path ./pythnet/pythnet_sdk/Cargo.toml --all -- --config-path rustfmt.toml
|
2023-05-22 10:31:54 -07:00
|
|
|
pass_filenames: false
|
|
|
|
files: pythnet/pythnet_sdk
|
|
|
|
- id: cargo-clippy-pythnet-sdk
|
|
|
|
name: Cargo clippy for pythnet SDK
|
|
|
|
language: "rust"
|
2024-01-08 10:09:31 -08:00
|
|
|
entry: cargo +nightly-2023-07-23 clippy --manifest-path ./pythnet/pythnet_sdk/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
2023-05-22 10:31:54 -07:00
|
|
|
pass_filenames: false
|
|
|
|
files: pythnet/pythnet_sdk
|
2023-04-09 19:38:29 -07:00
|
|
|
# Hooks for solana receiver contract
|
2023-11-30 13:04:41 -08:00
|
|
|
- id: cargo-fmt-pyth-solana-receiver
|
2023-04-09 19:38:29 -07:00
|
|
|
name: Cargo format for solana target chain contract
|
|
|
|
language: "rust"
|
2023-06-06 04:15:32 -07:00
|
|
|
entry: cargo +nightly-2023-03-01 fmt --manifest-path ./target_chains/solana/Cargo.toml --all -- --config-path rustfmt.toml
|
2023-04-09 19:38:29 -07:00
|
|
|
pass_filenames: false
|
|
|
|
files: target_chains/solana
|
2023-11-30 13:04:41 -08:00
|
|
|
- id: cargo-clippy-pyth-solana-receiver
|
2023-04-09 19:38:29 -07:00
|
|
|
name: Cargo clippy for solana target chain contract
|
|
|
|
language: "rust"
|
2023-12-17 20:46:45 -08:00
|
|
|
entry: cargo +nightly-2023-03-01 clippy --manifest-path ./target_chains/solana/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
2023-04-09 19:38:29 -07:00
|
|
|
pass_filenames: false
|
|
|
|
files: target_chains/solana
|
2024-03-15 12:08:48 -07:00
|
|
|
# For express relay python files
|
2024-03-21 08:42:31 -07:00
|
|
|
- id: poetry-install
|
|
|
|
name: poetry install
|
|
|
|
entry: poetry -C express_relay/sdk/python/express_relay install
|
|
|
|
pass_filenames: false
|
|
|
|
files: express_relay/sdk/python/express_relay
|
|
|
|
language: "system"
|
2024-03-15 12:08:48 -07:00
|
|
|
- id: black
|
|
|
|
name: black
|
2024-03-21 08:42:31 -07:00
|
|
|
entry: poetry -C express_relay/sdk/python/express_relay run black
|
|
|
|
files: express_relay/sdk/python/express_relay
|
2024-03-15 12:08:48 -07:00
|
|
|
language: "system"
|
|
|
|
- id: pyflakes
|
|
|
|
name: pyflakes
|
2024-03-21 08:42:31 -07:00
|
|
|
entry: poetry -C express_relay/sdk/python/express_relay run pyflakes
|
|
|
|
files: express_relay/sdk/python/express_relay
|
2024-03-15 12:08:48 -07:00
|
|
|
language: "system"
|
|
|
|
- id: mypy
|
|
|
|
name: mypy
|
2024-03-21 08:42:31 -07:00
|
|
|
entry: poetry -C express_relay/sdk/python/express_relay run mypy
|
|
|
|
files: express_relay/sdk/python/express_relay
|
2024-03-15 12:08:48 -07:00
|
|
|
language: "system"
|