jslint-org / jslint

JSLint, The JavaScript Code Quality and Coverage Tool
https://www.jslint.com
The Unlicense
3.62k stars 463 forks source link

Bug report: Version broken in pip #444

Closed Gunni closed 1 year ago

Gunni commented 1 year ago

The program doesn't work because an url in the code is missing. Right now it returns 400: Invalid request from Github.

  1. A clear and concise description of what the bug is.

    File "/somewhere/lib64/python3.11/site-packages/pyjslint.py", line 77, in get_lint
    response = urlopen('https://raw.github.com/douglascrockford/'
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. Jslint edition: PIP?

  3. Code snippet (if applicable):

    // file empty
  4. Reproducer

    $ rm -f hello.js && touch hello.js && pyjslint hello.js
    Traceback (most recent call last):
    File "/somewhere/bin/pyjslint", line 8, in <module>
    sys.exit(main())
             ^^^^^^
    File "/somewhere/lib64/python3.11/site-packages/pyjslint.py", line 123, in main
    output, valid = process(open(filename, "r"), options)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/somewhere/lib64/python3.11/site-packages/pyjslint.py", line 95, in process
    lint = get_lint(options)
           ^^^^^^^^^^^^^^^^^
    File "/somewhere/lib64/python3.11/site-packages/pyjslint.py", line 77, in get_lint
    response = urlopen('https://raw.github.com/douglascrockford/'
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
             ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
    File "/usr/lib64/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 404: Not Found

Expected behavior

kaizhu256 commented 1 year ago