Skip to content

Exit code is ignored from phpmd (parsing errors for new php syntax) #230

@archfz

Description

@archfz

Phpmd (v2.10.0) fails for a particular reason in this case (issue with trailing commas in function arguments):

ERROR while parsing 
--------------------
Unexpected token: ), line: 56, col: 5, file

The exit code is printed correctly but phpqa considers this a success.

 73/73 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 
 [Edge\QA\Task\ParallelExec] Output for "/app/vendor/edgedesign/phpqa/../../../vendor/bin/phpmd" "src","tests" xml "/app/phpmd.xml"  --exclude /vendors/,/var/,/tests/_support/_generated/ --suffixes php --reportfile ".phpqa-report/phpmd.xml":


 [Edge\QA\Task\ParallelExec]  Exit code 3  Time 0.447s

[phpqa] 
+---------+----------------+--------------+--------+----------------------------+
| Tool    | Allowed Errors | Errors count | Is OK? | HTML report                |
+---------+----------------+--------------+--------+----------------------------+
| phpcs   | 0              | 0            | ✓      | .phpqa-report/phpcs.html   |
| phpmd   | 0              | 0            | ✓      | .phpqa-report/phpmd.html   |
| phpcpd  | 0              | 0            | ✓      | .phpqa-report/phpcpd.html  |
| phpstan | 0              | 0            | ✓      | .phpqa-report/phpstan.html |
+---------+----------------+--------------+--------+----------------------------+
| phpqa   |                | 0            | ✓      | .phpqa-report/phpqa.html   |
+---------+----------------+--------------+--------+----------------------------+

[phpqa] No failed tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions