You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.
I'm trying to use eclint as part of a CI pipeline. One frequent problem I have is some IDEs save files with unusual encodings that are treated as binary by git and other tools. This prevents code review, diffing, linting, etc. I was trying to use editorconfig to specify a UTF-8 charset, and eclint to unsure all our encodings are useful before code hits the master branch. Currently, eclint is ignoring some files.
I'm unsure of how to correct this; all I can think of is:
file a bug with file-type
add logic in eclint to consider binary-looking files if there are editorconfig rules that would apply to that filename; the charset rules feel useless if we never evaluate them
The text was updated successfully, but these errors were encountered:
Looks like file-type has fixed their bug upstream, and also introduced backwards incompatible API changes. I think a small patch to cli.ts might do it. Is this project still active?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to use eclint as part of a CI pipeline. One frequent problem I have is some IDEs save files with unusual encodings that are treated as binary by git and other tools. This prevents code review, diffing, linting, etc. I was trying to use editorconfig to specify a UTF-8 charset, and eclint to unsure all our encodings are useful before code hits the master branch. Currently, eclint is ignoring some files.
Reproduction case:
eclint check
Expected behavior:
invalid charset: utf-16le, expected: utf-8
Actual behavior:
Investigation
I debugged a little bit and I think I found the cause, the
excludeBinaryFile
guard in https://github.com/jedmao/eclint/blob/master/lib/cli.ts#L39When given my
bad.sql
sample file, thefile-type
library thinks that's an MP3. Small test code to prove that:I'm unsure of how to correct this; all I can think of is:
file-type
eclint
to consider binary-looking files if there are editorconfig rules that would apply to that filename; the charset rules feel useless if we never evaluate themThe text was updated successfully, but these errors were encountered: