use of com.github._1c_syntax.bsl.languageserver.diagnostics.metadata.DiagnosticParameter in project sonar-bsl-plugin-community by 1c-syntax.
the class BSLLanguageServerRuleDefinition method setUpRuleParams.
private void setUpRuleParams(NewRule newRule) {
diagnosticInfo.getParameters().forEach((DiagnosticParameterInfo diagnosticParameter) -> {
RuleParamType ruleParamType = getRuleParamType(diagnosticParameter.getType());
if (ruleParamType == null) {
LOGGER.error(String.format("Can't cast rule param type %s for rule %s", diagnosticParameter.getType(), newRule.key()));
return;
}
NewParam newParam = newRule.createParam(diagnosticParameter.getName());
newParam.setType(ruleParamType);
newParam.setDescription(diagnosticParameter.getDescription());
newParam.setDefaultValue(diagnosticParameter.getDefaultValue().toString());
});
}
Aggregations