walkingdexter / phpcs-diff
Removes non-diff violations from PHP_CodeSniffer reports.
Installs: 1 478
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
This package is auto-updated.
Last update: 2024-08-28 12:41:16 UTC
README
Removes non-diff violations from PHP_CodeSniffer reports. This is a lightweight solution with minimum requirements.
Installation
composer require --dev walkingdexter/phpcs-diff
Usage
Check current changes:
vendor/bin/phpcs-diff
This is a shortcut for:
vendor/bin/phpcs-diff --filter=GitModified
Check changes that have been staged for commit:
vendor/bin/phpcs-diff --filter=GitStaged
Check changes relative to the main
branch:
vendor/bin/phpcs-diff --filter=GitCommitted --runtime-set git_diff_commit main
Check changes relative to a specific commit:
vendor/bin/phpcs-diff --filter=GitCommitted --runtime-set git_diff_commit 15a5e27
If the commit name is set in the configuration options:
vendor/bin/phpcs-diff --filter=GitCommitted
You can use any other options and arguments that the phpcs
command accepts.
Limitations
Only reports that use prepared data are supported.