Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for enforcing line endings from .gitattributes #23

Closed
nedtwigg opened this issue May 8, 2016 · 6 comments
Closed

Add support for enforcing line endings from .gitattributes #23

nedtwigg opened this issue May 8, 2016 · 6 comments

Comments

@nedtwigg
Copy link
Member

nedtwigg commented May 8, 2016

@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.

@sbrannen
Copy link

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/junit5#398

Is my assumption correct?

Thanks in advance for feedback!

Sam

@sbrannen
Copy link

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

@nedtwigg
Copy link
Member Author

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.

@sbrannen
Copy link

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!

@nedtwigg
Copy link
Member Author

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

@nedtwigg
Copy link
Member Author

Fixed in 2.0.0.

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

No branches or pull requests

2 participants