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

fix error when a parameter is not present in the schema and evaluates to false #89

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))

## Version 0.3.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,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