Skip to content

Commit 289f8b4

Browse files
authored
Merge pull request #36 from NSLentz/add-filename-output-to-twincat-fixed-version-check
Added printing out of filename parsed to check_fixed_library_versions.py
2 parents 9b0bd71 + 749e1a9 commit 289f8b4

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

pre_commit_hooks/check_fixed_library_versions.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ def check_file(filename):
2424
non_fixed_library_versions = added_libraries - fixed_version_libraries
2525

2626
if len(non_fixed_library_versions) == 1:
27-
raise PreCommitException(
28-
f"Library version of {list(non_fixed_library_versions)[0]} is not fixed!"
29-
)
27+
raise PreCommitException((
28+
f"Library version of {list(non_fixed_library_versions)[0]} is "
29+
f"not fixed! File parsed: {filename}"
30+
))
3031
elif len(non_fixed_library_versions) > 1:
31-
raise PreCommitException(
32-
f"Library version of {', '.join(non_fixed_library_versions)} are not fixed!"
33-
)
32+
raise PreCommitException((
33+
f"Library version of {', '.join(non_fixed_library_versions)} "
34+
f"are not fixed! File parsed: {filename}"
35+
))
3436

3537

3638
def main(args=None):

0 commit comments

Comments
 (0)