81 lines
3.5 KiB
YAML
81 lines
3.5 KiB
YAML
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
|
|
exclude: package-lock.json
|
|
# 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"
|
|
- repo: local
|
|
hooks:
|
|
# Hooks for the remote executor
|
|
- id: cargo-fmt-remote-executor
|
|
name: Cargo format for remote executor
|
|
language: "rust"
|
|
entry: cargo +nightly fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --config-path rustfmt.toml
|
|
pass_filenames: false
|
|
files: governance/remote_executor
|
|
- id: cargo-clippy-remote-executor
|
|
name: Cargo clippy for remote executor
|
|
language: "rust"
|
|
entry: cargo +nightly clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
|
pass_filenames: false
|
|
files: governance/remote_executor
|
|
# Hooks for the attester
|
|
- id: cargo-fmt-attester
|
|
name: Cargo format for attester
|
|
language: "rust"
|
|
entry: cargo +nightly fmt --manifest-path ./wormhole_attester/Cargo.toml --all -- --config-path rustfmt.toml
|
|
pass_filenames: false
|
|
files: wormhole_attester
|
|
- 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 \
|
|
./wormhole_attester/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings'
|
|
pass_filenames: false
|
|
files: wormhole_attester
|
|
# Hooks for cosmwasm contract
|
|
- id: cargo-fmt-cosmwasm
|
|
name: Cargo format for cosmwasm contract
|
|
language: "rust"
|
|
entry: cargo +nightly fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml
|
|
pass_filenames: false
|
|
files: target_chains/cosmwasm
|
|
- id: cargo-clippy-cosmwasm
|
|
name: Cargo clippy for cosmwasm contract
|
|
language: "rust"
|
|
entry: cargo +nightly clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
|
pass_filenames: false
|
|
files: target_chains/cosmwasm
|
|
# Hooks for Hermes
|
|
- id: cargo-fmt-hermes
|
|
name: Cargo format for Pyth Hermes
|
|
language: "rust"
|
|
entry: cargo +nightly fmt --manifest-path ./hermes/Cargo.toml --all -- --config-path rustfmt.toml
|
|
pass_filenames: false
|
|
files: hermes
|
|
# Hooks for accumulator updater contract
|
|
- id: cargo-fmt-accumulator-updater
|
|
name: Cargo format for accumulator updater contract
|
|
language: "rust"
|
|
entry: cargo +nightly fmt --manifest-path ./accumulator_updater/Cargo.toml --all -- --config-path rustfmt.toml
|
|
pass_filenames: false
|
|
files: accumulator_updater
|
|
- id: cargo-clippy-accumulator-updater
|
|
name: Cargo clippy for accumulator-updater contract
|
|
language: "rust"
|
|
entry: cargo +nightly clippy --manifest-path ./accumulator_updater/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
|
pass_filenames: false
|
|
files: accumulator_updater
|