code: private boolean isViolation(String severity) {
          if ("error".equals(severity)) {
              return "error".equals(violationSeverity) || "warning".equals(violationSeverity)
                      || "info".equals(violationSeverity);
          } else if ("warning".equals(severity)) {
              return "warning".equals(violationSeverity) || "info".equals(violationSeverity);
          } else if ("info".equals(severity)) {
              return "info".equals(violationSeverity);
          } else {
              return false;
          }
      }
docs: Checks if the given severity is considered a violation.
  
  @param severity The severity to check
  @return <code>true</code> if the given severity is a violation, otherwise <code>false</code>