utk-se / CodeAnalytics-analyzer

Single-shot code analysis for a code repo
1 stars 0 forks source link

Function might have incomplete parameter specification #48

Closed robobenklein closed 4 years ago

robobenklein commented 4 years ago
[2020-07-12 00:41:26] [    INFO] [jsonresults __init__] Initializing analysis_function...
[2020-07-12 00:41:26] [    INFO] [jsonresults __init__] Analyzer version 0.0.6
[2020-07-12 00:41:26] [    INFO] [jsonresults __init__] Versioning results as 0_0_6
[2020-07-12 00:41:26] [    INFO] [jsonresults __init__] Pinging API...
[2020-07-12 00:41:26] [    INFO] [jsonresults __init__] Worker: coretester1
[2020-07-12 00:41:26] [    INFO] [jsonresults __init__] Checking in...
[2020-07-12 00:41:26] [    INFO] [api checkin] Checkin completed: bootup
[2020-07-12 00:41:26] [    INFO] [jsonresults claim_job] Claimed job successfully.
[2020-07-12 00:41:26] [    INFO] [api checkin] Checkin completed: claimed job
[2020-07-12 00:41:26] [    INFO] [jsonresults job_loop] Claimed job: https://github.com/hypha-publication/hypha-desktop.git, going to work...
[2020-07-12 00:41:26] [    INFO] [api checkin] Checkin completed: setup
[2020-07-12 00:41:26] [    INFO] [api checkin] Checkin completed: clone
[2020-07-12 00:41:26] [    INFO] [jsonresults execute_job] Beginning clone for job https://github.com/hypha-publication/hypha-desktop.git
[2020-07-12 00:41:26] [    INFO] [api checkin] Checkin completed: analyze
[2020-07-12 00:41:26] [    INFO] [analyzer __init__] job-https%3A%2F%2Fgithub.com%2Fhypha-publication%2Fhypha-desktop.git/webpack.ui.config.js
[2020-07-12 00:41:26] [   ERROR] [jsonresults execute_job] Unknown exception when calling the analysis_function!
[2020-07-12 00:41:26] [   ERROR] [jsonresults start] Unknown exception: 'FunctionInfo' object has no attribute 'full_parameters'
[2020-07-12 00:41:26] [    INFO] [api checkin] Checkin completed: error
Traceback (most recent call last):
  File "/home/ca-worker/venv/bin/ca-worker", line 11, in <module>
    load_entry_point('CA-Distributor==0.1.1.dev0', 'console_scripts', 'ca-worker')()
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CA_Distributor-0.1.1.dev0-py3.6.egg/cadistributor/worker/jsonresults.py", line 249, in __main__
    worker.start()
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CA_Distributor-0.1.1.dev0-py3.6.egg/cadistributor/worker/jsonresults.py", line 226, in start
    raise e
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CA_Distributor-0.1.1.dev0-py3.6.egg/cadistributor/worker/jsonresults.py", line 212, in start
    self.job_loop()
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CA_Distributor-0.1.1.dev0-py3.6.egg/cadistributor/worker/jsonresults.py", line 200, in job_loop
    self.execute_job(repo)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CA_Distributor-0.1.1.dev0-py3.6.egg/cadistributor/worker/jsonresults.py", line 179, in execute_job
    raise e # will let the main loop report error to server
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CA_Distributor-0.1.1.dev0-py3.6.egg/cadistributor/worker/jsonresults.py", line 175, in execute_job
    result = self.config['analysis']['function'](repodir)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CAanalyzer-0.0.6-py3.6.egg/caanalyzer/__main__.py", line 10, in analyze
    repo = analyzer.Repo(path, ignorefile, True)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CAanalyzer-0.0.6-py3.6.egg/caanalyzer/analyzer.py", line 205, in __init__
    file_obj = File(file_path, file_ext, tabsize)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/CAanalyzer-0.0.6-py3.6.egg/caanalyzer/analyzer.py", line 366, in __init__
    for param in func.full_parameters:
AttributeError: 'FunctionInfo' object has no attribute 'full_parameters'

I think it's still making the assumption that the code is reasonably formatted.

robobenklein commented 4 years ago

This seems to reproduce on every javascript repo I've tried

jball1997 commented 4 years ago

I got a different error testing out this repo. fixed it.