You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
phpcs on windows throws on every file following error: End of line character is invalid; expected "\n" but found "\r\n"
FILE: ...\MAMP\htdocs\api-client-php\tests\Idoit\APIClient\SubnetTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Actual behavior
phpcs on windows throws on every file following error: End of line character is invalid; expected "\n" but found "\r\n"
Found this Issue:
squizlabs/PHP_CodeSniffer#2554
Steps to resolve the behavior
I'm not firm with phpcs, so I can't judge if my successful test can be a solution!
create ruleset.xlm from following link
https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/src/Standards/PSR2/ruleset.xml
Change eolChar from "\n" to "\r\n"
"phpcs-win": "./vendor/bin/phpcs --standard=ruleset.xml --extensions=php src/ tests/",
composer phpcs-win
Environment
Windows
The text was updated successfully, but these errors were encountered: