我是詹金斯的新手,所以如果这听起来很傻,请原谅我。
我似乎无法在 Jenkins 中运行 checkstyle,我已经设置了构建文件并添加了所需的信息(如下),但它不会获取文件。
我得到的错误是:'build/logs/checkstyle.xml' 不匹配任何东西:'build' 存在但不是 'build/logs/checkstyle.xml'
<target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
<exec executable="phpcs" output="/dev/null">
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/phpcs.xml" />
<arg value="--patterns=${source}/Plugin/Purifier/Vendor/" />
<arg path="${source}" />
</exec>
</target>
来自命令行的错误
phpcs:
[exec] Result: 2
phpcs.xml 文件
<?xml version="1.0"?>
<ruleset name="Sebastian">
<description>Sebastian Bergmann's coding standard</description>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
</ruleset>
报告的错误:
错误 未找到报告文件。配置错误?
更新
错误我已经解决了上述错误,现在得到以下信息:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /usr/share/php/PHP/CodeSniffer/File.php on line 1389
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpcs:0
PHP 2. PHP_CodeSniffer_CLI->process() /usr/bin/phpcs:37
PHP 3. PHP_CodeSniffer->process() /usr/share/php/PHP/CodeSniffer/CLI.php:545
PHP 4. PHP_CodeSniffer->processFile() /usr/share/php/PHP/CodeSniffer.php:496
PHP 5. PHP_CodeSniffer->_processFile() /usr/share/php/PHP/CodeSniffer.php:1209
PHP 6. PHP_CodeSniffer_File->start() /usr/share/php/PHP/CodeSniffer.php:1331
PHP 7. PHP_CodeSniffer_File->_parse() /usr/share/php/PHP/CodeSniffer/File.php:382
PHP 8. PHP_CodeSniffer_File::tokenizeString() /usr/share/php/PHP/CodeSniffer/File.php:586
PHP 9. PHP_CodeSniffer_File::_createScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:956
PHP 10. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1344
PHP 11. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 12. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 13. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 14. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 15. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 16. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 17. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 18. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 19. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 20. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 21. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 22. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 23. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 24. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 25. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 26. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 27. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 28. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 29. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 30. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 31. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 32. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 33. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 34. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 35. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 36. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 37. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 38. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 39. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 40. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 41. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 42. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 43. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 44. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 45. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 46. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 47. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 48. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 49. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 50. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 51. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 52. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 53. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 54. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 55. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 56. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 57. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 58. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 59. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 60. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 61. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 62. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 63. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 64. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 65. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 66. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 67. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 68. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 69. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 70. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 71. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 72. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 73. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 74. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 75. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 76. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 77. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 78. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 79. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 80. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 81. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 82. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 83. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 84. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 85. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 86. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 87. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 88. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 89. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 90. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 91. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 92. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 93. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 94. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 95. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 96. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 97. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 98. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480
PHP 99. PHP_CodeSniffer_File::_recurseScopeMap() /usr/share/php/PHP/CodeSniffer/File.php:1480