Skip to content

Commit 474b769

Browse files
committed
Fix errors due to new token format
1 parent a03f6bd commit 474b769

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

lib/credo/code/interpolation_helper.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ defmodule Credo.Code.InterpolationHelper do
8484
# Elixir >= 1.11.0
8585
#
8686
defp map_interpolations(
87-
{:sigil, {_line_no, _col_start, nil}, _, list, _empty_list, nil, _another_binary} =
88-
token,
87+
{:sigil, {_line_no, _col_start, _end_position}, _, list, _empty_list, nil,
88+
_another_binary} = token,
8989
source
9090
) do
9191
handle_atom_string_or_sigil(token, list, source)

lib/credo/code/token.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ defmodule Credo.Code.Token do
7575
end
7676

7777
# Elixir >= 1.10.0 sigil syntax
78-
def position({:sigil, {line_no, col_start, nil}, _, atom_or_charlist, _list, _number, _binary}) do
78+
def position(
79+
{:sigil, {line_no, col_start, _end_position}, _, atom_or_charlist, _list, _number,
80+
_binary}
81+
) do
7982
position_tuple_for_quoted_string(atom_or_charlist, line_no, col_start)
8083
end
8184

0 commit comments

Comments
 (0)