phpro / grumphp

A PHP code-quality tool
MIT License
4.11k stars 429 forks source link

Adding PHPCS specific rule (-s) to display which rule triggered the e… #1059

Closed MeCapron closed 1 year ago

MeCapron commented 1 year ago

Summary

Q A
Branch master for features and deprecations
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Documented? yes
Fixed tickets comma-separated list of tickets fixed by the PR, if any

This PR adds the -s which displays the rule that triggered the error when running phpcs.

As an example :

image

Configuration

The configuration is set to true by default so that developers can more easily find the rule that blocks the validation of phpcs.

As s was not clear enough, the rule was renamed to show_sniffs_error_path inside grumphp configuration.

Reference

The reference of the phpcs configuration can be found here : https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting#printing-full-and-summary-reports

veewee commented 1 year ago

Looks good, thanks!