mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 19:46:54 +00:00
Debug
This commit is contained in:
parent
1db666ae84
commit
4e8374f929
1 changed files with 3 additions and 1 deletions
|
|
@ -11,8 +11,10 @@ def check_for_no_commit_tokens(
|
|||
) -> str:
|
||||
with open(filename, mode='r', encoding='utf-8') as file_processed:
|
||||
lines = file_processed.read()
|
||||
print(f"check_for#tokens - {tokens}")
|
||||
for token in tokens:
|
||||
match = re.search(token, lines)
|
||||
print(f"check_for#token,match - {token}, {match}")
|
||||
if match:
|
||||
# no-commit token is present
|
||||
# return offending token
|
||||
|
|
@ -33,7 +35,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
|||
args = parser.parse_args(argv)
|
||||
|
||||
return_code = 0
|
||||
print(args.tokens)
|
||||
print(f"tokens - {args.tokens}")
|
||||
|
||||
if args.tokens:
|
||||
tokens = args.tokens.split(",")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue