Giter Site home page Giter Site logo

phpqa-extensions's Introduction

PHPQA Extensions

Add more tools to PHPQA

List of tools

Usage

Get the list of available tools

$ php vendor/bin/phpqa-extensions.php --tools

List of available tools
=======================

 --------------------------- -------- ----------------------------- ----------- 
  Name                        CLI      Composer                      Installed  
 --------------------------- -------- ----------------------------- ----------- 
  PhpAssumptions              phpa     rskuipers/php-assumptions     No        
  PhpCodeAnalyzer             phpca    wapmorgan/php-code-analyzer   No        
  PHP Magic Number Detector   phpmnd   povils/phpmnd                 No        
 --------------------------- -------- ----------------------------- ----------- 

Install a tool on a project

$ php vendor/bin/phpqa-extensions.php --add phpmnd

or

$ php vendor/bin/phpqa-extensions.php --add "PHP Magic Number Detector"

or

$ php vendor/bin/phpqa-extensions.php --add povils/phpmnd

Several tools can be add in one times:

$ php vendor/bin/phpqa-extensions.php --add phpmnd --add phpa

Enable an external tool

$ php vendor/bin/phpqa-extensions.php --enable phpmnd:\MacFJA\PHPQAExtensions\Tools\Analyzer\PhpMagicNumber:app/report/phpmagicnumber.xsl

The syntax of the parameter --enabled is: $CLI_NAME$:$WRAPPER_CLASS$ or $CLI_NAME$:$WRAPPER_CLASS$:$REPORT_PATH$. With:

  • $CLI_NAME$: The name of the CLI command
  • $WRAPPER_CLASS$: The class that will be used by PHPQA to call the tool
  • $REPORT_PATH$: The relative path of the XLST file to do the HTML transformation (optional)

Options

Option name Default Tool Description
phpmnd.ignore-numbers null PHP Magic Number Detector List (comma separate) of number to ignore (typically 0,1,2)
phpmnd.ignore-funcs null PHP Magic Number Detector List (comma separate) of function to ignore
phpmnd.ignore-strings null PHP Magic Number Detector List (comma separate) of strings value to ignore
phpmnd.strings false PHP Magic Number Detector Activate the strings literal analysis
phpca.since null PhpCodeAnalyzer Only include extensions not included since version
phpca.extension null PhpCodeAnalyzer Look for usage of a specific extension

How to contribute

If you found a nice tool that you want to added, open a issue on GitHub.

You can also create Pull Request of a new tool.

phpqa-extensions's People

Contributors

macfja avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

connorholt almare

phpqa-extensions's Issues

Add documentation on contributing

Add more documentation on how to contribute to the project.

  • Code of conduct
  • Type of contribution
  • Step by step tutorial on how to create a new tool extension
  • The expected code quality/code style
  • Issue template for new tool

New tool: PhpCodeAnalyzer

Data type Value
Tool name PhpCodeAnalyzer
Composer wapmorgan/php-code-analyzer
Repository https://github.com/wapmorgan/PhpCodeAnalyzer
Xml Output No
Cli return code No
Cli Output Yes

Add the support of the tool wapmorgan/PhpCodeAnalyzer: PhpCodeAnalyzer finds usage of non-built-in extensions in your php code.

The tool don't have XML output. (And adding it look pretty difficult)

Allow the cli command to just enable a tool

In the current version (0.1.0), the cli command can only update the .phpqa.yml (<=> enable a tool) after installing a Composer package.

The issue is: if the tools can not be installed by Composer, then it's impossible to use phpqa-extensions to enable it

But the code already have everything to only update the file .phpqa.yml (see MacFJA\PHPQAExtensions\ToolInstaller\updatePhpQaConfig)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.