File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class ChecksInfo {
1313 var checksClasses = CompileTime .getAllClasses (Check );
1414
1515 for (cl in checksClasses ) {
16+ if (ignoreClass (cl )) continue ;
1617 var name = getCheckNameFromClass (cl );
1718 var desc = getCheckDescription (cl );
1819 name2info [name ] = {
@@ -23,6 +24,11 @@ class ChecksInfo {
2324 }
2425 }
2526
27+ static function ignoreClass (cl : Class <Check >) {
28+ var meta = haxe.rtti. Meta .getType (cl );
29+ return (meta .ignore != null );
30+ }
31+
2632 static function getCheckNameFromClass (cl : Class <Check >) {
2733 var meta = haxe.rtti. Meta .getType (cl );
2834 if (meta .name == null ) throw ' ${Type .getClassName (cl )} have no @name meta.' ;
@@ -53,4 +59,4 @@ typedef CheckInfo = {
5359 var name : String ;
5460 var description : String ;
5561 var clazz : Class <Check >;
56- }
62+ }
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ import checkstyle.LintMessage.SeverityLevel;
44import haxeparser .Data ;
55import haxe .macro .Expr ;
66
7- // TODO find a better way to make ChecksInfo ignore this class
8- @name (" " )
9- @desc (" " )
7+ @ignore (" Base class for name checks" )
108class NameCheckBase extends Check {
119
1210 public var severity : String ;
You can’t perform that action at this time.
0 commit comments