From c3169ba05deb07ba2bdf8f899f4a9d2c54cbf722 Mon Sep 17 00:00:00 2001 From: dt <98478153+realcorvus@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:04:14 -0500 Subject: [PATCH 1/2] Use trunc when idx is given as a float instead of an int --- lib/sobelow/parse.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sobelow/parse.ex b/lib/sobelow/parse.ex index d8ee966..8b074f1 100644 --- a/lib/sobelow/parse.ex +++ b/lib/sobelow/parse.ex @@ -455,7 +455,7 @@ defmodule Sobelow.Parse do end defp create_fun_cap(fun, meta, idx) when is_number(idx) do - opts = Enum.map(1..idx, fn i -> {:&, [], [i]} end) + opts = Enum.map(1..trunc(idx), fn i -> {:&, [], [i]} end) {fun, meta, opts} end From 3e4de316cfeaa9fed7d5c5ba59af79122d2770c8 Mon Sep 17 00:00:00 2001 From: dt <98478153+realcorvus@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:35:24 -0500 Subject: [PATCH 2/2] add debug inspect --- lib/sobelow.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sobelow.ex b/lib/sobelow.ex index deb0e1e..4144502 100644 --- a/lib/sobelow.ex +++ b/lib/sobelow.ex @@ -484,6 +484,7 @@ defmodule Sobelow do defp load_ignored_fingerprints(project_root) do cfile = project_root <> @skips + IO.inspect(cfile, label: "Sobelow skips file") if File.exists?(cfile) do {:ok, iofile} = :file.open(cfile, [:read])