-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
In our codebase we had one Kotlin file, which first three bytes were the UTF-8 BOM 0xEF 0xBB 0xBF. Most tools ignore these three bytes, but ktfmt didn't and reported an error:
TestWithBom.kt:1:1: error: Expecting an element
It took a while to figure out what's wrong with the file, because the syntax is correct and most editors don't highlight these bytes. It's clear to me, that the UTF-8 BOM is redundant and we removed it, but it would be better, if ktfmt would ignore the BOM by default.
I attached a .zip file that contains two .kt files to reproduce the issue.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers