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

"grunt lint" fails on Windows with many "Invalid line break" errors #1030

Closed
DanTup opened this issue Apr 12, 2014 · 5 comments
Closed

"grunt lint" fails on Windows with many "Invalid line break" errors #1030

DanTup opened this issue Apr 12, 2014 · 5 comments

Comments

@DanTup
Copy link
Contributor

DanTup commented Apr 12, 2014

When I run grunt lint on Windows; I get a bunch of Invalid line break errors. For example:

Invalid line break at lib/reporters/progress.js :
     1 |var BaseReporter = require('./base');
---------------------------------------------^
     2 |
     3 |
Invalid line break at lib/reporters/progress_color.js :
     1 |var ProgressReporter = require('./progress');
-----------------------------------------------------^
     2 |var BaseColorReporter = require('./base_color');
     3 |
Invalid line break at lib/runner.js :
     1 |var http = require('http');
-----------------------------------^

I've tried setting core.autocrlf to true, false and unset it (doing a clean checkout each time) with no joy. Note: I'm a bit of a Git noob, so I may be doing this wrong; but it'd be useful to figure out to make contributing easier!

@vojtajina
Copy link
Contributor

Hmm, this is weird. I just tried even removing .gitattributes and
changing the reported lines and there was no change. All the line endings
seem to be fine. Can you try configure your editor to use LF?

Or can you try set text eol=lf in .gitattributes (see
https://help.github.com/articles/dealing-with-line-endings)

On Sat, Apr 12, 2014 at 12:19 PM, Danny Tuppeny [email protected]:

When I run grunt lint on Windows; I get a bunch of Invalid line breakerrors. For example:

Invalid line break at lib/reporters/progress.js :
1 |var BaseReporter = require('./base');
---------------------------------------------^
2 |
3 |
Invalid line break at lib/reporters/progress_color.js :
1 |var ProgressReporter = require('./progress');
-----------------------------------------------------^
2 |var BaseColorReporter = require('./base_color');
3 |
Invalid line break at lib/runner.js :
1 |var http = require('http');
-----------------------------------^

I've tried setting core.autocrlf to true, false and unset it (doing a
clean checkout each time) with no joy. Note: I'm a bit of a Git noob, so I
may be doing this wrong; but it'd be useful to figure out to make
contributing easier!

Reply to this email directly or view it on GitHubhttps://github.com//issues/1030
.

@DanTup
Copy link
Contributor Author

DanTup commented Apr 14, 2014

I didn't open any files in the editor after cloning, so isn't an editor. I'll dig into it further when I get chance and see if I can figure out what's happening.

@sylvain-hamel
Copy link
Contributor

@DanTup I had the same problem until I cleared all global and system eol settings. Make sure you don't have any settings related to eof in C:\Users\YOU\.gitconfig

@DanTup
Copy link
Contributor Author

DanTup commented Apr 18, 2014

@sylvain-hamel I did the same (after reading your comment elsewhere); with no joy. The setting was completely unset (though whether this causes something different on Windows to other OSes, I don't know).

Additionally; even if this did fix it; it should not be a requirement to change system level config for it to work - there should be some ability to set it at the repo level. The more I use Git; the more I hate it :-/

@dignifiedquire
Copy link
Member

For questions and support please use the mailing list or Gitter. The issue tracker is for bug reports and feature discussions only.

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

4 participants