Skip to content

v2 vendored phpmd issues with order of commands and also vendored_phpmd_path is ignored #6

Open
@ulamthelucky

Description

@ulamthelucky

There is a few observed issues:

  1. The vendor bin is fixed so using the vendored_phpmd_path - Path to a vendored phpmd binary option has no effect. This can obviously be worked around by just ensuring composer is run from the root of the project, but this option should either be removed or fixed so it works.

  2. the order of arguments is submitted wrong to phpmd:

Image

I am able to replicate this message by running phmd directly:

vendor/bin/phpmd server phpmd.xml github
Can't find the custom report class: phpmd.xml

If the order of the parameters is changed the problem is resolved:

$ vendor/bin/phpmd server/module/Application/src/Application/ text phpmd.xml
..... \server\module\Application\src\Application\Controller\ControllerListenerFactory.php:21 UnusedFormalParameter Avoid unused parameters such as '$requestedName'.

The order appears to require to be: binary, path, report format, ruleset or file

Version of phpmd:
PHPMD 2.15.0

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