[Issue] Set default PHP_CodeSniffer configuration #38122
Labels
Area: Framework
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P2
A defect with this priority could have functionality issues which are not to expectations.
Progress: PR in progress
Reported on 2.4.x
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Triage: Dev.Experience
Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
This issue is automatically created based on existing pull request: #38115: Set default PHP_CodeSniffer configuration
Description
When running
vendor/bin/phpcs
(orvendor/bin/phpcbf
) without any arguments, and error is shown. When runningvendor/bin/phpcs
on a specific file, the "wrong" standard is applied. This pull request sets the "correct" defaults for PHP_CodeSniffer so that both of these scenarios work as expected - ie, that they scan the expected files with theMagento2Framework
standard.See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file
Manual testing scenarios
vendor/bin/phpcs
without any arguments.vendor/bin/phpcs app/bootstrap.php
vendor/bin/phpcs --standard=Magento2Framework app/bootstrap.php
Contribution checklist
The text was updated successfully, but these errors were encountered: