简体   繁体   中英

Makefile:12: recipe for target 'lint' failed

I'm making a pull request on a GitHub repository. Before making PR I already test my code with PHPUnit and all tests are passed. So, I did the PR on GitHub. But after travis-ci checking my PR, my PR not passed and the error says that:

Makefile:12: recipe for target 'lint' failed

I've no clue about all this error. I think if my PHPUnit test success then I'll pass the travis-ci check. But unfortunately no.

This some error I've got

sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
[32mGenerating optimized autoload files[39m
travis_time:end:2e276f14:start=1563869333859320964,finish=1563869405903083472,duration=72043762508
[0Ktravis_fold:end:install
[0Ktravis_time:start:113ef200
[0K$ make lint
php /home/travis/build/cloudflare/cloudflare-php/vendor/bin/php-cs-fixer fix --config=/home/travis/build/cloudflare/cloudflare-php/.php_cs --dry-run
Loaded config [33mdefault[39m from "/home/travis/build/cloudflare/cloudflare-php/.php_cs".
   1) cloudflare-php/src/Endpoints/Zones.php
   2) cloudflare-php/tests/Endpoints/ZonesTest.php

Checked all files in 0.893 seconds, 14.000 MB memory used
Makefile:12: recipe for target 'lint' failed
make: *** [lint] Error 8
travis_time:end:113ef200:start=1563869405907430819,finish=1563869407016751613,duration=1109320794
[0K[31;1mThe command "make lint" exited with 2.[0m

travis_time:start:0ca9e138
[0K$ make test
php /home/travis/build/cloudflare/cloudflare-php/vendor/bin/phpunit --configuration /home/travis/build/cloudflare/cloudflare-php/phpunit.xml
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

...............................................................  63 / 120 ( 52%)
.........................................................       120 / 120 (100%)

Time: 8.69 seconds, Memory: 10.00MB

OK (120 tests, 720 assertions)
travis_time:end:0ca9e138:start=1563869407021249545,finish=1563869415802590423,duration=8781340878
[0K[32;1mThe command "make test" exited with 0.[0m


Done. Your build exited with 1.

CI/CD pipelines will add a layer of abstraction to your build. Run the test locally and it should output the hints for you =)

$ php ./vendor/bin/phpmd tests/ text cleancode,codesize,controversial,design,naming,unusedcode
/Repos/cloudflare-php/tests/Endpoints/ZonesTest.php:9   The class ZonesTest has 11 public methods. Consider refactoring ZonesTest to keep number of public methods under 10.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM