Skip to content

WalkingDexter/phpcs-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

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.

About

Removes non-diff violations from PHP_CodeSniffer reports.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages