Skip to content

Commit

Permalink
Update lib/mix_audit/cli/audit.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Gessa <[email protected]>
  • Loading branch information
2 people authored and remi committed Mar 19, 2024
1 parent 8486ba3 commit 9995423
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/mix_audit/cli/audit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,8 @@ defmodule MixAudit.CLI.Audit do
defp ignored_ids_from_file(opts) do
opts
|> Keyword.get(:ignore_file, ".mix-audit-skips")
|> File.read()
|> case do
{:ok, content} ->
content
|> String.split("\n")
|> Enum.reject(fn line -> String.starts_with?(line, "#") or line == "" end)

_ ->
[]
end
|> File.read!()
|> String.split("\n")
|> Enum.reject(fn line -> String.starts_with?(line, "#") || String.trim(line) == "" end)
end
end

0 comments on commit 9995423

Please sign in to comment.