goofansu
Is there a conflict for ensure_consistency alias in book Adopting Elixir?
In the AUTOMATING YOUR CONSISTENCY CHECKS, there is an alias:
def aliases do
[
"ensure_consistency": ["test", "dialyzer", "credo --strict", "inch", "coveralls"]
]
end
When I tried in my own project, it complains:
** (Mix) "mix test" is running on environment "dev". If you are running tests along another task, please set MIX_ENV explicitly.
I suppose it should execute in MIX_ENV=test mix ensure_consistency, but in previous chapters, the deps are:
defp deps do
[
{:credo, "~> 0.8.8", only: [:dev], runtime: false},
{:dialyxir, "~> 0.5", only: [:dev], runtime: false},
{:excoveralls, "~> 0.7.4", only: [:test], runtime: false},
{:ex_doc, "~> 0.18", only: [:dev], runtime: false},
{:inch_ex, "~> 0.5", only: [:dev, :test], runtime: false}
]
end
So the credo and dialyxir are available only in dev mode while excoveralls only in test mode, it seems existing a conflict.
Is there something wrong? Thanks
Most Liked
goofansu
I changed the deps as following, and run MIX_ENV=test mix ensure_consistency, it works.
defp deps do
[
{:credo, "~> 0.8.8", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.7.4", only: [:test], runtime: false},
{:ex_doc, "~> 0.18", only: [:dev], runtime: false},
{:inch_ex, "~> 0.5", only: [:dev, :test], runtime: false}
]
end
But “coveralls” cannot output anything. If I run mix converalls, it have the output.
1
josevalim
Creator of Elixir
I believe there is a :preferred_cli_env configuration you should set too.
1
Popular in Chat/Questions
Manning 2016 Halloween weekend sale via Deal of the Day
Friday, October 28 - Half off all MEAPs - code WM102816LT
Saturday, October 29 ...
New
Hello!,
I just started this week to discover Elixir.
I’m a PHP-Programmer and did some sutff in Go too.
The more I read about Elixir t...
New
What feature would you like to recommend if you share Elixir to a newbie?
New
I’m not a hugely experienced programmer, just a few years. So I’m looking for resources to learn about a topic but I can’t seem to find m...
New
What are the best beginner resources for learning Elixir and OTP (not Phoenix) in 2018?
New
I’m new to elixir. I did some coding in python and C. I want to learn elixir for starting my career in web development. I need suggestion...
New
More Ecto questions! More madness!
The context: there’s a list of books that I want to filter with a dropdown…
The dropdown: looks some...
New
Background
Hello all! So after my controversial introduction with Learning Elixir, frst impressions ( plz don’t kill me ! ) - I saw a ton...
New
I think that would be really interesting to have official books created by the community about all kinds of development we can do with El...
New
Hello there,
i have a lot to read and to learn, but are there some books, that are focussing on how i “should” plan the architecture of ...
New
Other popular topics
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
Hello, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Hi all,
Trying to get some more clarity over utc_datetime and naive_datetime for Ecto:
https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
I would like to know what is the best IDE for elixir development?
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New







