Page MenuHomePhabricator

Add a linter rule for default parameters
ClosedPublic

Authored by joshuaspence on Apr 15 2015, 8:34 AM.

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.