2. Rulesets¶
2.1. Introduction¶
Exakat provides unique 1660 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 is a dummy ruleset, which includes all the rules. |
|
Check for common best practices. |
|
Appinfo is the equivalent of phpinfo() for your code. |
|
This ruleset gathers all rules that rely on PHP 8.+ attributes. |
|
List of rules that are part of the Community Edition |
|
Quick check for common best practices. |
|
Ruleset with all rules that identify changed behavior across PHP versions. |
|
A set of rules dedicated to class hygiene |
|
A set of rules dedicated to show classes dependences |
|
List coding conventions violations. |
|
List features that are incompatible with PHP 5.3. |
|
List features that are incompatible with PHP 5.4. |
|
List features that are incompatible with PHP 5.5. |
|
List features that are incompatible with PHP 5.6. |
|
List features that are incompatible with PHP 7.0. |
|
List features that are incompatible with PHP 7.1. |
|
List features that are incompatible with PHP 7.2. |
|
List features that are incompatible with PHP 7.3. |
|
List features that are incompatible with PHP 7.4. |
|
List features that are incompatible with PHP 8.0. |
|
List features that are incompatible with PHP 8.1. |
|
List features that are incompatible with PHP 8.2. |
|
List features that are incompatible with PHP 8.3. |
|
Check the unused code or unreachable code. |
|
List of deprecated features, across all PHP versions. |
|
Dump is a collector set of rules. |
|
A set of rules that are always run at the beginning of a project, because they are frequently used. |
|
A set of rules that collect various definitions from the code |
|
Ruleset with analysis which rely on PHP’s optional extensions |
|
Ruleset with analysis which rely on PHP’s core extensions |
|
Ruleset with analysis which rely on custom stubs |
|
Check the code for common errors that will lead to a Fatal error on production, but lint fine. |
|
Ruleset with analysis which are not published in the docs. |
|
Report expressions that are one liners. |
|
Report recommendations from the PHP manual. |
|
Report recommendations from the PHP manual. |
|
Check the code for slow code. |
|
Identify preferences in the code. |
|
Suggests configuration to apply changes with Rector |
|
Check the code for common security bad practices, especially in the Web environnement. |
|
Checks the meanings found the names of the code. |
|
List of possible modernisation of the PHP code. |
|
A ruleset dedicated to surprising pieces of code in PHP. |
|
The most common issues found in the code |
|
Checks related to types. |
|
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¶
- 2.3.1. All
- 2.3.2. Analyze
- 2.3.3. Appinfo
- 2.3.4. Attributes
- 2.3.5. CE
- 2.3.6. CI-checks
- 2.3.7. Changed Behavior
- 2.3.8. Class Review
- 2.3.9. Classdependencies
- 2.3.10. Coding conventions
- 2.3.11. CompatibilityPHP53
- 2.3.12. CompatibilityPHP54
- 2.3.13. CompatibilityPHP55
- 2.3.14. CompatibilityPHP56
- 2.3.15. CompatibilityPHP70
- 2.3.16. CompatibilityPHP71
- 2.3.17. CompatibilityPHP72
- 2.3.18. CompatibilityPHP73
- 2.3.19. CompatibilityPHP74
- 2.3.20. CompatibilityPHP80
- 2.3.21. CompatibilityPHP81
- 2.3.22. CompatibilityPHP82
- 2.3.23. CompatibilityPHP83
- 2.3.24. Dead code
- 2.3.25. Deprecated
- 2.3.26. Dump
- 2.3.27. First
- 2.3.28. Inventory
- 2.3.29. IsExt
- 2.3.30. IsPHP
- 2.3.31. IsStub
- 2.3.32. LintButWontExec
- 2.3.33. NoDoc
- 2.3.34. One Liners
- 2.3.35. PHP recommendations
- 2.3.36. Performances
- 2.3.37. Preferences
- 2.3.38. Rector
- 2.3.39. Security
- 2.3.40. Semantics
- 2.3.41. Suggestions
- 2.3.42. Surprising
- 2.3.43. Top10
- 2.3.44. Typechecks
- 2.3.45. php-cs-fixable