Beautify: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Code is sometimes ugly. You want to make it look pretty. http://jsbeautifier.org/ is one such tool. | Code is sometimes ugly. You want to make it look pretty. [http://jsbeautifier.org/ JS-beautify] is one such tool. | ||
For PHP, JavaScript and CSS, '''[https://github.com/PHPCSStandards/PHP_CodeSniffer PHP Code Sniffer]''' (phpcs) and its counterpart PHP Code Beautifier (phpcbf) work to ensure your code adheres to standards. For using phpcs in MediaWiki, see [[mw:Manual:Coding_conventions/PHP]]. PHPCS is enabled in ~89% of repositories hosted by WMF<ref>https://phpcs.toolforge.org/</ref> '''[https://github.com/wikimedia/mediawiki-tools-codesniffer MediaWiki Code Sniffer]''' is the set of rules (or ruleset to be more precise) that defines the standards for the MediaWiki project. | For PHP, JavaScript and CSS, '''[https://github.com/PHPCSStandards/PHP_CodeSniffer PHP Code Sniffer]''' (phpcs) and its counterpart PHP Code Beautifier (phpcbf) work to ensure your code adheres to standards. For using phpcs in MediaWiki, see [[mw:Manual:Coding_conventions/PHP]]. PHPCS is enabled in ~89% of repositories hosted by WMF<ref>https://phpcs.toolforge.org/</ref> '''[https://github.com/wikimedia/mediawiki-tools-codesniffer MediaWiki Code Sniffer]''' is the set of rules (or ruleset to be more precise) that defines the standards for the MediaWiki project. | ||