So no other way how to ensure new line at the end ...
# codingconventions
e
So no other way how to ensure new line at the end of file except .editorconfig file?
l
I think Detekt or KTlint can ensure that as well
e
Thanks, I was more not to check on CI but have some IDE settings to have it in the first place
j
You can configure it in the IDE settings, at least in IntelliJ IDEA (you should be able to find the setting using the search bar, I don't recall from the top of my head - it's probably in Editor>General or something)
e
What I'm trying to avoid that every new comer has to tick it manually, or dev changed machine or similar cases
l
Detekt with autocorrect and a pre-commit hook maybe?
e
Yeah, but commit hook require the manual setup first, correct?
l
You're right
c
EOL requirements can also be specified in
.gitattributes
, e.g. :
Copy code
# default is unix line endings for all files

* text eol=lf
k
Does
.gitattributes
let you mandate that the last line of the file is terminated with LF? I couldn't find such a setting.
e
I felt it is also specific
end of line
in the whole file and not the
end of line
char presence at the end of file