]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for detecting empty files
authorJoshua Spence <josh@joshuaspence.com>
Tue, 1 Sep 2015 09:20:11 +0000 (19:20 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 1 Sep 2015 09:30:55 +0000 (19:30 +1000)
commit6fa2de5ff813fc42807876a2aa2da27e3694aa24
tree33fe42f8d00c941ef9cf5056b9b56da986ffed5b
parenta5304e472d1882283dfc1860a1b9db165b3e16a4
Add a linter rule for detecting empty files

Summary: Adds two different linter rules (one general purpose and another PHP specific) to prevent empty files from being added to a repository. For some unknown reason, people seem to like to do this.

Test Plan: Added test cases.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: avivey, cburroughs, Korvin

Differential Revision: https://secure.phabricator.com/D13881
src/__phutil_library_map__.php
src/lint/linter/ArcanistTextLinter.php
src/lint/linter/__tests__/text/empty.lint-test [moved from src/lint/linter/__tests__/text/empty-file.lint-test with 52% similarity]
src/lint/linter/__tests__/xhpast/empty.lint-test [new file with mode: 0644]
src/lint/linter/__tests__/xhpast/not-empty.lint-test [new file with mode: 0644]
src/lint/linter/__tests__/xhpast/php-tags-short.lint-test
src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistEmptyFileXHPASTLinterRule.php [new file with mode: 0644]