Mix format only changed lines

How to format only changed lines by mix format? How to integrate it with git?

This is not an option. Mix format wants to format the entire file passed to it. I also don’t think it ever will be added as the whole point is to add consistency.

They do offer nice options for integrating with git.

You will need to write a CI script that manually invokes mix format with the files in your git dif.


The only real options right now are line_length and locals_without_parens

1 Like