Page MenuHomePhabricator

Add a linter rule for modifier ordering
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 12:36 PM.
Tags
None
Referenced Files
F14120565: D12421.diff
Fri, Nov 29, 9:18 AM
Unknown Object (File)
Wed, Nov 27, 3:42 AM
Unknown Object (File)
Tue, Nov 26, 10:17 PM
Unknown Object (File)
Tue, Nov 26, 1:31 PM
Unknown Object (File)
Mon, Nov 25, 11:43 PM
Unknown Object (File)
Mon, Nov 25, 7:25 AM
Unknown Object (File)
Sun, Nov 24, 5:33 PM
Unknown Object (File)
Fri, Nov 22, 12:56 AM
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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6104
Build 6124: [Placeholder Plan] Wait for 30 Seconds

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.