Class RuleUtil
java.lang.Object
org.apache.maven.plugins.checkstyle.RuleUtil
Tooling for Checkstyle rules conventions: names, categories.
- Since:
- 2.13
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
An extension does not start with Checkstyle package.static interface
Audit event source name matcher.private static class
private static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getCategory
(com.puppycrawl.tools.checkstyle.api.AuditEvent event) Get the rule category from an audit event.static String
getCategory
(String eventSrcName) Get the rule category from an audit event source name.static String
getName
(com.puppycrawl.tools.checkstyle.api.AuditEvent event) Get the rule name from an audit event.static String
Get the rule name from an audit event source name.static RuleUtil.Matcher[]
parseMatchers
(String[] specs)
-
Field Details
-
CHECKSTYLE_PACKAGE
- See Also:
-
-
Constructor Details
-
RuleUtil
private RuleUtil()
-
-
Method Details
-
getName
Get the rule name from an audit event.- Parameters:
event
- the audit event- Returns:
- the rule name, which is the class name without package and removed eventual "Check" suffix
-
getName
Get the rule name from an audit event source name.- Parameters:
eventSrcName
- the audit event source name- Returns:
- the rule name, which is the class name without package and removed eventual "Check" suffix
-
getCategory
Get the rule category from an audit event.- Parameters:
event
- the audit event- Returns:
- the rule category, which is the last package name or "misc" or "extension"
-
getCategory
Get the rule category from an audit event source name.- Parameters:
eventSrcName
- the audit event source name- Returns:
- the rule category, which is the last package name or "misc" or "extension"
-
parseMatchers
-