yireo / Yireo_ExtensionChecker

Magento 2 module to check upon the code of Magento 2 modules from the CLI
90 stars 16 forks source link

Idea about a new feature #49

Open cegento opened 9 months ago

cegento commented 9 months ago

Hello,

i wanted to propose the following idea which helps users to only scan modules which they have edited:

A new command (lets say) yireo_extensionchecker:scan:changed which scans every edited module based on the git history

Example: User A has 3 modules (Catalog Module, EditQuote Module, Coupon Module) and edited 2 modules (EditQuote Module and Coupon Module)

yireo_extensionchecker:scan:changed would then only scan EditQuote Module and Coupon Module.

A dependency i would recommend is https://github.com/sebastianfeldmann/git (to have a more comfortable access to git in php)

cegento commented 8 months ago

hello @jissereitsma, may i ask you what you think about this idea?

jissereitsma commented 8 months ago

I definitely like the idea. However, adding this to the module itself will clutter things with dependencies, while it is not being used for everyone. What about building a separate module for this? This module can have the Git dependency as you say, and it is able to run the same code that ScanCommand is using, or even call the scan command itself via code (https://symfony.com/doc/current/console/calling_commands.html).