Skip to content

Commit 00a96c4

Browse files
authored
add missing step for Cobertura's range (#329)
Without this change, the output is full of warnings such as ``` warning: negative steps are not supported in String.slice/2, pass 44..-1//1 instead ```
1 parent 91a8267 commit 00a96c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/excoveralls/cobertura.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ defmodule ExCoveralls.Cobertura do
188188
# We use Range.new/3 because using x..y//step would give a syntax error on Elixir < 1.12
189189
defp get_slice_range_for_package_name(c_path), do: Range.new(String.length(c_path) + 1, -1, 1)
190190
else
191-
defp get_slice_range_for_package_name(c_path), do: (String.length(c_path) + 1)..-1
191+
defp get_slice_range_for_package_name(c_path), do: (String.length(c_path) + 1)..-1//1
192192
end
193193

194194
defp rate(valid_lines) when length(valid_lines) == 0, do: 0.0

0 commit comments

Comments
 (0)