Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: No javascript validation in this Debian package due to licensing issue with jshint
--- cwltool.orig/tests/test_validate_js.py
+++ cwltool/tests/test_validate_js.py
@@ -1,4 +1,4 @@
-from cwltool import process, validate_js
+from cwltool import process
 from cwltool.sandboxjs import code_fragment_to_js
 from ruamel import yaml
 
@@ -17,63 +17,3 @@
 
 outputs: []
 """
-
-
-def test_get_expressions():
-    test_cwl_yaml = yaml.round_trip_load(TEST_CWL)
-    schema = process.get_schema("v1.0")[1].names["CommandLineTool"]
-
-    exprs = validate_js.get_expressions(test_cwl_yaml, schema)
-
-    assert len(exprs) == 1
-
-
-def test_validate_js_expressions(mocker):
-    test_cwl_yaml = yaml.round_trip_load(TEST_CWL)
-    schema = process.get_schema("v1.0")[1].names["CommandLineTool"]
-
-    mocker.patch("cwltool.validate_js.print_js_hint_messages")
-    validate_js.validate_js_expressions(test_cwl_yaml, schema)
-
-    assert validate_js.print_js_hint_messages.call_args is not None
-    assert len(validate_js.print_js_hint_messages.call_args[0]) > 0
-
-
-def test_js_hint_basic():
-    result = validate_js.jshint_js(
-        """
-    function funcName(){
-    }
-    """,
-        [],
-    )
-
-    assert result.errors == []
-    assert result.globals == ["funcName"]
-
-
-def test_js_hint_reports_invalid_js():
-    assert len(validate_js.jshint_js("<INVALID JS>").errors) > 1
-
-
-def test_js_hint_warn_on_es6():
-    assert (
-        len(validate_js.jshint_js(code_fragment_to_js("((() => 4)())"), []).errors) == 1
-    )
-
-
-def test_js_hint_error_on_undefined_name():
-    assert (
-        len(validate_js.jshint_js(code_fragment_to_js("undefined_name()")).errors) == 1
-    )
-
-
-def test_js_hint_set_defined_name():
-    assert (
-        len(
-            validate_js.jshint_js(
-                code_fragment_to_js("defined_name()"), ["defined_name"]
-            ).errors
-        )
-        == 0
-    )
--- cwltool.orig/cwltool/argparser.py
+++ cwltool/cwltool/argparser.py
@@ -321,17 +321,7 @@
     parser.add_argument(
         "--js-console", action="store_true", help="Enable javascript console output"
     )
-    parser.add_argument(
-        "--disable-js-validation",
-        action="store_true",
-        help="Disable javascript validation.",
-    )
-    parser.add_argument(
-        "--js-hint-options-file",
-        type=str,
-        help="File of options to pass to jshint."
-        'This includes the added option "includewarnings". ',
-    )
+    parser.add_argument("--disable-js-validation", help=argparse.SUPPRESS)
     dockergroup = parser.add_mutually_exclusive_group()
     dockergroup.add_argument(
         "--user-space-docker-cmd",
--- cwltool.orig/cwltool/process.py
+++ cwltool/cwltool/process.py
@@ -651,27 +651,8 @@
                 schema.convert_to_dict(self.outputs_record_schema), self.names
             )
 
-        if toolpath_object.get("class") is not None and not getdefault(
-            loadingContext.disable_js_validation, False
-        ):
-            if loadingContext.js_hint_options_file is not None:
-                try:
-                    with open(loadingContext.js_hint_options_file) as options_file:
-                        validate_js_options = json.load(options_file)
-                except (OSError, ValueError) as err:
-                    _logger.error(
-                        "Failed to read options file %s",
-                        loadingContext.js_hint_options_file,
-                    )
-                    raise
-            else:
-                validate_js_options = None
-            if self.doc_schema is not None:
-                validate_js_expressions(
-                    cast(CommentedMap, toolpath_object),
-                    self.doc_schema.names[toolpath_object["class"]],
-                    validate_js_options,
-                )
+        # No javascript validation in this Debian package due to licensing
+        # issue with jshint
 
         dockerReq, is_req = self.get_requirement("DockerRequirement")
 
