Page MenuHomePhabricator

Add a linter rule for modifier ordering
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 12:36 PM.
Tags
None
Referenced Files
F14092657: D12421.id31151.diff
Mon, Nov 25, 7:25 AM
Unknown Object (File)
Sun, Nov 24, 5:33 PM
Unknown Object (File)
Fri, Nov 22, 12:56 AM
Unknown Object (File)
Thu, Nov 21, 1:26 PM
Unknown Object (File)
Sun, Nov 17, 9:44 PM
Unknown Object (File)
Thu, Nov 14, 10:58 AM
Unknown Object (File)
Sat, Nov 9, 5:40 PM
Unknown Object (File)
Wed, Nov 6, 2:14 PM
Subscribers

Details

Summary

Fixes T7417. Adds ArcanistXHPASTLinter::LINT_MODIFIER_ORDERING for ensuring that method/property modifiers (public, protected, private, static, abstract and final) are consistently ordered. The modifier ordering that is enforced is consistent with PSR-2.

Test Plan

Added unit tests.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for modifier ordering.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

The order we use everywhere is:

final/abstract
public/protected/private
static

Is there a strong argument for changing that order?

Rebase, change ordering to be PSR-2 compliant

epriestley edited edge metadata.
This revision is now accepted and ready to land.May 19 2015, 12:58 PM
This revision was automatically updated to reflect the committed changes.