Page MenuHomePhabricator

Add a linter rule for modifier ordering
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 12:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 11:41 PM
Unknown Object (File)
Mar 18 2024, 11:30 PM
Unknown Object (File)
Mar 18 2024, 10:49 PM
Unknown Object (File)
Mar 5 2024, 8:38 AM
Unknown Object (File)
Feb 16 2024, 12:06 PM
Unknown Object (File)
Feb 16 2024, 12:06 PM
Unknown Object (File)
Feb 16 2024, 12:05 PM
Unknown Object (File)
Feb 16 2024, 11:57 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
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.