jednano/eclint

False-Errors With Latin1

tajmone opened this issue · 1 comments

EClint reports as an error the presence of an acute accent ($B4: ´) inside an ISO-8859-1 encoded file configured to charset = latin1:

syntax_test_interpolation-ascii.hug
    11:49 ❌ character out of latin1 range: "�"

Here's a link to the repository where I've encountered this problem:

I had to suppress the charset = latin1 option in the .editorconfig file:

## Hugo Interactive Fiction
###########################
; Hugo sources are strictly in ISO-8859-1 (aka Latin1).
;   https://www.generalcoffee.com/hugo

[hugo/*.{hug,h,g}]
; charset = latin1  # BUGGY: reports acute accent as invalid char.
;                            (see: github.com/jedmao/eclint#169)
indent_style = space
indent_size = unset
end_of_line = unset
trim_trailing_whitespace = true
insert_final_newline = true

because it was reporting the following errors for the hugo/syntax_test_interpolation-ascii.hug file:

$ eclint check syntax_test_interpolation-ascii.hug
syntax_test_interpolation-ascii.hug
    11:49 ❌ character out of latin1 range: "�"
                                                (EditorConfig charset https://goo.gl/hK94EO)
    20:05 ❌ character out of latin1 range: "�"
                                                (EditorConfig charset https://goo.gl/hK94EO)
    20:10 ❌ character out of latin1 range: "�"
                                                (EditorConfig charset https://goo.gl/hK94EO)
    20:15 ❌ character out of latin1 range: "�"
                                                (EditorConfig charset https://goo.gl/hK94EO)
    20:20 ❌ character out of latin1 range: "�"
                                                (EditorConfig charset https://goo.gl/hK94EO)