Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

eclint gets confused by multiple line ending #159

Open
@maxthiel

Description

When trying to fix a file that contains multiple type of line ending, eclint appears to get confused and remove a lot of content.

original
Content of the file:

using my.name.space;



namespace my.other.name.space

{

    public class MyClass : IMyInterface { }

    public class MyOtherClass : IMyInterface { }

    public class MyOtherOtherClass : IMyInterface { }
}

As you can see, copy pasting from notepad++ to github already messes with things.
Note that the file is also in UTF-8 + bom.

The .editorConfig is set this way:

[*]
indent_style = space
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

When doing eclint check the result are as follow:

testClass.cs
    01:01 ❌️ invalid charset: utf-8-bom, expected: utf-8
                                                         (EditorConfig charset                  https://goo.gl/hK94EO)
    01:01 ❌️ unexpected trailing whitespace             (EditorConfig trim_trailing_whitespace https://goo.gl/oo8iVb)
    02:01 ❌️ unexpected trailing whitespace             (EditorConfig trim_trailing_whitespace https://goo.gl/oo8iVb)
    03:01 ❌️ unexpected trailing whitespace             (EditorConfig trim_trailing_whitespace https://goo.gl/oo8iVb)
    06:01 ❌️ unexpected trailing whitespace             (EditorConfig trim_trailing_whitespace https://goo.gl/oo8iVb)
    07:01 ❌️ unexpected trailing whitespace             (EditorConfig trim_trailing_whitespace https://goo.gl/oo8iVb)
    09:01 ❌️ unexpected trailing whitespace             (EditorConfig trim_trailing_whitespace https://goo.gl/oo8iVb)

When doing eclint fix the fixed file looks like this:
fixed

The code itself:

{



    public class MyOtherOtherClass : IMyInterface { }

Attaching the files as well:
eclint_crlf_issue.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions