mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-01 02:56:52 +00:00
Fix off by one error in line number enumeration
This commit is contained in:
parent
779a42919a
commit
86d8446800
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ def detect_merge_conflict(argv=None):
|
|||
for i, line in enumerate(inputfile):
|
||||
for pattern in CONFLICT_PATTERNS:
|
||||
if line.startswith(pattern):
|
||||
print(WARNING_MSG.format(pattern, filename, i))
|
||||
print(WARNING_MSG.format(pattern, filename, i + 1))
|
||||
retcode = 1
|
||||
|
||||
return retcode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue