An Explanation about new feature

Code Formatting — The big feature in Elixir v1.6.0

Design the Code to be traveled fast & furious

Malreddy Ankanna
blackode
Published in
6 min readDec 26, 2017

--

This article explains all about the new mix task mix format which formats our code base.

Elixir version: 1.6.0-rc.0

Code formatting is easy now with the help of mix task mix format . It will take care of all you care about cleaning and refactoring as well. It can assure a clean code base or simply universal code base which maintains some useful standards.

Now, you no need to ask your team member to do things like

  1. provide some room for variables
  2. add white spaces around , etc…

Most of things which we have to take care of will taken care by mix format , letting us to focus on just code logic.

Main Intention

A single style to follow consistently as a whole.

Usage

$ mix format filename

Let me assume that you are in the root of your elixir project and this is how you can format all files inside your project.

mix format mix.exs “lib/**/*.{ex,exs}”…

--

--

Malreddy Ankanna
blackode

Programmer & Writer, I write about coding, thoughts, ideas, personal musings, technical articles, and tutorials.https://bio.link/blackode