How to specify end-line characters for build_runner in flutter

Viewed 89

We are using generated mocks and JSON serialization in flutter. The command build_runner generating the necessary code always produces code with CRLF at the end. In git we store all files with LF as recommended and convert CRLF endings respectively on commit. This leads to misleading diffs for all files with every build_runner execution: When only one file has to be updated, it vanishes between tons of LF-CRLF updates.

How do you deal with this issue?

Is it possible to set the end-line character for the builder?

0 Answers
Related