Automattic / vip-go-compatibility-scanner

Scan for compatibility problems in repository code using PHPCS with any standard, report as GitHub issues.
5 stars 1 forks source link

Possibly cache results of scanned files #23

Closed gudmdharalds closed 3 years ago

gudmdharalds commented 3 years ago

Many repositories can potentially include the same code, which should not be scanned again (in theory). Is there a benefit of caching results of PHPCS scans for individual files?

Example: Using PHPCS to scan itself using the PHPCompatibilityWP standard took 47 seconds (on a VM, Intel i7). Only around 800 PHP files. Reading the results from a file for each file scanned would have taken a lot less than that.

Caching key (a hash) could make use of the following factors, combined:

This way we could make use of the results for each file, again and again, without re-running PHPCS.