erlfmt icon indicating copy to clipboard operation
erlfmt copied to clipboard

Read file only once

Open awalterschulze opened this issue 4 years ago • 0 comments

https://github.com/WhatsApp/erlfmt/pull/235 reads the file twice, but fixes an important issue to not write a file that has not been modified.

Possibly lets always read in the whole file as a string before sending it to the scanner, then it is available for comparison after formatting.

This should simplify a lot of the code and get rid of the file scanner.

awalterschulze avatar Jan 18 '21 09:01 awalterschulze