forked from openebs/mayastor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
47 lines (47 loc) · 1.51 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
repos:
- repo: https://github.com/nix-community/nixpkgs-fmt
rev: v1.2.0
hooks:
- id: nixpkgs-fmt
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude_types: [diff]
- repo: local
hooks:
- id: rust-style
name: Rust style
description: Check Rust code style on files included in the commit.
entry: ./scripts/rust-style.sh
pass_filenames: false
types: [file, rust]
language: system
- id: rust-lint
name: Rust lint
description: Run Rust linter on files included in the commit.
entry: ./scripts/rust-linter.sh
pass_filenames: false
types: [file, rust]
language: system
- id: js-check
name: JS style and lint
description: Run semistandard on files included in the commit.
entry: ./scripts/js-check.sh
pass_filenames: true
types: [file, javascript]
language: system
- id: commit-lint
name: Commit Lint
description: Runs commitlint against the commit message.
language: system
entry: bash -c "npm install @commitlint/config-conventional @commitlint/cli; cat $1 | grep -v '^#' | npx commitlint"
args: [$1]
stages: [commit-msg]
- id: python-check
name: python lint
entry: black
description: runs black against the python code
pass_filenames: true
types: [file, python]
language: system