-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
109 lines (101 loc) · 2.37 KB
/
.pre-commit-config.yaml
File metadata and controls
109 lines (101 loc) · 2.37 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
# SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
#
# SPDX-License-Identifier: Apache-2.0
# Excludes all these patterns from all hooks
exclude: |
(?x)^(
src/libevp-agent/sdkenc/.*\.[ch]|
src/libevp-agent/webclient/.*|
src/libevp-agent/MQTT-C/.*|
src/libevp-agent/mqtt\.c|
src/libevp-agent/netlib/.*|
src/libevp-agent/xlog_color.h|
src/libevp-agent/azure/.*\.[ch]|
include/internal/time\.h|
include/internal/cdefs\.h|
include/internal/queue\.h|
include/evp_mbedtls_config.h|
.*/parson\.[ch]|
.*/.git/.*|
.*/.doc-venv/.*|
.*/.venv/.*|
.*/stage/.*|
.*/build/.*|
src/python-evp-app-sdk/evp/app/.*wrap\.c
)$
repos:
- repo: local
hooks:
- id: check-format
name: Check format
description: Check that sources comply with clang format
entry: clang-format
types_or: [c, c++]
args:
- --dry-run
- -Werror
- --verbose
language: system
stages:
- pre-commit
# Manually run hook to format C files
# Run as `pre-commit run -a --hook-stage manual`
- id: fix-format
name: Fix format
description: Fix sources to comply with clang format
entry: clang-format
types_or: [c, c++]
args:
- -i
- --verbose
language: system
stages:
- manual
- id: check-license
name: Check license
entry: tools/check-license.sh
types_or: [c, c++]
language: system
stages:
- pre-commit
- id: check-bash
name: Check bash
language: system
entry: bashate
files: \.sh$
args:
- -iE006
- -eE005,E042,E043
stages:
- pre-commit
- id: black
name: Check Black
entry: black
types_or: [python, pyi]
language: python
args:
- --line-length=79
- --verbose
stages:
- pre-commit
- id: flake8
name: Check Flake8
entry: flake8
types_or: [python, pyi]
language: python
args:
- --extend-ignore=E203
- --max-line-length=79
- --verbose
stages:
- pre-commit
- id: pycodestyle
name: Check PyCodeStyle
entry: pycodestyle
types_or: [python, pyi]
language: python
args:
- --ignore=E203,W503
- --verbose
stages:
- pre-commit