This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The directory Mix will write compiled artifacts to. | |
/_build/ | |
# If you run "mix test --cover", coverage assets end up here. | |
/cover/ | |
# The directory Mix downloads your dependencies sources to. | |
/deps/ | |
# Where 3rd-party dependencies like ExDoc output generated docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{":0:unknown_function Function ExUnit.Callbacks.__merge__/3 does not exist."}, | |
{":0:unknown_function Function ExUnit.CaseTemplate.__proxy__/2 does not exist."} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defp aliases do | |
[ | |
# current aliases... | |
quality: ["format", "credo --strict", "sobelow --verbose", "dialyzer", "test"], | |
"quality.ci": [ | |
"test", | |
"format --check-formatted", | |
"credo --strict", | |
"sobelow --exit", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule YourProject.MixProject do | |
use Mix.Project | |
def project do | |
[ | |
# current configs... | |
elixirc_options: [warnings_as_errors: true], | |
aliases: aliases(), | |
dialyzer: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule YourProject.MixProject do | |
use Mix.Project | |
def project do | |
[ | |
app: :your_project, | |
version: "0.1.0", | |
elixir: "~> 1.6", | |
elixirc_paths: elixirc_paths(Mix.env()), | |
elixirc_options: [warnings_as_errors: true], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def project do | |
[ | |
app: :your_project, | |
version: "0.1.0", | |
elixir: "~> 1.6", | |
elixirc_paths: elixirc_paths(Mix.env()), | |
elixirc_options: [warnings_as_errors: true], | |
compilers: [:phoenix, :gettext] ++ Mix.compilers(), | |
start_permanent: Mix.env() == :prod, | |
aliases: aliases(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
└── apps | |
├── core | |
│ └── lib | |
│ ├── maintenance | |
│ ├── selling | |
├── payment | |
└── website |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
└── apps | |
├── core | |
│ └── lib | |
│ ├── maintenance | |
│ ├── maintenance.ex | |
│ ├── selling | |
│ └── selling.ex | |
├── payment | |
│ └── lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Support do | |
@type customer :: %{id: integer, last_ticket_id: integer} | |
@spec get_customer(integer) :: {:ok, customer} | {:error, binary} | |
def get_customer(customer_id) when is_integet(customer_id) do | |
# your logic here ... | |
# return the common pattern {:ok, data} or {:error, data} | |
{:ok, customer} | |
end | |
end |
NewerOlder