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,9 +1,11 @@
|
||||
defmodule Structs do
|
||||
@moduledoc false
|
||||
use Koans
|
||||
|
||||
@intro "Structs"
|
||||
|
||||
defmodule Person do
|
||||
@moduledoc false
|
||||
defstruct [:name, :age]
|
||||
end
|
||||
|
||||
@@ -35,10 +37,12 @@ defmodule Structs do
|
||||
end
|
||||
|
||||
defmodule Plane do
|
||||
@moduledoc false
|
||||
defstruct passengers: 0, maker: :boeing
|
||||
end
|
||||
|
||||
defmodule Airline do
|
||||
@moduledoc false
|
||||
defstruct plane: %Plane{}, name: "Southwest"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user