Forrest logo
tool overview
On this page you find all important commands for the CLI tool drupal-check. If the command you are looking for is missing please ask our AI.

drupal-check

Drupal-check is a command line tool used for static analysis and linting of PHP code in Drupal projects. It is developed specifically for Drupal's coding standards and best practices, allowing developers to catch coding errors and potential issues early in the development process.

This tool leverages various PHP libraries and tools, such as PHP-Parser and PHP_CodeSniffer, to analyze the Drupal codebase and provide useful feedback. It can detect common coding mistakes, deprecated functions, security vulnerabilities, and other coding standards violations specified by Drupal.

Drupal-check helps developers ensure code quality and maintainability by providing detailed reports on coding issues, along with suggestions for possible fixes. By using this command line tool, developers can save time and effort in manually reviewing the codebase and can proactively address potential problems.

The tool is particularly useful when working on large Drupal projects with multiple developers, where maintaining coding standards and consistency can be a challenge. It helps enforce Drupal's coding standards, which ultimately leads to cleaner code, fewer bugs, and increased maintainability.

Drupal-check can be easily integrated into continuous integration systems or development workflows. It runs as a command line tool and provides customizable output formats, allowing developers to easily incorporate it into their existing development processes.

Overall, Drupal-check is a valuable tool for Drupal developers to ensure that their PHP code adheres to Drupal's coding standards and best practices, leading to improved code quality and more robust Drupal applications.

List of commands for drupal-check:

  • drupal-check:tldr:238b6 drupal-check: Perform static analysis to detect bad coding practices.
    $ drupal-check --analysis ${path-to-directory}
    try on your machine
    explain this command
  • drupal-check:tldr:7a6c2 drupal-check: Don't show a progress bar.
    $ drupal-check --no-progress ${path-to-directory}
    try on your machine
    explain this command
  • drupal-check:tldr:b1fd7 drupal-check: Check the code in a specific directory for deprecations.
    $ drupal-check ${path-to-directory}
    try on your machine
    explain this command
  • drupal-check:tldr:dac96 drupal-check: Check the code excluding a comma-separated list of directories.
    $ drupal-check --exclude-dir ${path-to-excluded_directory},${path-to-excluded_files-*-php} ${path-to-directory}
    try on your machine
    explain this command
tool overview