Page MenuHomePhabricator

Add a linter rule for default parameters
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 8:34 AM.
Tags
None
Referenced Files
F15337992: D12418.diff
Sun, Mar 9, 8:43 AM
F15332553: D12418.id29933.diff
Fri, Mar 7, 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
Unknown Object (File)
Feb 8 2025, 3:43 AM
Unknown Object (File)
Feb 8 2025, 3:43 AM
Unknown Object (File)
Jan 31 2025, 2:38 PM
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.