]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule to determine whether a class should be marked as `abstract`
authorJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 21:18:38 +0000 (08:18 +1100)
committerJoshua Spence <josh@freelancer.com>
Mon, 23 Nov 2015 21:18:38 +0000 (08:18 +1100)
commit37571d88395245e0df1a458c184c9c9a11e1ce89
treebf8fa02b2e3cd2d3ce2bcb030ca4b2177e9d340e
parent20e99acf0ad1a2e7e37ba7aa8ae997308f7af296
Add a linter rule to determine whether a class should be marked as `abstract`

Summary:
A class containing `abstract` methods must itself be marked as `abstract`.

```
PHP Fatal error:  Class X contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (X::Y) in /home/josh/workspace/github.com/phacility/arcanist/test.php on line 5
```

Test Plan: Added unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14559
src/__phutil_library_map__.php
src/lint/linter/xhpast/rules/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRuleTestCase.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/is-abstract.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/is-not-abstract.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/should-be-abstract.lint-test [new file with mode: 0644]