You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a quick initial look at this sniff with an eye on #552 / PHPCS 4.x.
The sniff currently examines both PHP and JS files, but does not have a test case file for the JS side of things, nor any JS syntax specific sniff code, though it does sniff for one JS specific token.
Questions: As PHPCS 4.x may still be a year or more before it is released:
Should a JS test case file be added to verify that JS is currently actually being examined correctly ?
If no, I'd propose to stop sniffing js files.
If yes and if necessary, should support for properly checking JS code be added for the time being ?
If yes, this should probably get priority to have the benefit of these checks for as long as possible (until support for PHPCS 3.x is dropped).
Review the
WordPressVIPMinimum.Security.Underscorejs
sniff for the following in as far as relevant to that sniff:Typical things to add tests for and verify correct handling of:
list
statementsTypical things to add tests for and verify correct handling of (where applicable):
::class
use function/const
Other:
Sniff basics, but changes need to be lined up for next major release:
public
properties (Audit Public Sniff Properties #234)Once PHPCS/PHPCSUtils supports this:
match
expressionsThe text was updated successfully, but these errors were encountered: