14

Insphpect - Automated Code Reviews

 4 years ago
source link: https://insphpect.com/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Insphpect: Smarter code reviews

Insphpect is an automated code review tool which identifies inflexibilities in PHP code and helps you write better software.

  • What does Insphpect do?

    Insphpect analyses your code for design patterns which are known bad practices and introduce negative traits such as tight coupling and global state.

  • How is it different from Scruitnizer/phpmd/etc?

    Insphpect looks for software traits that lead to poor flexibility. The aforementioned tools mostly use size based metrics like cyclomatic complexity (the numnber of if statements, loops and functions) to grade your classes.

    For example, in Scruitnizer A class with 34 complexity gets an A and a class with 35 complexity gets a B. This 35 cut-off is arbitrary and only indicative of problems in your code.

    Although it's a bit more complex than that, such tools grade your code on simple tallies of the weight of your code (number of methods, cyclomatic complexity number of coupled classes, etc).

    Instead of using statistical metrics which focus on code weight, insphpect looks for specific design patterns which are known to made code difficult to maintain and extend. For example, singletons and global variables. It uses these, rather than the simply weighing the size of your classes to grade your code.

  • Who is Insphpect for?

    Insphpect is useful for both novice and experienced developers who write object-oriented PHP code. It can be used as an educational tool and as a way of improving your exisiting software.

    When Insphpect encounters a known antipattern, it highlights and tells you why it's a poor design choice as well as making recommendations on what you should do instead. In some cases it can even generate a patch to remove the antipattern*.

  • What does Insphpect not do?

    Insphpect focuses only on code flexibility. It does not attempt to identify bugs or bad practices related to other desirable software traits such as performance, user experience, or security.

    It does not currently perform continuous integration and only offers on-demand scans of your code.

* This feature should be considered alpha


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK