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
Unknown Object (File)
Tue, Dec 24, 2:46 AM
Unknown Object (File)
Sat, Dec 21, 4:06 PM
Unknown Object (File)
Tue, Dec 17, 9:00 AM
Unknown Object (File)
Fri, Dec 13, 10:57 AM
Unknown Object (File)
Dec 7 2024, 1:12 PM
Unknown Object (File)
Nov 29 2024, 7:01 PM
Unknown Object (File)
Nov 29 2024, 12:28 AM
Unknown Object (File)
Nov 26 2024, 1:03 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.