Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cwltool --validate should error on jshint errors and certain warnings #1874

Open
tetron opened this issue Jul 6, 2023 · 0 comments
Open

Comments

@tetron
Copy link
Member

tetron commented Jul 6, 2023

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant