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
Hello all,
I am still learning Elixir, then go into Phoenix, i am try search in google but find the programming phoenix 1.4, another for...
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
Hi everyone,
I’m looking for a book on Phoenix server hosting / deployment like the following books for Rails,
Docker for Rails Develop...
New
I am doing some exercises while learning Elixir using Exercism.io.
Now, my objective is to do all exercises, extras included. This shoul...
New
I just finished the “Learn Functional Programming with Elixir (Pragprog)” book. I have 5+ years of experience with Ruby/Rails, my goal is...
New
I wanted to write a library for interacting with a Web API as a practical way of learning Elixir. However, there seem to be a lot of diff...
New
GenStage and Flow resources?
I have been hearing about GenStage and Flow, a tool built upon it, for quite some time. I understand it allo...
New
It finally feels like I’ve got some time to catch up on my reading - though I am sure lots of people will be wondering the same: what are...
New
As a novice dev I’m trying to keep the curriculum as lean as possible.
My requirements are modest: build simple CRUD apps with Phoenix...
New
Hi, I was looking for a pointer of how I could most easily start with phoenix regarding deploying it to something like linode or google c...
New
Other popular topics
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
Hi,
I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Hello, I have map which I want to convert it to string like this:
the map:
%{last_name: "tavakkoli", name: "shahryar"}
the string I ne...
New
Hi all,
I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I'm trying to use Postg...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Hello guys,
I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Hey :wave:t3: Elixir community,
I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New







