APISonar


org.sonar.api.utils.ValidationMessages.log

> org > sonar > api > utils > ValidationMessages > log
org APIs sonar APIs api APIs utils APIs ValidationMessages APIs log APIs

Example 1
public void mergePlugin(Model pluginModel, Model existingModel, ValidationMessages messages, TechnicalDebtRuleCache rulesCache) {
    messages.log(LOG);
    if (!messages.hasErrors()) {
      new TechnicalDebtMergeModel(existingModel).mergeWith(pluginModel, messages, rulesCache);
      messages.log(LOG);
    }
  }
Example 2
public List<RuleDebt> loadRuleDebtsFromXml(String pluginKey) {
    Reader xmlFileReader = null;
    try {
      xmlFileReader = languageModelFinder.createReaderForXMLFile(pluginKey);
      ValidationMessages validationMessages = ValidationMessages.create();
      List<RuleDebt> rules = importer.importXML(xmlFileReader, validationMessages);
      validationMessages.log(LOG);
      return rules;
    } finally {
      IOUtils.closeQuietly(xmlFileReader);
    }
  }
Example 3
private List<RulesProfile> createProfiles() {
    List<RulesProfile> result = Lists.newArrayList();
    Map<String, RulesProfile> defaultProfilesByLanguage = Maps.newHashMap();
    for (ProfileDefinition definition : definitions) {
      ValidationMessages validation = ValidationMessages.create();
      RulesProfile profile = definition.createProfile(validation);
      validation.log(LOGGER);
      if (profile != null && !validation.hasErrors()) {
        result.add(profile);
        checkIfNoMoreThanOneDefaultProfile(defaultProfilesByLanguage, profile);
      }
    }
    return result;
  }