c9.ide.language.php.wordpress
Name: WordPress Coding Standards Linter for Cloud9
Current Version: 1.0.1 (2018-10-11)
Author: EP4
Contributors: Dave Lavoie
License: GPLv3 or later
Provides a linter in Cloud9 IDE for WordPress development using PHP CodeSniffer (PHPCS) based on WordPress Coding Standards (WPCS) and PHPCompatibility/PHPCompabitityWP rules.
Installation
-
From the Cloud9 menu, select Preferences, then Experimental -> SDK and enable Load Custom Plugins, Load Plugins From Workspace and Plugin Manager toggles. For more details about Cloud9 Experimental Features, visit https://docs.c9.io/docs/experimental-features .
-
Open a Terminal from the menu Window -> New Terminal.
-
Run these commands in the terminal for each project where you want to use the plugin:
git clone [email protected]:EP4/c9.ide.language.php.wordpress.git
cd c9.ide.language.php.wordpress
c9 install .
cd ..
rm -fR c9.ide.language.php.wordpress
- If you don’t want to activate the plugin manually every time you open your Cloud9 project, you can enable it automatically. Click on the Cloud9 menu, select Open Your Init Script and add the following code:
services.pluginManager.loadPackage([
"~/.c9/plugins/c9.ide.language.php.wordpress/package.json"
])
-
Restart Cloud9.
-
Use Cloud9 as usual, and warnings will be displayed in the IDE when working on PHP files if PHP CodeSniffer detects any error based on PHPCompatibilityWP & WordPress Coding Standards rules.
Usage
This plugin will display errors found by PHPCS directly in the IDE, as you can see on the following screenshot:

This plugin will do the following:
This plugin won’t do the following (yet):
Icons used in messages
Since there is no simple way to allow HTML in these tooltips, we use some custom Unicode characters for displaying more meaningful messages:
| Displayed Characters |
Meaning |
| 🔴 Red Circle |
The identified issue is considered to be an error by PHPCS. |
| 🔶 Yellow Diamond |
The identified issue is considered to be a warning by PHPCS. |
| ✔ Checkmark |
The issue can be resolved automatically by running PHPCBF. |
| 𝗪𝗣𝗖𝗦 |
The issue was identified using WordPress Coding Standards Rules. |
| 𝗣𝗛𝗣𝗖𝗼𝗺𝗽𝗮𝘁𝗶𝗯𝗶𝗹𝗶𝘁𝘆 |
The issue was identified using PHPCompatibility Rules. |
| ➀ to ➈ |
Any number displayed in a circle represent the severity level of the issue. ➄ is the default severity and is never displayed. |
| (𝟏𝟐𝟑:𝟕𝟖𝟗) |
Numbers displayed inside parentheses refer to the line and column where the issue can be found. In this example, look at line 123 and column 789. |
Resources
Changelog
1.0.1 - 2018-10-11
- Removing the
tab-width=0 parameter since the tab-width is already set by WordPress rules and it was now triggering false positives.
- Fixing some typos in the README.md file.
1.0.0 - 2018-10-10
- Updating PHP_CodeSniffer library to version 3.3.2.
- Updating WordPress Coding Standards to version 1.1.0.
- Updating PHPCompabitity standards to version 9.0.0.
- Adding PHPCompabitityWP 2.0.0 and PHPCompatibilityParagonie 1.0.0 standards.
- Increasing the stdout max output from 200KB to 500KB.
- Increasing the timeout from 5 to 10 seconds.
- Moving the checkmark icon (✔) after the position in the tooltip.
- Including license files for each coding standards.
- Removing the CSS rule used for hiding the debug bar since the plugin can be used without activating the debug mode now.
- Some code refactoring.
- Updating the ‘Installation’ section of the docs.
0.0.2a - 2017-02-13
- Updating WordPress Coding Standards with the latest release as of 2017-02-10.
- Updating PHPCompabitity standards with the latest release as of 2017-02-06
0.0.1 (alpha) - 2017-02-10
Initial release.
评论