Skip to content

Commit bccd006

Browse files
committed
Report paranoid warnings as information diagnostics
Signed-off-by: Ben Sherman <[email protected]>
1 parent 6ee3070 commit bccd006

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/language-server/src/main/java/nextflow/lsp/services/LanguageService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import nextflow.lsp.util.LanguageServerUtils;
4242
import nextflow.lsp.util.Logger;
4343
import nextflow.lsp.util.Positions;
44+
import nextflow.script.control.FutureWarning;
4445
import nextflow.script.control.RelatedInformationAware;
4546
import nextflow.script.formatter.FormattingOptions;
4647
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
@@ -408,7 +409,10 @@ protected void publishDiagnostics(Set<URI> changedUris) {
408409
continue;
409410
}
410411

411-
var diagnostic = new Diagnostic(range, message, DiagnosticSeverity.Warning, "nextflow");
412+
var severity = warning instanceof FutureWarning
413+
? DiagnosticSeverity.Information
414+
: DiagnosticSeverity.Warning;
415+
var diagnostic = new Diagnostic(range, message, severity, "nextflow");
412416
if( warning instanceof RelatedInformationAware ria )
413417
diagnostic.setRelatedInformation(getRelatedInformation(ria, uri));
414418
diagnostics.add(diagnostic);

0 commit comments

Comments
 (0)