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

Check whether line endings are LF with Travis CI #264

Merged

Conversation

junichi11
Copy link
Member

  • Change line endings of a few files to LF.
  • Add a script for Travis CI to check line endings.

@junichi11 junichi11 force-pushed the travis-script-for-checking-line-endings branch from c87af96 to a5e503d Compare November 9, 2017 14:07
@geertjanw
Copy link
Member

+1 looks good to me. Would be good if someone else reviewed this too.

@junichi11 junichi11 force-pushed the travis-script-for-checking-line-endings branch from a5e503d to 65f1ade Compare November 11, 2017 01:42
@junichi11
Copy link
Member Author

@geertjanw Thanks a lot for your review!

Jan is working on #269. So I'll fix .travis.yml again after Jan's changes are merged.

@junichi11 junichi11 force-pushed the travis-script-for-checking-line-endings branch from 65f1ade to 43fae6a Compare November 13, 2017 22:59
@lbruun
Copy link
Contributor

lbruun commented Nov 19, 2017

Great stuff.

I'm far from a git expert but as far as I understand there also the solution of using a .gitattributes file. Because this file lives in the repo itself, users will automatically get the correct git setting when they clone the repo. See Vaadin project on GitHub for an example of such a file.

I'm thinking that we should probably do both this PR as well as as .gitattributes file, but someone with git experience will probably know if the .gitattributes solution is worthwhile.

- Change line endings of a few files to LF.
- Add a script for Travis CI to check line endings.
@junichi11 junichi11 force-pushed the travis-script-for-checking-line-endings branch from 43fae6a to cc305bb Compare November 23, 2017 03:29
@junichi11 junichi11 merged commit b5aaf27 into apache:master Nov 23, 2017
@junichi11
Copy link
Member Author

Changed /** to /*

@junichi11 junichi11 deleted the travis-script-for-checking-line-endings branch November 23, 2017 03:57
@lbruun
Copy link
Contributor

lbruun commented Nov 23, 2017

@junichi11
I think we should monitor if this works or not. As far as I can tell the check relies on Git's ability to predict if a certain file is to be considered a text file or not. There may be some text files where we actually find it ok for them to use CRLF. Files of type .rc comes to mind. These are Windows resource scripts and have no relevance outside of Windows. Just an example.

I've now proposed PR290. These two PRs will complement each other.

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

Successfully merging this pull request may close these issues.

None yet

3 participants