Page MenuHomePhabricator

Add a linter rule for default parameters
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 8:34 AM.
Tags
None
Referenced Files
F15505395: D12418.id.diff
Tue, Apr 15, 2:54 AM
F15486182: D12418.id29826.diff
Thu, Apr 10, 5:28 AM
F15433597: D12418.diff
Mon, Mar 24, 11:58 PM
F15337992: D12418.diff
Mar 9 2025, 8:43 AM
F15332553: D12418.id29933.diff
Mar 7 2025, 5:54 PM
Unknown Object (File)
Feb 8 2025, 6:44 AM
Unknown Object (File)
Feb 8 2025, 3:43 AM
Unknown Object (File)
Feb 8 2025, 3:43 AM
Subscribers

Details

Summary

Ref T7409. Adds ArcanistXHPASTLinter::LINT_DEFAULT_PARAMETERS for ensuring function/method parameters with a default value are declared after those without a default value. Based on PEAR_Sniffs_Functions_ValidDefaultValueSniff.

Test Plan

Added test cases.

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 default parameters.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Apr 15 2015, 11:50 AM
This revision was automatically updated to reflect the committed changes.