-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rule to limit excessive use of sequential loggers #56
Conversation
static final String RULE_NAME = 'Excessive use of Sequential Loggers' | ||
static final String RULE_VIOLATION_MESSAGE = 'Too many sequential loggers of same level in flow ' | ||
|
||
Map<String, Integer> excessiveLoggers = ["TRACE": 2, "DEBUG": 2, "INFO": 2, "WARN": 2, "ERROR": 2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move these strings to either be an enum or static constants, probably not on this class but maybe on the LoggerComponent model class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll try an Enum for now.
Integer count = 0 | ||
RuleViolation violation = null | ||
flow.children.each { | ||
if (it.componentName == "logger") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use COMPONENT_NAME from the LoggerComponent model class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy enough
…ersionCheck PomDependencyVersionRule Implementation.
No description provided.