Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magento-ecg/magniffer
An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.
https://github.com/magento-ecg/magniffer
Last synced: 15 days ago
JSON representation
An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.
- Host: GitHub
- URL: https://github.com/magento-ecg/magniffer
- Owner: magento-ecg
- License: mit
- Created: 2013-09-20T10:33:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-04T18:05:20.000Z (over 8 years ago)
- Last Synced: 2024-07-25T01:58:01.929Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 74
- Watchers: 13
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
magniffer
=========An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.
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](http://getcomposer.org/):
```
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:
```
message : Empty Class
xpath : //node:Stmt_Class[count(subNode:stmts/scalar:array/*) = 0]/subNode:name/scalar:string
inspector : php
```