]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for `abstract` methods containing a body
authorJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 21:19:35 +0000 (08:19 +1100)
committerJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 21:19:35 +0000 (08:19 +1100)
commit72d9013d29dc6fd8e64351d3bb85b24e788803e7
treefdcaf86304379b17a51b1fa14650bbf20d29d84f
parent37571d88395245e0df1a458c184c9c9a11e1ce89
Add a linter rule for `abstract` methods containing a body

Summary:
`abstract` methods cannot contain a body.

```
PHP Fatal error:  Abstract function X::Y() cannot contain body in /home/josh/workspace/github.com/phacility/arcanist/test.php on line 4
```

Test Plan: Added unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14560
src/__phutil_library_map__.php
src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistAbstractMethodBodyXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRule.php
src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractMethodBodyXHPASTLinterRuleTestCase.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/abstract-method-body/body.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/abstract-method-body/no-body.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/abstract-method-body/non-abstract.lint-test [new file with mode: 0644]