Page MenuHomeDevCentral

Prepare XHP ruleset for Nasqueron projects
Open, WishlistPublic

Description

Arcanist offers a good abstract syntax tree parser for PHP, XHPast.

PHP conventions of Nasqueron projects and default XHPast ruleset (phutil.xhpast) are relatively similar, but some differences exist:

RuleDescription of a sample errorOur convention
 XHP9Follow naming conventions: parameters should be named using lowercase_with_underscores. Parameters are in camel case
XHP38Declaration Formatting Convention: no spaces before opening parenthesis in function and method declarations.We use such space at declaration, not on call
XHP44 Concatenation Spacing - no spaces around string concatenation operator.We use spaces around any operator
XHP45PHP Compatibility - This codebase targets PHP 5.2.3, but static:: was not introduced until PHP 5.3.We target PHP 5.5+

Other suggested static analyzer implementation

See also T1063 for phan support.

Event Timeline

dereckson raised the priority of this task from to Wishlist.
dereckson updated the task description. (Show Details)
dereckson added a project: DevCentral.
dereckson added a subscriber: dereckson.