Skip to content

Commit

Permalink
reduce churn
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Apr 8, 2024
1 parent 3cb10f2 commit b01c7ff
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/style/module_directives.ex
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,9 @@ defmodule Styler.Style.ModuleDirectives do
{:skip, zipper, acc}

{{:__aliases__, _, [_, _, _ | _] = modlist}, _} = zipper, {lifts, excluded} = acc ->

Check warning on line 311 in lib/style/module_directives.ex

View workflow job for this annotation

GitHub Actions / Ex1.15.7/OTP25.1.2

variable "modlist" is unused (if the variable is not meant to be used, prefix it with an underscore)
acc =
if Enum.any?(modlist, &(not is_atom(&1))) or List.last(modlist) in excluded,
do: acc,
else: {Map.update(lifts, modlist, false, fn _ -> true end), excluded}

{:skip, zipper, acc}
if List.last(aliases) in excluded or not Enum.all?(aliases, &is_atom/1),
do: {:skip, zipper, acc},
else: {:skip, zipper, {Map.update(lifts, aliases, false, fn _ -> true end), excluded}}

zipper, acc ->
{:cont, zipper, acc}
Expand Down

0 comments on commit b01c7ff

Please sign in to comment.