]> khamidou — GitHub mirrors - arcanist.git/commit
Improve the "unexpected return value" linter rule
authorJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 22:49:43 +0000 (09:49 +1100)
committerJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 23:01:35 +0000 (10:01 +1100)
commit9e78d15fc0c7182f0ef0e0c9795f11a6ac7a50f0
tree20995c12dd5364b2123a1945b654e3040bcf9228
parent72d9013d29dc6fd8e64351d3bb85b24e788803e7
Improve the "unexpected return value" linter rule

Summary: Return values within constructors are acceptable if they are within a closure or anonymous function.

Test Plan: Added a test case.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14564
src/lint/linter/xhpast/rules/ArcanistUnexpectedReturnValueXHPASTLinterRule.php
src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/closure.lint-test [new file with mode: 0644]