generated from rruiter87/TcTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
51 lines (51 loc) · 1.99 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
50
51
exclude: '.*\.(resx|Designer.cs|xti|tcscopex|tsproj)'
repos:
- repo: https://github.com/pcdshub/pre-commit-hooks.git
rev: v1.6.0
hooks:
- id: twincat-leading-tabs-remover
- id: twincat-lineids-remover
- id: twincat-xml-format
- id: check-fixed-library-versions
- id: no-product-version
- id: minimize-id-changes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the ref you want to point at
hooks:
# Removes trailing white spaces
- id: trailing-whitespace
# Checks yaml files for parseable syntax
- id: check-yaml
# Prevents git from committing large files
- id: check-added-large-files
- id: end-of-file-fixer
# These files are either edited in the IDE or auto generated. No point in adding a new line at the end.
exclude: '\.(TcPOU|TcDUT|TcTTO|TcGVL|TcGTLO|TcVMO|TcIO|TcVis|plcproj|tsproj|tcdmproj|tcdmdrv|tcmproj|xti|STweep)$'
- id: requirements-txt-fixer
# For this hook you need to have the Stweep.CLI installed and buy a license
# See https://www.stweep.com/stweep-cli-beta-releases/
- repo: local
hooks:
- id: stweep
name: Format TwinCAT files with STweep
entry: python stweep_format.py --settingsFile=settings.STweep
language: python
# All files need to be passed at once, or else the license activation/deactivation fails
require_serial: true
files: '.*\.(TcPOU|TcDUT|TcTTO|TcGVL)'
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
exclude_types: ["svg"]
additional_dependencies:
- "@prettier/[email protected]"
- repo: https://github.com/rruiter87/tcunit-precommit
rev: v0.1.0
hooks:
- id: unittest-name-fixer
# Remove this line to prevent the names to be automatically fixed
args: [--fix]
# Ajust this to how you name your unit tests
files: '.*_Tests\.TcPOU'