Skip to content

Commit 4995754

Browse files
committed
Remove unused modified_lines helper from HookContext::Base
This was deprecated in 89b7d7b. It is now safe to remove.
1 parent 6ece399 commit 4995754

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

lib/overcommit/hook_context/base.rb

-8
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ def modified_files
5959
[]
6060
end
6161

62-
# Returns a set of lines that have been modified for a file.
63-
#
64-
# By default, this returns an empty set. Subclasses should implement if
65-
# there is a concept of files changing for the type of hook being run.
66-
def modified_lines(_file)
67-
Set.new
68-
end
69-
7062
# Returns an array of lines passed to the hook via STDIN.
7163
def input_lines
7264
@input_lines ||= @input.read.split("\n")

lib/overcommit/hook_context/pre_commit.rb

-7
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@ def modified_files
9999
@modified_files
100100
end
101101

102-
# @deprecated
103-
# TODO: Remove this once we've moved all existing hooks to stop using this
104-
# endpoint
105-
def modified_lines(file)
106-
modified_lines_in_file(file)
107-
end
108-
109102
# Returns the set of line numbers corresponding to the lines that were
110103
# changed in a specified file.
111104
def modified_lines_in_file(file)

0 commit comments

Comments
 (0)