code: public List<ActiveRule> getActiveRules(RulePriority severity) {
      List<ActiveRule> result = new ArrayList<>();
      for (ActiveRule activeRule : activeRules) {
        if (activeRule.getSeverity().equals(severity) && activeRule.isEnabled()) {
          result.add(activeRule);
        }
      }
      return result;
    }
docs: Note: disabled rules are excluded.
  
  @return the list of active rules for a given severity