Add credo to the project and:
- Run mix credo --all to identify possible code optimizations - Resolve most of the errors generated by credo such as: - Numbers larger than 9999 should be written with underscores: 58_127 - Modules should have a @moduledoc tag - Comparison will always return true
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
defmodule Display.Notifications do
|
||||
@moduledoc false
|
||||
alias Display.Paint
|
||||
|
||||
def congratulate do
|
||||
@@ -13,8 +14,7 @@ defmodule Display.Notifications do
|
||||
defp module_names(modules) do
|
||||
modules
|
||||
|> Enum.map(&Atom.to_string/1)
|
||||
|> Enum.map(&name/1)
|
||||
|> Enum.join(", ")
|
||||
|> Enum.map_join(", ", &name/1)
|
||||
|> Paint.red()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user