Skip to content

Commit 200c0a9

Browse files
committed
Fix luacheck warnings.
1 parent a8149b3 commit 200c0a9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ events.connect(events.UPDATE_UI, function(updated)
504504
end)
505505

506506
-- Highlight differences as text is typed and deleted.
507-
events.connect(events.MODIFIED, function(position, modification_type)
507+
events.connect(events.MODIFIED, function(_, modification_type)
508508
if not _VIEWS[view1] or not _VIEWS[view2] then return end
509509
if modification_type & (0x01 | 0x02) > 0 then mark_changes() end -- insert text | delete text
510510
end)

init_test.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test('file_diff.goto_change(true) should jump to the next change (left view)', f
9494
start_basic_diff()
9595
local lines = {}
9696

97-
for i = 1, 3 do
97+
for _ = 1, 3 do
9898
file_diff.goto_change(true)
9999
lines[#lines + 1] = buffer:line_from_position(buffer.current_pos)
100100
end
@@ -106,7 +106,7 @@ test('file_diff.goto_change should jump to the previous change (left view)', fun
106106
start_basic_diff()
107107
local lines = {}
108108

109-
for i = 1, 3 do
109+
for _ = 1, 3 do
110110
file_diff.goto_change()
111111
lines[#lines + 1] = buffer:line_from_position(buffer.current_pos)
112112
end
@@ -120,7 +120,7 @@ test('file_diff.goto_change(true) should jump to the next change (right view)',
120120
ui.goto_view(_VIEWS[2])
121121
local lines = {}
122122

123-
for i = 1, 3 do
123+
for _ = 1, 3 do
124124
file_diff.goto_change(true)
125125
lines[#lines + 1] = buffer:line_from_position(buffer.current_pos)
126126
end
@@ -133,7 +133,7 @@ test('file_diff.goto_change should jump to the previous change (right view)', fu
133133
ui.goto_view(_VIEWS[2])
134134
local lines = {}
135135

136-
for i = 1, 3 do
136+
for _ = 1, 3 do
137137
file_diff.goto_change()
138138
lines[#lines + 1] = buffer:line_from_position(buffer.current_pos)
139139
end
@@ -168,7 +168,7 @@ test('file_diff.goto_change should treat multi-line changes as a single change',
168168
ui.goto_view(_VIEWS[1])
169169
local lines = {}
170170

171-
for i = 1, 3 do
171+
for _ = 1, 3 do
172172
file_diff.goto_change(true)
173173
lines[#lines + 1] = buffer:line_from_position(buffer.current_pos)
174174
end

0 commit comments

Comments
 (0)