Skip to content

Commit

Permalink
fix credo error
Browse files Browse the repository at this point in the history
  • Loading branch information
sigu authored and remi committed Jul 16, 2024
1 parent 2a9f023 commit 4d50509
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mix_audit/audit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule MixAudit.Audit do
Enum.reduce(dependencies, [], fn dependency, memo ->
advisories
|> Map.get(dependency.package, [])
|> Enum.filter(&is_vulnerability?(&1, dependency))
|> Enum.filter(&vulnerability?(&1, dependency))
|> Enum.map(&map_vulnerability(&1, dependency))
|> (&(memo ++ &1)).()
end)
Expand All @@ -15,7 +15,7 @@ defmodule MixAudit.Audit do
}
end

defp is_vulnerability?(%MixAudit.Advisory{vulnerable_version_ranges: vulnerable_version_ranges}, %MixAudit.Dependency{version: version}) do
defp vulnerability?(%MixAudit.Advisory{vulnerable_version_ranges: vulnerable_version_ranges}, %MixAudit.Dependency{version: version}) do
Enum.any?(vulnerable_version_ranges, fn version_range ->
version_range
|> map_ranges_to_requirements()
Expand Down

0 comments on commit 4d50509

Please sign in to comment.