Background
Following my question on Umbrella projects:
I know have it clear that the mix.exs
file of my umbrella should be for general tooling and tasks my projects directly donβt depend on.
One such tool is credo: https://github.com/rrrene/credo
Problem
My projects donβt depend or need credo, but I sure like having it around. My objective would therefore be to have mix credo --strict
evaluate all my umbrella applications, without me having to specifically install it in every single app.
I understand this is possible, however when I do mix credo --strict
it always shows I have 0 problems, even though I have the code with TODO tags and other issue that I know trigger it.
Obviously my configuration is not set up correctly.
Configuration
This is my folder structure:
.
βββ README.md
βββ apps
β βββ auction_house
β β βββ README.md
β β βββ config
β β βββ cover
β β βββ lib
β β βββ mix.exs
β β βββ test
β βββ store
β β βββ README.md
β β βββ lib
β β βββ mix.exs
β β βββ test
βββ config
β βββ config.exs
β βββ dev.exs
β βββ prod.exs
β βββ test.exs
βββ mix.exs
βββ mix.lock
So as you can see, each app has its own mix.exs
file which only has the very specific dependencies the projects depends on.
Then on a higher level (apps folder) I have a mix.exs
file for the umbrella project. This is what that file looks like:
defmodule MarketManager.MixProject do
use Mix.Project
##########
# Public #
##########
def project do
[
apps_path: "apps",
version: "1.0.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
]
end
def application do
[
extra_applications: [:logger],
mod: {MarketManager.Application, [env: Mix.env()]} # No idea what to put here, really
]
end
###########
# Private #
###########
defp deps do
[
# Testing and Dev
{:credo, "~> 1.4", only: [:test, :dev], runtime: false}
]
end
end
Question
What am I doing wrong?