2017 © Pedro Peláez
 

library magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

image

magento-ecg/magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

  • Tuesday, December 15, 2015
  • by zlik
  • Repository
  • 12 Watchers
  • 75 Stars
  • 508 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 20 Forks
  • 3 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library., (*1)

List of Detected Issues

  • SQL Queries Within a Loop
  • Not Limiting Collection Load Result
  • Empty Class
  • Empty Method
  • Expression is Always True
  • Empty Password in Configuration File
  • Handling Overly Broad Event
  • Use of Global Event
  • Configuration Not in adminhtml.xml.

Installation

With Composer:, (*2)

composer require --dev magento-ecg/magniffer

Basic Usage

$ php ./vendor/bin/mgf /path/to/files

Extending

It's easy to create a custom inspection by declaring a message, xpath and inspector in YAML file. For example:, (*3)

message   : Empty Class
xpath     : //node:Stmt_Class[count(subNode:stmts/scalar:array/*) = 0]/subNode:name/scalar:string
inspector : php

The Versions

15/12 2015

dev-master

9999999-dev https://github.com/magento-ecg/magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

  Sources   Download

MIT

The Requires

 

10/09 2015

dev-m2-rulesets

dev-m2-rulesets https://github.com/magento-ecg/magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

  Sources   Download

MIT

The Requires

 

23/03 2015

1.0

1.0.0.0 https://github.com/magento-ecg/magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

  Sources   Download

MIT

The Requires