talira

PHP Parallel Lint

Checks the syntax of PHP files in parallel

open sourceBSD-2-Clause-Viewsfree

PHP Parallel Lint is an open source command-line tool that checks the syntax of PHP files in parallel jobs, much faster than linting them one at a time. It prints plain, coloured, JSON, Checkstyle XML or GitLab Code Quality output, and can show the git blame of the line that broke. Jakub Onderka created it as jakub-onderka/php-parallel-lint; since January 2020 the PHP Parallel Lint organisation maintains it. It supports PHP 5.3 to 8.5 and installs with Composer or as a PHAR.

Problems it solves

  • check every PHP file in a large project for syntax errors quickly in CI
  • find which commit introduced a PHP syntax error
  • lint PHP files for several PHP versions in a GitHub Actions or GitLab pipeline

Features

  • checks PHP files' syntax in parallel jobs (10 by default)
  • plain, coloured, JSON, Checkstyle XML and GitLab Code Quality output
  • git blame for the line with an error
  • exclude files or folders, or read the file list from standard input
  • PHAR file on each release, or install with Composer

Alternatives

The same job

These do what PHP Parallel Lint does.

  1. PHPLint Lint PHP files faster by running several lint processes at once
  2. MegaLinter Linting suite that checks every language, format and config file in a repository
  3. PHPCompatibility PHP_CodeSniffer sniffs that check PHP code for cross-version compatibility
  4. PHP_CodeSniffer Detect and fix coding standard violations in PHP
  5. actionlint Static checker for GitHub Actions workflow files
  6. Slevomat Coding Standard Extra PHP_CodeSniffer sniffs for safer, cleaner and consistently formatted PHP

Compare PHP Parallel Lint with the top 3