Skip to content

Commit

Permalink
Rename suppressFutureWarnings -> paranoidWarnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Dec 12, 2024
1 parent 48ed2bc commit 88ca490
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static void main(String[] args) {

private List<String> excludePatterns;
private boolean harshilAlignment;
private boolean suppressFutureWarnings;
private boolean paranoidWarnings;

// -- LanguageServer

Expand Down Expand Up @@ -430,9 +430,9 @@ public void didChangeConfiguration(DidChangeConfigurationParams params) {
if( harshilAlignment != null )
this.harshilAlignment = harshilAlignment;

var suppressFutureWarnings = getJsonBoolean(params.getSettings(), "nextflow.suppressFutureWarnings");
if( suppressFutureWarnings != null && this.suppressFutureWarnings != suppressFutureWarnings ) {
this.suppressFutureWarnings = suppressFutureWarnings;
var paranoidWarnings = getJsonBoolean(params.getSettings(), "nextflow.paranoidWarnings");
if( paranoidWarnings != null && this.paranoidWarnings != paranoidWarnings ) {
this.paranoidWarnings = paranoidWarnings;
shouldInitialize = true;
}

Expand All @@ -451,8 +451,8 @@ public void didChangeConfiguration(DidChangeConfigurationParams params) {
count++;

var uri = workspaceRoots.get(name);
scriptServices.get(name).initialize(uri, this.excludePatterns, this.suppressFutureWarnings);
configServices.get(name).initialize(uri, this.excludePatterns, this.suppressFutureWarnings);
scriptServices.get(name).initialize(uri, this.excludePatterns, this.paranoidWarnings);
configServices.get(name).initialize(uri, this.excludePatterns, this.paranoidWarnings);
}

progressEnd(progressToken);
Expand Down Expand Up @@ -502,8 +502,8 @@ public void didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams params) {
var uri = workspaceFolder.getUri();
log.debug("workspace/didChangeWorkspaceFolders add " + name + " " + uri);
addWorkspaceFolder(name, uri);
scriptServices.get(name).initialize(uri, excludePatterns, suppressFutureWarnings);
configServices.get(name).initialize(uri, excludePatterns, suppressFutureWarnings);
scriptServices.get(name).initialize(uri, excludePatterns, paranoidWarnings);
configServices.get(name).initialize(uri, excludePatterns, paranoidWarnings);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ public LanguageService() {

private volatile boolean initialized;

private volatile boolean suppressFutureWarnings;
private volatile boolean paranoidWarnings;

public void initialize(String rootUri, List<String> excludes, boolean suppressFutureWarnings) {
public void initialize(String rootUri, List<String> excludes, boolean paranoidWarnings) {
synchronized (this) {
this.initialized = false;
this.suppressFutureWarnings = suppressFutureWarnings;
this.paranoidWarnings = paranoidWarnings;

var uris = rootUri != null
? getWorkspaceFiles(rootUri, excludes)
Expand Down Expand Up @@ -384,7 +384,7 @@ protected void publishDiagnostics(Set<URI> changedUris) {
}

for( var warning : astCache.getWarnings(uri) ) {
if( suppressFutureWarnings && warning instanceof FutureWarning )
if( !paranoidWarnings && warning instanceof FutureWarning )
continue;

var message = warning.getMessage();
Expand Down

0 comments on commit 88ca490

Please sign in to comment.