-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.pre-commit-hooks.yaml
68 lines (68 loc) · 2.31 KB
/
.pre-commit-hooks.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
- id: twincat-lineids-remover
name: TwinCAT LineID Remover
description: Eliminate TwinCAT line ID lines
entry: twincat-lineids-remover
language: python
files: .*\.TcPOU$
- id: leading-tabs-remover
name: Leading Tabs Remover
description: Replace leading tabs with 4 spaces
entry: leading-tabs-remover
language: python
- id: twincat-leading-tabs-remover
name: TwinCAT Leading Tabs Remover
description: leading-tabs-remover configured for TwinCAT
entry: leading-tabs-remover
language: python
files: .*\.(TcPOU|TcDUT|TcGVL)$
- id: xml-format
name: XML Formatter
description: Use lxml to beautify xml files
entry: xml-format
language: python
types: [xml]
- id: twincat-xml-format
name: TwinCAT XML Formatter
description: xml-format configured for TwinCAT
entry: xml-format
language: python
files: .*\.(tmc|tpy|xml)$
- id: check-fixed-library-versions
name: Check fixed library versions
description: Checks if there are PLC libraries whos versions are not fixed.
entry: check-fixed-library-versions
language: python
files: .*\.plcproj$
- id: pytmc-pragma-linter
name: pytmc-pragma-linter
description: Lint pytmc pragmas
entry: bash -c 'set -ex; for fn in "$@"; do pytmc pragmalint "$fn"; done' --
language: python
files: .*\.(TcPOU|TcGVL|TcDUT)$
additional_dependencies: ["pytmc"]
- id: no-product-version
name: Check for product version
description: Checks if the product version is saved in the TwinCAT source file.
entry: no-product-version
language: python
files: .*\.(TcPOU|TcDUT|TcGVL)$
- id: twincat-st-newline
name: TwinCAT ST Newline Formatter
description: Affixes newlines to ST segments
entry: twincat-st-newline
language: python
files: .*\.(TcPOU|TcGVL|TcDUT)$
- id: minimize-id-changes
name: Check minimize id changes checked
description: Checks if the minimize id changes option is checked in the plcproj file.
entry: minimize-id-changes
language: python
files: .*\.plcproj$
- id: check-twincat-versions
name: Check if all TwinCAT versions match
description: Checks if TwinCAT versions match in different tsproj and tspproj files, or if it matches the targeted one.
entry: check-twincat-versions
# All files need to be passed at once, else not all files are compared to eachother
require_serial: true
language: python
files: .*\.(tsproj|tspproj)$