Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add problem matcher support for PHPMD #45

Closed
DmitryFurs opened this issue Nov 26, 2021 · 3 comments
Closed

Add problem matcher support for PHPMD #45

DmitryFurs opened this issue Nov 26, 2021 · 3 comments

Comments

@DmitryFurs
Copy link

In the coding-standard action, support for problem matcher has been added, and when creating a pull request, all the problems found are highlighted when viewing the execution result, as well as when viewing the pull request itself. The found problems that were not affected by the new changes are also displayed.

image

image

image

But when viewing the result of the execution of PHPMD, we can only see the result of the execution by opening the logs. This is inconvenient, since you need to copy the filepath and search for the desired string.

image

image

Judging by the PHPMD documentation they have an implemented renderer supported by github
https://phpmd.org/documentation/index.html#renderers
https://phpmd.org/documentation/ci-integration.html#github-actions

Judging by the code, the text renderer is currently being used, and if it is replaced with "github, then everything should work automatically.
https://github.com/extdn/github-actions-m2/blob/master/magento-mess-detector/LiveCodePhpmdRunner.php#L62

If it doesn't work, then most likely we need to implement an additional problem matcher to support PHPMD, as it is done for Coding Standard https://github.com/extdn/github-actions-m2/blob/master/magento-coding-standard/problem-matcher.json

@sprankhub
Copy link
Collaborator

Thanks for the nice suggestion and analysis! It all sounds reasonable to me, mind sending a PR?

@DmitryFurs
Copy link
Author

@sprankhub thanks! feel free to contribute :)

@sprankhub
Copy link
Collaborator

Oh, I did not want to steal that simple fix after your perfect analysis, but sure: #46. Not sure how we can test this properly, though 🤔

jissereitsma added a commit that referenced this issue Dec 10, 2021
Use GitHub report format for phpmd, fixes #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants