Open
Description
Preconditions
N/A
Steps to reproduce
- Make PR to Magento with changed file, that don't have like about ignoring discouraged pathinfo function or run magneto coding standard against some file.
Expected result
- You should get understandable message what's wrong with your code, message
The use of function pathinfo() is discouraged
isn't clean enough - For case when some function marked as discouraged - there should be some information that shows reason of it, what is best practice
- That's actually relevant for all rules
Good example: https://github.com/extdn/extdn-phpcs/blob/master/Extdn/Sniffs/Classes/StrictTypesSniff.md
Actual result
- I'm getting result like this:
Errors is quite clear, but not warnings
PHP Code Sniffer detected 2 violation(s):
FILE: /var/www/html/app/code/Magento/Deploy/Service/DeployPackage.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
109 | ERROR | [x] Missing short description
110 | ERROR | [x] There must be exactly one blank line before tags
224 | WARNING | [ ] The use of function pathinfo() is discouraged
225 | WARNING | [ ] The use of function pathinfo() is discouraged
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Failed asserting that 2 matches expected 0.
Related question on stack overflow, answer not seems to me correct.
https://magento.stackexchange.com/questions/192978/the-use-of-function-pathinfo-is-discouraged-magento-2