Skip to content

Commit 068c5b8

Browse files
committed
Infer default value for booleans in parameter schema
1 parent 0b938ae commit 068c5b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/nextflow/lsp/services/script/ParameterSchemaVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ private ClassNode declareParamsFromSchema0() {
137137
continue;
138138
var type = getTypeClassFromString(asString(attrs.get("type")));
139139
var defaultValue = attrs.get("default");
140+
if( defaultValue == null && ClassHelper.Boolean_TYPE.equals(type) )
141+
defaultValue = false;
140142
var description = asString(attrs.get("description"));
141143
var fn = new FieldNode(name, Modifier.PUBLIC, type, cn, null);
142144
fn.setHasNoRealSourcePosition(true);

0 commit comments

Comments
 (0)