Skip to content

insert_final_newline does not work #139

@BaumiCoder

Description

@BaumiCoder

editorconfig:check and editorconfig:format do not recognize missing newline if insert_final_newline = true.

I made a little sample project here. Only insert_final_newline and trim_trailing_whitespace are set to true.

The editorconfig:check only find the trailing whitespaces. The missing newlines in the two java files are not recognized:

[INFO] --- editorconfig:0.1.3:check (default-cli) @ MavenEditorConfigTest ---
[ERROR] src/main/java/org/example/Main.java@3,20: Delete 4 characters - violates trim_trailing_whitespace = true, reported by org.ec4j.linters.TextLinter
[ERROR] src/main/java/org/example/Main.java@5,1: Delete 8 characters - violates trim_trailing_whitespace = true, reported by org.ec4j.linters.TextLinter
[INFO] Checked 7 files

editorconfig:format also only correct the whitespaces errors.

Is there some miss configuration on my site or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions