Skip to content

Add support for enforcing line endings from .gitattributes #23

Closed

Description

@nedtwigg

@chkpnt submitted a great PR #22 which allows different line endings for different formats. After discussion, we've decided to instead implement support for the .gitattributes eol property.

Provisionally, support will look like this:

spotless {
    lineEndings GITATTRIBUTES
}

This should probably have been the default behavior all along, but it's a breaking change compared to the current default, lineEndings PLATFORM_NATIVE. As a result I think I'll make this next release version 2.0 to alert users to check the changelog.

As for timeline, I'm planning on implementing this in late June when Eclipse 4.6 and Gradle 2.14 will be released, the combination of which should fix quite a few issues.

Activity

  1. sbrannen commented on Jul 14, 2016

    @sbrannen

    Hi @nedtwigg,

    If I'm not mistaken, the proposal here would solve the problem raised by a user who is trying to build JUnit 5 on Windows: junit-team/junit-framework#398

    Is my assumption correct?

    Thanks in advance for feedback!

    Sam

  2. sbrannen commented on Jul 14, 2016

    @sbrannen

    Also, no pressure... but are you still planning on releasing Spotless 2.0 in the near future?

  3. nedtwigg commented on Jul 14, 2016

    @nedtwigg
    MemberAuthor

    Hi @sbrannen! I just finished up goomph, which makes it easier for Spotless to get new versions of Eclipse (namely neon).

    With that finished, my task list is:

    • incorporate neon (seems a few things are now broken)
    • support .gitattributes

    Looking at the linked bug, I think Spotless 2.0 will not fix it automatically, and I think there's a way to fix it in Spotless 1.x. I replied on the issue itself.

  4. sbrannen commented on Jul 15, 2016

    @sbrannen

    Thanks for the prompt feedback!

    Goomph sounds interesting. Seems you've been hard at work.

    I followed your advice on the line ending issue in JUnit on Windows, and as far as I can tell... it works like a charm.

    Cheers!

  5. nedtwigg commented on Aug 16, 2016

    @nedtwigg
    MemberAuthor

    Finally landed .gitattributes support in 2.0.0-SNAPSHOT. Ready for testing, see CHANGES.md for details.

  6. nedtwigg commented on Aug 16, 2016

    @nedtwigg
    MemberAuthor

    Fixed in 2.0.0.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions