Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 10968ea

Browse files
authored
Merge pull request #89 from mirpedrol/empty-params
fix error when a parameter is not present in the schema and evaluates to false
2 parents 781511f + c802dff commit 10968ea

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# nextflow-io/nf-validation: Changelog
22

3-
# Version 0.4.0
3+
## Version 0.4.0 (dev)
4+
5+
### Bug fixes
46

57
- Add parameters defined on the top level of the schema and within the definitions section as expected params ([#79](https://github.com/nextflow-io/nf-validation/pull/79))
8+
- Fix error when a parameter is not present in the schema and evaluates to false ([#89](https://github.com/nextflow-io/nf-validation/pull/89))
69
- Changed the `schema_filename` option of `fromSamplesheet` to `parameters_schema` to make this option more clear to the user ([#91](https://github.com/nextflow-io/nf-validation/pull/91))
710

811
## Version 0.3.1

plugins/nf-validation/src/main/nextflow/validation/SchemaValidator.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ class SchemaValidator extends PluginExtensionPoint {
320320
def isCamelCaseBug = (specifiedParam.contains("-") && !expectedParams.contains(specifiedParam) && expectedParamsLowerCase.contains(specifiedParamLowerCase))
321321
if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam) && !isCamelCaseBug) {
322322
if (failUnrecognisedParams) {
323-
errors << "* --${specifiedParam}: ${paramsJSON[specifiedParam]}".toString()
323+
errors << "* --${specifiedParam}: ${params[specifiedParam]}".toString()
324324
} else {
325-
warnings << "* --${specifiedParam}: ${paramsJSON[specifiedParam]}".toString()
325+
warnings << "* --${specifiedParam}: ${params[specifiedParam]}".toString()
326326
}
327327
}
328328
}

0 commit comments

Comments
 (0)