mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 10:12:41 +01:00
(stable) Promote 2017 Week 30
This commit is contained in:
commit
2cad87034f
6 changed files with 26 additions and 2 deletions
|
@ -266,6 +266,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistPEP8Linter' => 'lint/linter/ArcanistPEP8Linter.php',
|
||||
'ArcanistPEP8LinterTestCase' => 'lint/linter/__tests__/ArcanistPEP8LinterTestCase.php',
|
||||
'ArcanistPHPCloseTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPCloseTagXHPASTLinterRule.php',
|
||||
'ArcanistPHPCloseTagXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPHPCloseTagXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPHPCompatibilityXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPHPEchoTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPEchoTagXHPASTLinterRule.php',
|
||||
|
@ -680,6 +681,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistPEP8Linter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPEP8LinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistPHPCloseTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPCloseTagXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPHPEchoTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<?php ?>
|
||||
<?php
|
||||
|
||||
~~~~~~~~~~
|
||||
warning::
|
||||
|
|
|
@ -12,7 +12,7 @@ final class ArcanistPHPCloseTagXHPASTLinterRule
|
|||
public function process(XHPASTNode $root) {
|
||||
$inline_html = $root->selectDescendantsOfType('n_INLINE_HTML');
|
||||
|
||||
if ($inline_html) {
|
||||
if (count($inline_html) > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPHPCloseTagXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/php-close-tag/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
?>
|
||||
stuff.
|
||||
<?php
|
||||
?>
|
||||
~~~~~~~~~~
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
return;
|
||||
?>
|
||||
~~~~~~~~~~
|
||||
error:3:1
|
Loading…
Reference in a new issue