forked from MystenLabs/walrus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
132 lines (132 loc) · 4.22 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
132 lines (132 loc) · 4.22 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: check-yaml
exclude: "crates/walrus-upload-relay/walrus_upload_relay_config_example.yaml"
- id: check-symlinks
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "3.6.1"
hooks:
- id: editorconfig-checker
alias: ec
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
- repo: https://github.com/notken12/licensesnip
rev: f01f898
hooks:
- id: licensesnip
args: []
pass_filenames: false
- repo: https://github.com/crate-ci/typos
rev: v1.44.0
hooks:
- id: typos
pass_filenames: false
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.21.0
hooks:
- id: markdownlint-cli2
args: ["--fix"]
pass_filenames: false
- repo: https://github.com/EmbarkStudios/cargo-deny
rev: 0.19.0
hooks:
- id: cargo-deny
args: ["--all-features", "check", "--hide-inclusion-graph"]
- repo: local
hooks:
- id: taplo-format
alias: taplo
name: taplo-format
description: Format TOML documents
entry: taplo format
language: python
types: [toml]
args: []
# Target the Taplo 0.10.0 commit SHA.
additional_dependencies: ["git+https://github.com/tamasfe/taplo@20a9145169437bb1a5629577094f20c01e83369b"]
- id: shellcheck
args: ["--severity=error"]
name: shellcheck
description: Test shell scripts with shellcheck
entry: shellcheck
# Note that this relies on https://github.com/shellcheck-py/shellcheck-py.
language: python
types: [shell]
require_serial: true # shellcheck can detect sourcing this way
additional_dependencies: ["shellcheck-py==0.11.0.1"]
- id: cargo-fmt
name: cargo-fmt
entry: cargo fmt
args:
- "--"
- "--config"
- "group_imports=StdExternalCrate,imports_granularity=Crate,imports_layout=HorizontalVertical"
language: system
files: &rust-files-pattern ^(crates/|Cargo\.(toml|lock)|rust-toolchain\.toml$)
pass_filenames: false
- id: cargo-test
name: cargo-test
entry: cargo nextest run
language: system
files: (^crates/|Cargo\.(toml|lock)$|nextest\.toml|rust-toolchain\.toml$)
pass_filenames: false
verbose: true
- id: cargo-doctests
name: cargo-doctests
entry: cargo test --doc
language: system
files: *rust-files-pattern
pass_filenames: false
stages: [manual] # only run manually
- id: clippy-with-tests
name: clippy-with-tests
entry: cargo clippy
args: ["--all-features", "--tests", "--", "-D", "warnings"]
language: system
files: *rust-files-pattern
pass_filenames: false
- id: clippy
name: clippy
entry: cargo clippy
args: ["--all-features", "--", "-D", "warnings"]
language: system
files: *rust-files-pattern
pass_filenames: false
stages: [manual] # only run manually
- id: cargo-doc
name: cargo-doc
entry: env RUSTDOCFLAGS="-D warnings" cargo doc
args: ["--workspace", "--no-deps", "--document-private-items"]
language: system
files: *rust-files-pattern
pass_filenames: false
- id: move-tests
name: move-tests
entry: scripts/move_tests.sh
language: system
files: "contracts/.*"
pass_filenames: false
- id: move-tests-testnet
name: move-tests-testnet
entry: scripts/move_tests.sh
args: ["-d", "testnet-contracts"]
language: system
files: "testnet-contracts/.*"
pass_filenames: false
- id: move-format
name: move-format
entry: prettier-move -w
language: node
additional_dependencies:
- "prettier@3.6.2"
- "@mysten/prettier-plugin-move@0.3.1"
files: "^contracts/.*\\.move"