All Projects → jmolivas → Phpqa

jmolivas / Phpqa

Licence: mit
PHPQA all-in-one Analyzer CLI tool

Projects that are alternatives of or similar to Phpqa

Sublime Phpcs
🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter and Mess Detector Support for Sublime Text
Stars: ✭ 805 (+139.58%)
Mutual labels:  linter, php-codesniffer
Psscriptanalyzer
Download ScriptAnalyzer from PowerShellGallery
Stars: ✭ 1,137 (+238.39%)
Mutual labels:  linter, analyzer
fsharp-linting-for-vs
Visual Studio Linter for F#
Stars: ✭ 33 (-90.18%)
Mutual labels:  linter, analyzer
Darglint
A python documentation linter which checks that the docstring description matches the definition.
Stars: ✭ 285 (-15.18%)
Mutual labels:  linter
Rhit
A nginx log explorer
Stars: ✭ 231 (-31.25%)
Mutual labels:  analyzer
Errwrap
Go tool to wrap and fix errors with the new %w verb directive
Stars: ✭ 312 (-7.14%)
Mutual labels:  analyzer
Pmd
An extensible multilanguage static code analyzer.
Stars: ✭ 3,667 (+991.37%)
Mutual labels:  linter
Typl
The Type Linter for JS
Stars: ✭ 282 (-16.07%)
Mutual labels:  linter
Dlint
Dlint is a tool for encouraging best coding practices and helping ensure we're writing secure Python code.
Stars: ✭ 320 (-4.76%)
Mutual labels:  linter
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+1251.49%)
Mutual labels:  linter
Awesome Standard
Documenting the explosion of packages in the standard ecosystem!
Stars: ✭ 300 (-10.71%)
Mutual labels:  linter
Go Consistent
Source code analyzer that helps you to make your Go programs more consistent.
Stars: ✭ 293 (-12.8%)
Mutual labels:  linter
Gts
☂️ TypeScript style guide, formatter, and linter.
Stars: ✭ 3,714 (+1005.36%)
Mutual labels:  linter
Eclint
Validate or fix code that doesn't adhere to EditorConfig settings or infer settings from existing code.
Stars: ✭ 288 (-14.29%)
Mutual labels:  linter
Reorder python imports
Rewrites source to reorder python imports
Stars: ✭ 320 (-4.76%)
Mutual labels:  linter
Vulnerable Node
A very vulnerable web site written in NodeJS with the purpose of have a project with identified vulnerabilities to test the quality of security analyzers tools tools
Stars: ✭ 282 (-16.07%)
Mutual labels:  analyzer
Pylint
It's not just a linter that annoys you!
Stars: ✭ 3,733 (+1011.01%)
Mutual labels:  linter
Kataribe
Access log profiler based on response time
Stars: ✭ 298 (-11.31%)
Mutual labels:  analyzer
Bandit
Bandit is a tool designed to find common security issues in Python code.
Stars: ✭ 3,763 (+1019.94%)
Mutual labels:  linter
Pytype
A static type analyzer for Python code
Stars: ✭ 3,545 (+955.06%)
Mutual labels:  linter

PHPQA

PHPQA Analyzer CLI tool

Overview

This project aims to serve as a CLI tool to make easy the use of different PHP tools related to Quality Assurance and code analysis in PHP.

Every analyzer tool handles arguments and options using different formats, the goal of this project is to provide a single way to interact with those projects, you can also set options and arguments using a default configuration file when the project supports it.

This project was originally developed as part of Drupal Console and based on the blog post Write your git hooks in PHP and keep them under git control.

Available Analyzers

  • PHP Parallel Lint

    This tool check syntax of PHP files faster then serial check with fancier output.

    PHP-Parallel-Lint

  • PHP Coding Standards Fixer

    The PHP Coding Standards Fixer tool fixes most issues in your code when you want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 documents.

    PHP-CS-Fixer

  • PHP_CodeSniffer

    PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations.

    PHPCBF

    PHPCS

  • PHPMD - PHP Mess Detector

    It is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly and easy to configure frontend for the raw metrics measured by PHP Depend.

    PHPMD

  • PHPLOC

    phploc is a tool for quickly measuring the size and analyzing the structure of a PHP project.

    PHPLOC

  • PHPDCD - PHP Dead Code Detector

    phpdcd is a Dead Code Detector (DCD) for PHP code. It scans a PHP project for all declared functions and methods and reports those as being "dead code" that are not called at least once.

    PHPDCD

  • PHPCPD - PHP Copy/Paste Detector

    phpcpd is a Copy/Paste Detector (CPD) for PHP code.

    PHPCPD

  • PHPUnit

    PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.

    PHPUnit

Install

Cloning the project

$ git clone [email protected]:jmolivas/phpqa.git
$ cd phpqa
# download dependencies
$ composer install
# make phpqa globally accessible creating a symlink
$ ln -s /path/to/phpqa/bin/phpqa /usr/local/bin/phpqa

Usage

Copy configuration file(s)

$ cd to/project/path
$ phpqa init --project=PROJECT --override
$ phpqa init --global --override
Option Description
project Available values php, symfony and drupal.
global Copy configuration files to user home directory, instead of current working directory.
override If this option is set, files are copied using override flag.

NOTES:

  • Option global does not accept a value must be set as --global.
  • Option override does not accept a value must be set as --override.
  • Options project and global can not used in combination.

Analyze a project

$ cd to/project/path
$ phpqa analyze --project=PROJECT --files=FILES
$ phpqa analyze --project=PROJECT --git
Option Description
project Available values php, symfony and drupal
files Files or directories to analyze.
git If this option is set, all files added to git index will be scanned. This is useful when setting executing this tool on a pre-commit git-hook.

NOTES:

  • Option git does not accept a value must be set as --git.
  • Option project could be omitted if a phpqa.yml or phpqa.yml.dist file is available at current working directory.
  • Options files and git can not used in combination.

Override configuration

This project was built to be fully customizable, you can enable/disable analyzers and modify arguments/options passed to analyzers by updating the phpqa.yml or phpqa.yml.dist file on your project root copied when running init command, or the files ~/.phpqa/php/config.yml, ~/.phpqa/symfony/config.yml or ~/.phpqa/drupal/config.yml copied when running init command using --global option.

Nice to have features

This project is a work-in-progress and needs some love related to code clean up, test coverage and documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].