1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 05:50:54 +01:00

Add ArcanistRaggedClassTreeEdgeXHPASTLinterRule to Phutil linter map

Summary: Fixes T12555.

Test Plan:
Added this class to the codebase and ran `arc liberate`:
```
<?php

class FooBar {
    public static function doTheFoo() {
        return 'foobar';
    }
}
```

Ran `arc lint` and observed this warning:
```
   Warning  (XHP87) Class Not `abstract` Or `final`
    This class is neither `final` nor `abstract`, and does not have a
    docblock marking it `@concrete-extensible`.

               1 <?php
               2
    >>>        3 class FooBar {
               4     public static function doTheFoo() {
               5         return "foobar";
               6     }
```

Added a `final` modifier to `FooBar`'s declaration and observed the warning went away.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12555

Differential Revision: https://secure.phabricator.com/D17787
This commit is contained in:
Austin McKinley 2017-04-24 16:12:03 -07:00
parent 146693307f
commit 5d0f5afca8

View file

@ -56,12 +56,14 @@ final class ArcanistPhutilXHPASTLinterStandard
}
public function getLinterSeverityMap() {
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
$error = ArcanistLintSeverity::SEVERITY_ERROR;
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
$error = ArcanistLintSeverity::SEVERITY_ERROR;
$warning = ArcanistLintSeverity::SEVERITY_WARNING;
return array(
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
ArcanistRaggedClassTreeEdgeXHPASTLinterRule::ID => $warning,
);
}