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

Commit

Permalink
Merge pull request #89 from mirpedrol/empty-params
Browse files Browse the repository at this point in the history
fix error when a parameter is not present in the schema and evaluates to false
  • Loading branch information
ewels authored Sep 15, 2023
2 parents 781511f + c802dff commit 10968ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# nextflow-io/nf-validation: Changelog

# Version 0.4.0
## Version 0.4.0 (dev)

### Bug fixes

- 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))
- 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))
- 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))

## Version 0.3.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ class SchemaValidator extends PluginExtensionPoint {
def isCamelCaseBug = (specifiedParam.contains("-") && !expectedParams.contains(specifiedParam) && expectedParamsLowerCase.contains(specifiedParamLowerCase))
if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam) && !isCamelCaseBug) {
if (failUnrecognisedParams) {
errors << "* --${specifiedParam}: ${paramsJSON[specifiedParam]}".toString()
errors << "* --${specifiedParam}: ${params[specifiedParam]}".toString()
} else {
warnings << "* --${specifiedParam}: ${paramsJSON[specifiedParam]}".toString()
warnings << "* --${specifiedParam}: ${params[specifiedParam]}".toString()
}
}
}
Expand Down

0 comments on commit 10968ea

Please sign in to comment.