Giter VIP home page Giter VIP logo

code-insight's Introduction

Code-Insight

CI codecov Scrutinizer Code Quality

Latest Stable Version Total Downloads License

Code-Insight is a tool for static analysis of other project source code.

Usage

For each analyzed project the .code-insight.json file needs to be placed at project root folder (e.g. where src folder is). Example configuration file:

{
    "finder": [
        {
            "name": "*.php",
            "in": ["src"]
        }
    ],
    "bc_checkers": ["class", "function", "constant"],
    "bc_ignore": [
        {
            "type": "constant.deleted",
            "element": "ADODB_DATE_VERSION",
            "why": "The ADODB DateTime library was removed."
        }
    ],
    "class_locator": "vendor/autoload.php"
}

Supported settings:

  • The finder (array) setting is a list of JSON objects. Each object key is a name, and each value an argument for the methods in the Symfony\Component\Finder\Finder class. If an array of values is provided for a single key, the method will be called once per value in the array. Note that the paths specified for the in method are relative to project base path.
  • The bc_checkers (array) setting is a list of BC checker names. Possible BC checkers are: class, function, constant, inportal_class. If setting isn't specified, then default value of ['class', 'function', 'constant'] is used.
  • The bc_ignore (array) setting is a list of JSON objects. Each object represents a rule, that prevents a particular BC break or BC break group from being reported. The actual objects to specify in here can be found in output of bc command, when executed with --format=json option.
  • The class_locator (string) setting is a path to Composer's autoload.php file or file, that returns closure accepting FQCN in 1st argument and returning absolute path with that class declaration.

Commands

The bc command

...

The sync command

...

The report command

...

The missing-tests command

...

Installation

  1. download latest released PHAR file from https://github.com/console-helpers/code-insight/releases page.
  2. setup auto-completion by placing eval $(/path/to/code-insight.phar _completion --generate-hook -p code-insight.phar) in ~/.bashrc

Contributing

See CONTRIBUTING file.

License

Code-Insight is released under the BSD-3-Clause License. See the bundled LICENSE file for details.

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.