fleetlint Policy for a fleet of repositories
v0.11 (latest)
Getting started

format/configured/php

A formatter is configured

Implements format/configured for php.

Severitywarning
Tiers1, 2
Stacksphp
Scopeeach
Kindoutcome
Sourcelibrary v0.8.0
Selected byfleetlint-recommended@v0.8.0

Requirement

PHP CS Fixer, Pint, PHP_CodeSniffer or Easy Coding Standard is configured in the project or a parent directory, or runs in a hook, the task runner or CI. Another formatter is added with accept:.

Why

Without one formatter every editor reformats differently and diffs fill with whitespace churn that hides the real change.

Fix

Add .php-cs-fixer.dist.php and friendsofphp/php-cs-fixer in require-dev (fleetlint fix --apply does both).

Agent instruction: Add .php-cs-fixer.dist.php from the template, require friendsofphp/php-cs-fixer in require-dev, and run it with –dry-run in a hook; reformat in a separate commit.

fleetlint fix can apply this rule’s fix automatically (2 action(s)).

A finding that names no file points at .php-cs-fixer.dist.php.

Sources


Generated by fleetlint docs from catalog v0.8.0.