Skip to content

Commit f0d27cd

Browse files
authored
Merge pull request #33 from mihaiginta/patch-1
Check also *.tspproj for for twincat version
2 parents eecdf9a + 072c278 commit f0d27cd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.pre-commit-hooks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
files: .*\.plcproj$
6161
- id: check-twincat-versions
6262
name: Check if all TwinCAT versions match
63-
description: Checks if TwinCAT versions match in different tsproj files, or if it matches the targeted one.
63+
description: Checks if TwinCAT versions match in different tsproj and tspproj files, or if it matches the targeted one.
6464
entry: check-twincat-versions
6565
# All files need to be passed at once, else not all files are compared to eachother
6666
require_serial: true
6767
language: python
68-
files: .*\.tsproj$
68+
files: .*\.(tsproj|tspproj)$

pre_commit_hooks/check_twincat_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def main(args=None):
4646
if args is None:
4747
parser = argparse.ArgumentParser()
4848
parser.add_argument(
49-
"filenames", nargs="+", help="List of tsproj filenames to process."
49+
"filenames", nargs="+", help="List of tsproj and tspproj filenames to process."
5050
)
5151
parser.add_argument(
5252
"--target-version", type=str, help="Target TwinCAT version to enforce."

0 commit comments

Comments
 (0)