mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-12 05:54:18 +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 i, line in enumerate(inputfile):
|
||||||
for pattern in CONFLICT_PATTERNS:
|
for pattern in CONFLICT_PATTERNS:
|
||||||
if line.startswith(pattern):
|
if line.startswith(pattern):
|
||||||
print(WARNING_MSG.format(pattern, filename, i))
|
print(WARNING_MSG.format(pattern, filename, i + 1))
|
||||||
retcode = 1
|
retcode = 1
|
||||||
|
|
||||||
return retcode
|
return retcode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue