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

Failed due to line endings #926

Closed
snky1987 opened this issue Jan 6, 2015 · 6 comments
Closed

Failed due to line endings #926

snky1987 opened this issue Jan 6, 2015 · 6 comments
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line improvement Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@snky1987
Copy link

snky1987 commented Jan 6, 2015

Could someone explain me how crucial line endings are that Travis keep throwing an error because in column 1 line 1 /n is expected and /n/r is found ?

If its not really important is it possible to exclude line endings form PHP Standards check please ?
Or if not then please explain how to fix it (I code in Windows 7/8 so far)

@antonmakarenko
Copy link

PHP coding standard that we use requires UNIX-style (\n) line endings. If you use any modern IDE, you should be able to configure it, so it will use \n line endings.

@snky1987
Copy link
Author

snky1987 commented Jan 6, 2015

@antonmakarenko Yes you are right. In NetBeans 8.0 I am able to configure line endings but when i push changes it is automatically translated to Windows style :/ I will try to find a way tomorrow :) There must be something.

@nyov
Copy link

nyov commented Jan 7, 2015

make sure your .gitconfig is set up correctly, specifically the core.autocrlf and maybe core.safecrlf settings.

[core]
    autocrlf = true

will force normalization of lineendings. You may want to use autocrlf = input and safecrlf = warn in your magento repo .git/config.

Maybe the team would feel like providing a .gitattributes file (http://git-scm.com/docs/gitattributes) in the repo to enforce this convention on *.php files (eol=lf)?

@snky1987
Copy link
Author

snky1987 commented Jan 7, 2015

Thanks. I found solution here: https://help.github.com/articles/dealing-with-line-endings/
Sometimes all tests are right (even the DateTest) sometimes DtateTest is ok but not PHPstandards etc. Anyway this solution fixed most of issues with line endings. When I run this test in my local machine it still shows line ending error for 99% of project (report xml file is over 2mb at the end) but not files that I push to commit :)

@snky1987
Copy link
Author

snky1987 commented Jan 7, 2015

@mage2-team Will it be possible to access report file somehow form Travis CI test about PHP coding standards ?

There are things that I can't test locally (or my coding standards tests are passing correctly) while Travis still throws TEST_SUITE=static_annotation with PHP 5

I was able to change all line endings to LF when pushing to repo with cache update so CRLF/LF issue is no longer an issue (or shouldn't be) and checked code with recent coding standards (incl. Zend and PEAR). But it's still failing and I wish to know what is the case exactly.

Solved. Issue was about either 80cheracters long line (but there was a code over 80 char already) or wrong array declaration. I used array() and it suppose to be [] ;)

@snky1987 snky1987 closed this as completed Jan 7, 2015
magento-team pushed a commit that referenced this issue Mar 15, 2017
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Sep 25, 2019
@magento-engcom-team
Copy link
Contributor

Hi @snky1987. Thank you for your report.
The issue has been fixed in magento/graphql-ce#952 by @pmclain in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.4 release.

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line improvement Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

5 participants