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 Functions do
|
||||
@moduledoc false
|
||||
use Koans
|
||||
|
||||
@intro "Functions"
|
||||
@@ -104,8 +105,7 @@ defmodule Functions do
|
||||
result =
|
||||
"full-name"
|
||||
|> String.split("-")
|
||||
|> Enum.map(&String.capitalize/1)
|
||||
|> Enum.join(" ")
|
||||
|> Enum.map_join(" ", &String.capitalize/1)
|
||||
|
||||
assert result == ___
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user