Skip to content

Commit

Permalink
refactoring from f..l//s -> Range.new(f,l,s) bc checks don't like the…
Browse files Browse the repository at this point in the history
… step notation
  • Loading branch information
bradhanks committed Jan 4, 2024
1 parent 000353c commit 358a4ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/credo/cli/command/diff/task/get_git_diff.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ defmodule Credo.CLI.Command.Diff.Task.GetGitDiff do
defp run_credo_on_dir(exec, dirname, previous_git_ref, given_ref) do
{previous_argv, _last_arg} =
exec.argv
|> Credo.Backports.Enum.slice(%Range{first: 1, last: -1, step: -1})
|> Credo.Backports.Enum.slice(Range.new(1, -1, -1))
|> Enum.reduce({[], nil}, fn
_, {argv, "--working-dir"} ->
{Credo.Backports.Enum.slice(argv, Range.new(1, -2, -1)), nil}
Expand Down

0 comments on commit 358a4ae

Please sign in to comment.