Hi. I would like to share a plugin that helps to analyze code quality when developing on Magento 2 CMS platform taking into account the peculiarities of this platform
Plugin key: magento2php
plugin description
A plugin presenting the ability to analyze php code for Magento 2.
Added 28 new rules, each of which relies on either existing M2 guidelines or official phpcs rules.
The plugin is used in production on more than 20 projects ( SQ server intance ) for several months.
Rules covered by functional tests
Most of the bureaucratic requirements look okay except #7. I see that the project is analyzed on SonarQube Cloud, but the Quality Gate isn’t green (because there’s only been one analysis).
Beyond that, could you provide me a project for testing this with?
Yes, one of those git repositories.
It is enough to include only app/** directory in the analysis (in case of official repository), and analyze with included ruleset from the SQ rules repository with magento2 key
This plugin seems generally well-behaved (no errors in the server logs & analysis logs look normal.)
And I’m wondering if some of your rule descriptions don’t reflect reasoning that’s purely internal to your organization and could use a cleanup for general consumption?
E.G.
magento2:ImportsFromTestNamespace
Time to time we’re getting issue with running tests on PRs in magento/magento2 repository because someone imported \Magento\Tests\NamingConvention\true\string by mistake. As result - we have “No build reports available” for “Database Compare build”, “Functional Tests build”, “Sample Data Tests build” while Static tests are shown as “failing” but in results - we don’t really have reason
That said, the rule descriptions in general are nicely detailed. Well done.
I’ll proceed with the PR.
And I ask that you consider reviewing your descriptions for the next release.
I will take into account all comments about the plugin and PR to SQ repo.
But I must warn you that I won’t be able to make any edits today as I’m no longer at the PC.
Regarding the above description - hmmm, really incorrect interpretation, but it’s not a design specificity of my organization, but a random copy-paste from adobe’s tech guidelines description
Hi. I noticed that the PR has been accepted and the plugin has appeared on Marketplace, can this be considered a great success, or will there be more checks)?