common-workflow-language / common-workflow-language/cwltool
cwltool --validate should error on jshint errors and certain warnings
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
## Expected Behavior
`cwltool --validate`, when encountering a `jshint` error and certain warnings, should fail validation.
## Actual Behavior
`jshint` errors are reported as warnings always.
```
INFO Resolved 'ticker.cwl' to 'file:///home/peter/work/tmp/jshint/ticker.cwl'
WARNING ticker.cwl:8:5: JSHINT: (function(){return ((missing_js_function()));})()
ticker.cwl:8:5: JSHINT: ^
ticker.cwl:8:5: JSHINT: W117: 'missing_js_function' is not defined.
WARNING ticker.cwl:9:5: JSHINT: (function(){return ((syntax_error//));})()
ticker.cwl:9:5: JSHINT: ^
ticker.cwl:9:5: JSHINT: E019: Unmatched '('.
WARNING ticker.cwl:9:5: JSHINT: (function(){return ((syntax_error//));})()
ticker.cwl:9:5: JSHINT: ^
ticker.cwl:9:5: JSHINT: E041: Unrecoverable syntax error. (100% scanned).
ticker.cwl is valid CWL.
```
## Workflow Code
```
cwlVersion: v1.2
class: CommandLineTool
requirements:
InlineJavascriptRequirement: {}
inputs: []
arguments:
- echo
- $(missing_js_function())
- $(syntax_error//)]
outputs: []
```
## Your Environment
* cwltool version: 0f58a968df744e6b8bd25d7ff79cca8f8767bd2e
## Proposed solution
Codes from `jshint` that start with 'E' (for 'error') should always fail. The warning "W117" (symbol not defined) should also be treated as an error. These should be logged as errors by `cwltool` and cause validation to fail.
Contributor guide
Assessment
This issue has not been assessed yet.