Skip to content

Commit

Permalink
Check jaro_distance values in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjos committed Jun 14, 2024
1 parent a47fce0 commit 402cec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/absinthe/utils/suggestion.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Absinthe.Utils.Suggestion do
def sort_list(suggestions, target, threshold \\ @jaro_threshold)

def sort_list(suggestions, target, threshold) do
Enum.map(suggestions, fn s -> {s, String.jaro_distance(s, target)} end)
Enum.map(suggestions, fn s -> IO.inspect({s, String.jaro_distance(s, target)}) end)
|> Enum.filter(fn {_, x} -> x >= threshold end)
|> Enum.sort_by(fn {_, x} -> x end)
|> Enum.map(fn {s, _} -> s end)
Expand Down

0 comments on commit 402cec4

Please sign in to comment.