]> khamidou — GitHub mirrors - arcanist.git/commit
Fix greediness in Apache License linter.
authorepriestley <epriestley@phabricator.com>
Sun, 13 Feb 2011 19:57:14 +0000 (11:57 -0800)
committerepriestley <epriestley@phabricator.com>
Mon, 14 Feb 2011 00:03:05 +0000 (16:03 -0800)
commitb3b2da46087966021cfc1b54a835820cae28cb5b
tree85e40f634d3f5961c71d5a9f372bbd5e94062dcc
parente0bc910dda5e969683cf74768a7a765415b1fe50
Fix greediness in Apache License linter.

Summary: The multi-line comment regexp was potentially too greedy. See
"greedy.lint-test".
- Made it less greedy.
- Added test coverage.
- Fixed an issue with the Apache license getting applied with too much
  whitespace against C files.

Test Plan: Ran unit tests.

Reviewers: aran

CC:

Differential Revision: 36
16 files changed:
src/__phutil_library_map__.php
src/lint/linter/apachelicense/ArcanistApacheLicenseLinter.php
src/lint/linter/apachelicense/__tests__/ArcanistApacheLicenseLinterTestCase.php [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/__init__.php [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/c-basic.lint-test [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/greedy.lint-test [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/php-basic.lint-test [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/php-script.lint-test [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/php-update-mess.lint-test [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/php-update-multi.lint-test [new file with mode: 0644]
src/lint/linter/apachelicense/__tests__/data/php-update-single.lint-test [new file with mode: 0644]
src/lint/linter/base/test/ArcanistLinterTestCase.php [new file with mode: 0644]
src/lint/linter/base/test/__init__.php [new file with mode: 0644]
src/lint/linter/license/ArcanistLicenseLinter.php
src/lint/linter/xhpast/__tests__/ArcanistXHPASTLinterTestCase.php
src/lint/linter/xhpast/__tests__/__init__.php