Shopware 6 Local Plugin Linting

23 views Asked by At

When creating a Plugin as an extension partner on account.shopware.com the code will run through a static code analysis.

Is there any way to run the code analysis locally?

I could not find anything about that topic in any Shopware documentation.

1

There are 1 answers

0
Alex Berger On

Here's the full Quality Guideline for Shopware6 Plugins (and probably Apps).
The guidline is a bit cluttered in my opinion, so the relevant part for the automatic tests is a bit hidden in it.

Automatic code reviews with PhpStan and SonarQube are used, when uploading a Plugin to the Shopware store -> here's the Test Profile on GitHub.

Also for administration, Shopware itself is using Automated code tests with Cypress for JavaScript. I haven't seen many plugins having those tests. So I don't think it's mandatory (but tests are good thing to do in general).