]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule to detect unnecessary semicolons
authorJoshua Spence <josh@joshuaspence.com>
Mon, 6 Apr 2015 21:24:20 +0000 (07:24 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 6 Apr 2015 21:24:20 +0000 (07:24 +1000)
commitc5df885d7bd59a60abb0c000abb4bef452172e3c
tree81c81c1892ee557c58fa7b747d048b160618016c
parent92713cf9220c4acb7583e485c721bd5be219fdf6
Add a linter rule to detect unnecessary semicolons

Summary:
Ref T7409. Adds a rule to detect unnecessary semicolons. The most common scenario I've seen in the wild is the use of semicolons after a class definition:

```lang=php
class MyClass {
  // ...
};
```

Test Plan: Added unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7409

Differential Revision: https://secure.phabricator.com/D12139
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/empty-statement.lint-test [new file with mode: 0644]