.pre-commit-config.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. repos:
  2. - repo: https://github.com/pre-commit/pre-commit-hooks
  3. rev: v3.2.0
  4. hooks:
  5. - id: trailing-whitespace
  6. - id: end-of-file-fixer
  7. - id: check-added-large-files
  8. # Hook to format many type of files in the repo
  9. # including solidity contracts.
  10. - repo: https://github.com/pre-commit/mirrors-prettier
  11. rev: "v2.7.1"
  12. hooks:
  13. - id: prettier
  14. additional_dependencies:
  15. - "prettier@2.7.1"
  16. - "prettier-plugin-solidity@1.0.0-rc.1"
  17. - repo: local
  18. hooks:
  19. # Hooks for the remote executor
  20. - id: cargo-fmt-executor-remote-executor
  21. name: Cargo format executor for remote executor
  22. language: "rust"
  23. entry: cargo +nightly fmt --manifest-path ./pythnet/remote-executor/Cargo.toml --all -- --config-path rustfmt.toml
  24. pass_filenames: false
  25. files: pythnet/remote-executor/
  26. - id: cargo-clippy-executor
  27. name: Cargo clippy executor
  28. language: "rust"
  29. entry: cargo +nightly clippy --manifest-path ./pythnet/remote-executor/Cargo.toml -- -D warnings
  30. pass_filenames: false
  31. files: pythnet/remote-executor/
  32. # Hooks for the attester
  33. - id: cargo-fmt-executor-attester
  34. name: Cargo format executor for attester
  35. language: "rust"
  36. entry: cargo +nightly fmt --manifest-path ./solana/pyth2wormhole/Cargo.toml --all -- --config-path rustfmt.toml
  37. pass_filenames: false
  38. files: solana/pyth2wormhole/
  39. # Hooks for cosmwasm contract
  40. - id: cargo-fmt-executor-cosmwasm
  41. name: Cargo format executor form cosmwasm contract
  42. language: "rust"
  43. entry: cargo +nightly fmt --manifest-path ./cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml
  44. pass_filenames: false
  45. files: cosmwasm/