Skip to content

HippoPHP/Hippo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hippo

StyleCI Build Status Code Climate Test Coverage Dependencies

Installation & Usage

Either PHP 5.5+ or HHVM 3.6+ are required.

To get the latest version of Hippo, simply require the project using Composer:

$ composer require hippophp/hippo

If you want to develop Hippo, you'll need Git and >= PHP 5.5 installed on your system.

Clone the repo to your local environment:

$ git clone git@github.com:hippophp/hippo.git

Then install the dependencies:

$ cd hippo
$ composer install

Usage

Once Hippo is in a directory you can run it with:

$ ./bin/hippo ./src

By default Hippo will output everything to STDOUT. You can get help information with:

$ ./bin/hippo --help
Hippo 0.1.0 by James Brooks, Marcin Kurczewski

Usage: hippo [switches] <directory>
  -h, --help                Prints this usage information
  -v, --version             Print version information
  -l, --log LOGLEVELS       Sets which severity levels should be logged
                            (default: "info,warning,error")
  -s, --strict 1|0          Enables or disables strict mode (default: 0)
                            Strict mode will exit with code 1 on any violation.
  -q, --quiet 1|0           Same as --log ""
      --verbose 1|0         Same as --log "info,warning,error"
  -c, --config PATH         Use specific config (default: "base")
  --report-xml PATH         Output a Checkstyle-compatible XML to PATH

Available configs:
  - base
  - PEAR
  - PGS-2
  - PSR-1
  - PSR-2

Tests

We've built a test system against Hippo. Tests are ran on Travis CI for every pull request which is made.

About

Hippo originally started life as a fork of PHPCheckstyle, however after realising that a complete rewrite would be needed, the core ideas changed and as such, Hippo was born.

Hippo is an open-source tool that helps PHP programmers adhere to certain coding conventions. The tools checks the input PHP source code and reports any violations against the given standards.

Compatible with PHP 5.5 and up.

Goals

  • Create a proper test suite.
  • Checks should be able to implement different kind of check types, giving more freedom on a per-check basis.
  • Integrate PHP-Parser for AST. Checks can extend some kind of AST Node Tree class.
  • Set default standards to PSR 2.
    • Standards and configurations should be able to be extended.
    • PSR-1
    • PSR-2
    • PGS-2
    • Zend
    • PEAR
  • Configuration keys should allow flexibility in the naming pattern, it shouldn't matter so long as it is a valid name.
    • camelCase
    • snake_case
    • PascalCase
  • Run as a binary with console output and as a library.
  • Switch to semver versioning.

License

Hippo is licensed under The MIT License (MIT).