validate_code
Validate PHP, JavaScript, or CSS code against Magento 2 coding standards to identify violations with severity levels, line numbers, and fix suggestions for compliant development.
Instructions
Validate code against Magento 2 coding standards. Returns violations with severity, line numbers, and fix suggestions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code to validate | |
| fileType | Yes | Type of file: php (PHP classes), phtml (templates), js (JavaScript), less/css (stylesheets) |