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
I love the Phoenix and Elixir docs, but I always tend to learn faster when I watch a video of someone explaining things and then I implem...
New
Hello, I’m sure this has been asked a bunch, but where to start. I do prefer vodeos over books, but recently I have found books to be mor...
New
The title of this topic may sound silly at the first glance. But why I trying to ask you guys is how to go to the next level?
I am curre...
New
What feature would you like to recommend if you share Elixir to a newbie?
New
I was wondering if there are any beginner-friendly, exercise-based resources for learning Elixir out there. I’m looking for something lik...
New
Hi,
I run a language learning blog and would like to learn how to code so I can create an app to help English speakers learn French.
I ...
New
Hey,
I am currently reading Programming Elixir and I am doing one of the exercises where you should write a solution to the “I’m thinkin...
New
Hi,i’m new to elixir.
i’m searching elixir small programs to try it out my self,Is any good resources out there?
Thank you.
New
Hi everyone,
This year I’m graduated from Bachelor Degree (in computer science) from France (not really a bachelor, the exact term is “L...
New
I’ve been trying to start learning Elixir for a couple of weeks while I develop a tiny project I have on node.js, but every time I try to...
New
Other popular topics
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
lets say i have a sample like
a = 20; b = 10;
if (a > b) do
{:ok, "a"}
end
if (a < b) do
{:ok, b}
end
if (a == b) do
{:ok, "equa...
New
Hello everyone,
I try to use an Javascript Event Handler in my root.html.leex file.
Therefore I created a function in the app.js file: ...
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
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition)
It’s been a while since we first asked this, I...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









