Column of a syntax error is off by one for each emoji earlier on the line (CoffeeScript counts UTF-16 units)
Column of a syntax error is off by one for each emoji (non-BMP character) earlier on the line: CoffeeScript counts UTF-16 units
Version: SublimeLinter-coffeelint 3.x from Package Control, coffeelint (latest, with coffeescript 2.x), the CoffeeScript syntax package, SublimeLinter 4, Sublime Text 4215 on Windows. Reproduced in a clean install.
For a syntax error coffeelint puts the CoffeeScript compiler message in reason, and the plugin takes the column from [stdin]:LINE:COL. d.coffee (UTF-8):
s = "😀😀" ; foo bar baz(
coffeelint --reporter jslint --stdin < d.coffee:
<issue line="1"
lineEnd="1"
reason="[error] [stdin]:1:25: error: missing )
s = "😀😀" ; foo bar baz(
^"
The error is at the ( of baz(, which is character 23 (1-based) as Sublime counts, but the compiler says 25: each 😀 (U+1F600) is two UTF-16 code units in JavaScript strings. In Sublime the mark starts two characters too far to the right, on the line break at the end of the line (start 23, expected 22, 0-based). é and other single-unit characters do not shift anything.
The ordinary coffeelint results (for example "Class name should be UpperCamelCased") have no column and are marked correctly.
The same problem is reported for SublimeLinter-coffee (SublimeLinter/SublimeLinter-coffee#6), and a fix was merged for SublimeLinter-xmllint (bytes) and proposed for SublimeLinter-tslint and -javac (UTF-16). Suggested fix: override reposition_match(self, line, col, m, vv), take the line via vv.select_line(line), and convert the UTF-16 offset to a character offset by walking the line and counting every character above U+FFFF twice. I can prepare a PR if you would like one.
Ack, you can make a PR.