Page MenuHomePhabricator

Add a linter rule for declaring nested functions
ClosedPublic

Authored by joshuaspence on Apr 13 2015, 10:50 AM.
Tags
None
Referenced Files
F15373501: D12389.id29735.diff
Wed, Mar 12, 4:36 PM
F15353118: D12389.diff
Mon, Mar 10, 8:05 PM
F15334556: D12389.diff
Sat, Mar 8, 10:19 AM
Unknown Object (File)
Mon, Mar 3, 11:43 AM
Unknown Object (File)
Feb 8 2025, 3:40 AM
Unknown Object (File)
Feb 8 2025, 3:40 AM
Unknown Object (File)
Feb 8 2025, 3:40 AM
Unknown Object (File)
Feb 8 2025, 3:40 AM
Subscribers

Details

Summary

Ref T7409. Adds ArcanistXHPASTLinter::LINT_INNER_FUNCTION to advise against declaring PHP functions within an outer function. Based on Squiz_Sniffs_PHP_InnerFunctionsSniff.

Test Plan

Added unit tests.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 5283
Build 5301: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for declaring nested functions.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
joshuaspence edited edge metadata.

Better detection of closures

epriestley edited edge metadata.

"Rocks are heavy and rigid. Avoid hitting yourself in the face with a rock."

This revision is now accepted and ready to land.Apr 13 2015, 2:27 PM
This revision was automatically updated to reflect the committed changes.