2. Rulesets

2.1. Introduction

Exakat provides unique 1644 rules to detect BUGS, CODE SMELLS, SECURITY OR QUALITY ISSUES in your PHP code.

For more smoothly usage, the ruleset concept allow you to run a set of rules based on a decidated focus. Beawre that a Ruleset run all the associated rules and any needed dependencies.

Rulesets are configured with the -T option, when running exakat in command line. For example :

php exakat.phar analyze -p <project> -T <Security>

2.2. Summary

Here is the list of the current rulesets supported by Exakat Engine.

Name

Description

All

All is a dummy ruleset, which includes all the rules.

Analyze

Check for common best practices.

Appinfo

Appinfo is the equivalent of phpinfo() for your code.

Attributes

This ruleset gathers all rules that rely on PHP 8.+ attributes.

CE

List of rules that are part of the Community Edition

CI-checks

Quick check for common best practices.

Changed Behavior

Ruleset with all rules that identify changed behavior across PHP versions.

Class Review

A set of rules dedicated to class hygiene

Classdependencies

A set of rules dedicated to show classes dependences

Coding conventions

List coding conventions violations.

CompatibilityPHP53

List features that are incompatible with PHP 5.3.

CompatibilityPHP54

List features that are incompatible with PHP 5.4.

CompatibilityPHP55

List features that are incompatible with PHP 5.5.

CompatibilityPHP56

List features that are incompatible with PHP 5.6.

CompatibilityPHP70

List features that are incompatible with PHP 7.0.

CompatibilityPHP71

List features that are incompatible with PHP 7.1.

CompatibilityPHP72

List features that are incompatible with PHP 7.2.

CompatibilityPHP73

List features that are incompatible with PHP 7.3.

CompatibilityPHP74

List features that are incompatible with PHP 7.4.

CompatibilityPHP80

List features that are incompatible with PHP 8.0.

CompatibilityPHP81

List features that are incompatible with PHP 8.1.

CompatibilityPHP82

List features that are incompatible with PHP 8.2.

CompatibilityPHP83

List features that are incompatible with PHP 8.3.

Dead code

Check the unused code or unreachable code.

Deprecated

List of deprecated features, across all PHP versions.

Dump

Dump is a collector set of rules.

First

A set of rules that are always run at the beginning of a project, because they are frequently used.

Inventory

A set of rules that collect various definitions from the code

IsExt

Ruleset with analysis which rely on PHP’s optional extensions

IsPHP

Ruleset with analysis which rely on PHP’s core extensions

IsStub

Ruleset with analysis which rely on custom stubs

LintButWontExec

Check the code for common errors that will lead to a Fatal error on production, but lint fine.

NoDoc

Ruleset with analysis which are not published in the docs.

One Liners

Report expressions that are one liners.

PHP recommendations

Report recommendations from the PHP manual.

Performances

Check the code for slow code.

Preferences

Identify preferences in the code.

Rector

Suggests configuration to apply changes with Rector

Security

Check the code for common security bad practices, especially in the Web environnement.

Semantics

Checks the meanings found the names of the code.

Suggestions

List of possible modernisation of the PHP code.

Surprising

A ruleset dedicated to surprising pieces of code in PHP.

Top10

The most common issues found in the code

Typechecks

Checks related to types.

php-cs-fixable

Suggests configuration to apply changes with PHP-CS-FIXER

Note : in command line, don’t forget to add quotes to rulesets’ names that include white space.

2.3. List of rulesets