Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there anyway to install credo globally?

Tags:

elixir

linter

I'm a newbie with elixir, and I'm trying to configure my text editor (vim + ale as lint engine) with the credo linter for elixir, but seems like there is no way to have it installed on the system. Its documentation just say how to install it on your project as a dependency. Am I missing something?

like image 207
gabrielperales Avatar asked Apr 25 '17 08:04

gabrielperales


2 Answers

From the readme:

Using Credo as stand alone

If you do not want or are not allowed to include Credo in the current project you can also install it as an archive:

git clone [email protected]:rrrene/credo.git
cd credo
mix deps.get
mix archive.build
mix archive.install

Important: You have to install bunt as well:

git clone https://github.com/rrrene/bunt
cd bunt
mix archive.build
mix archive.install

You will now be able to invoke credo as usual through Mix with mix credo. This option is especially handy so credo can be used by external editors.

like image 170
Mike Buhot Avatar answered Jan 04 '23 05:01

Mike Buhot


In 2021, just install it with:

$ mix escript.install hex credo

Then run it with:

$ credo
like image 37
c4710n Avatar answered Jan 04 '23 04:01

c4710n