Update codebase to be WP Coding Standard-compliant.
This is a squashed copy of `wp-coding-standard--rebase` to try and fix the line-ending diff issue we're having.
This commit is contained in:
parent
9ee72568ef
commit
9a8e7c0851
20 changed files with 1880 additions and 1810 deletions
|
@ -14,6 +14,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor
|
|||
|
||||
1. Read the contributing guidelines
|
||||
1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`)
|
||||
- We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment
|
||||
1. Install [Composer](https://getcomposer.org/download/), if you don't have it already
|
||||
1. Install dependencies (`composer install`)
|
||||
1. Create a new branch from `main` (`git checkout -b <your-descriptive-branch-name>`)
|
||||
|
@ -25,8 +26,8 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor
|
|||
1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p <file(s)>`)
|
||||
1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p <file(s)>`)
|
||||
- Add the `-n` flag to ignore warnings (i.e., show only errors)
|
||||
- Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:<sniff code>` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code)
|
||||
- You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php`
|
||||
- Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:<sniff code>` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code)
|
||||
- You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php`
|
||||
|
||||
## Updating Documentation
|
||||
|
||||
|
|
Reference in a new issue