mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
display line content in non-compliant files in pre-commit messages
This commit is contained in:
parent
395564510b
commit
35b90438b9
2 changed files with 17 additions and 16 deletions
|
|
@ -14,8 +14,9 @@ def _get_file_verbose_occurrences(filename: str) -> int:
|
|||
for i, line in enumerate(f, 1):
|
||||
if CURL_VERBOSE_PATTERN.search(line):
|
||||
print(
|
||||
'Talkative/Verbose cURL command found: '
|
||||
'{filename}:{i}:{line}',
|
||||
f'Talkative/Verbose cURL command found:'
|
||||
f'{repr(filename)}:{repr(i)}:{line.decode("utf-8")}',
|
||||
end='',
|
||||
)
|
||||
file_verbose_occurrences += 1
|
||||
return file_verbose_occurrences
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue