-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
53 lines (51 loc) · 1.42 KB
/
.pre-commit-config.yaml
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
fail_fast: true
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.2
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: clippy
name: Rust clippy
language: rust
pass_filenames: false
entry: cargo clippy --all-targets --all-features -- -Dwarnings
- id: rustfmt
name: Rust formatting
language: rust
pass_filenames: false
entry: cargo fmt --all --check
- id: dapp
name: dApp prettier
additional_dependencies:
- prettier
- prettier-plugin-astro
language: node
pass_filenames: false
entry: prettier --write dapp
- id: website
name: website prettier
additional_dependencies:
- prettier
- "@stellar/prettier-config"
language: node
pass_filenames: false
entry: prettier --write "website/{blog,docs,src/pages}/**/*.{md,mdx}"
# our custom action
- id: soroban-versioning
name: Send hash to Soroban contract before push
language: python
additional_dependencies:
- soroban
entry: python pre-commit/soroban_versioning_pre_push.py
pass_filenames: false
always_run: true
require_serial: true
stages:
- pre-push