Skip to content

Commit

Permalink
Change diagnostic to warning for config elements (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking authored Jan 12, 2024
1 parent 54fa1fd commit d498515
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class LibertyDiagnosticParticipant implements IDiagnosticsParticipant {
public static final String MISSING_FILE_MESSAGE = "The resource at the specified location could not be found.";
public static final String MISSING_FILE_CODE = "missing_file";

public static final String MISSING_CONFIGURED_FEATURE_MESSAGE = "This config element does not relate to a feature configured in the featureManager. Remove this element or add a relevant feature.";
public static final String MISSING_CONFIGURED_FEATURE_MESSAGE = "This config element does not relate to a feature configured in the featureManager. If the relevant feature is specified in another server configuration file, this message can be ignored. Otherwise, remove this element or add a relevant feature.";
public static final String MISSING_CONFIGURED_FEATURE_CODE = "lost_config_element";

public static final String NOT_OPTIONAL_MESSAGE = "The specified resource cannot be skipped. Check location value or set optional to true.";
Expand Down Expand Up @@ -217,7 +217,7 @@ private void holdConfigElement(DOMDocument domDocument, DOMNode configElementNod
String configElementName = configElementNode.getNodeName();
Range range = XMLPositionUtility
.createRange(configElementNode.getStart(), configElementNode.getEnd(), domDocument);
Diagnostic tempDiagnostic = new Diagnostic(range, MISSING_CONFIGURED_FEATURE_MESSAGE, null, LIBERTY_LEMMINX_SOURCE, MISSING_CONFIGURED_FEATURE_CODE);
Diagnostic tempDiagnostic = new Diagnostic(range, MISSING_CONFIGURED_FEATURE_MESSAGE, DiagnosticSeverity.Warning, LIBERTY_LEMMINX_SOURCE, MISSING_CONFIGURED_FEATURE_CODE);
tempDiagnostic.setSource(configElementName);
tempDiagnosticsList.add(tempDiagnostic);
}
Expand Down

0 comments on commit d498515

Please sign in to comment.