Page MenuHomePhabricator

Add a linter rule for modifier ordering
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 12:36 PM.
Tags
None
Referenced Files
F13242790: D12421.diff
Thu, May 23, 3:06 AM
F13226407: D12421.diff
Sun, May 19, 8:33 PM
F13221148: D12421.diff
Sun, May 19, 2:18 AM
F13210675: D12421.id29829.diff
Fri, May 17, 5:06 AM
F13203535: D12421.diff
Tue, May 14, 11:52 PM
F13185969: D12421.diff
Sat, May 11, 3:20 AM
Unknown Object (File)
Tue, May 7, 6:04 AM
Unknown Object (File)
Fri, May 3, 3:39 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.