#3681 - Run the PHP codebase through PHP_CodeSniffer beautifier

  • By
  • Added
  • 2 views
Identifier #3681
Issue type Feature request or suggestion
Title Run the PHP codebase through PHP_CodeSniffer beautifier
Status Completed
Tags

Roadmap: v11 (custom)

Type: Standards compliance (custom)

Handling member Chris Graham
Addon core
Description Running the beautifier breaks easy merging so we need to take that into consideration. Sometimes reformatted spacing can make code harder to follow but we can fine tune the Code Sniffer config file to deal with that I think.

Attached is the rule set config file following coding standards agreed at https://compo.sr/tracker/view.php?id=1568

PHPStorm can be configured to use the rule set or a report can be generated by installing Code Sniffer using Composer `composer global require "squizlabs/php_codesniffer=*"` and running `phpcs --standard=phpcs.xml --parallel=1024`.

Beautifier is `phpcbf --standard=phpcs.xml --parallel=1024`.
Steps to reproduce

Related to

#2747 - PHP refresh (ongoing)

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated