forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 19
/
.pre-commit-config.yaml
49 lines (49 loc) · 1.78 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
# TODO: identify if we can move away from using pre-commit hooks for these checks.
#
# See also:
# - https://pre-commit.com for more information.
# - https://pre-commit.com/hooks.html for more hooks.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
files: \.(rs|move)$
- id: end-of-file-fixer
files: \.(rs|move)$
- id: check-added-large-files
args:
- --maxkb=2000
- repo: https://github.com/aptos-labs/pre-commit-hooks
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # Fix the revision to the v1.5.5 release commit. See: https://github.com/Lucas-C/pre-commit-hooks/releases/tag/v1.5.5
hooks:
- id: insert-license
files: ^(?!third_party/).*\.rs$
args:
- --license-filepath
- devtools/assets/license_header.txt
- --license-filepath
- devtools/assets/shared_license_header.txt
- --license-filepath
- devtools/assets/license_header_utf8.txt
- --license-filepath
- devtools/assets/shared_license_header_utf8.txt
- --comment-style
- //
- id: insert-license
files: ^(?=third_party/).*\.rs$
args:
- --license-filepath
- devtools/assets/license_header.txt
- --license-filepath
- devtools/assets/shared_license_header.txt
- --license-filepath
- devtools/assets/third_party_license_header.txt
- --license-filepath
- devtools/assets/third_party_license_header_2.txt
- --license-filepath
- devtools/assets/license_header_utf8.txt
- --license-filepath
- devtools/assets/shared_license_header_utf8.txt
- --comment-style
- //