jednano / eclint

Validate or fix code that doesn't adhere to EditorConfig settings or infer settings from existing code.
MIT License
307 stars 28 forks source link

Empty file brings a wrong warning #28

Closed sanemat closed 9 years ago

sanemat commented 9 years ago

Is this expected behavior?

# .editorconfig
insert_final_newline = true

$ touch empty.md

## Expected
$ eclint check empty.md
(no warning)
# exit code = 0

## Actual
$ eclint check empty.md
empty.md: expected final newline
# exit code = 1

My environments:

eclint v0.2.6
node.js v0.12.7
OS X 10.9.5
jednano commented 9 years ago

Pretty sure that's expected. I don't think the touch command puts a newline in the file, so it's missing the final newline.

sanemat commented 9 years ago

I want to run $ eclint check "*.md". I don't know what to do.

sanemat commented 9 years ago

Thanks!