captainbrosset/cleanjs — Issue #4: variablelength.py failing when no occurences of named variable are found in function
Author: captainbrosset
Created: 2012-01-24 08:37:03+00:00
State: open

Use case is:
variablelength.is_variable_name_too_short("doesnotexist", function_code)
where function_code does not contain "doesnotexist"

Error is:
Traceback (most recent call last):
File ".\sublime_plugin.py", line 351, in run_
File ".\cleanjs_sublime.py", line 34, in run
File ".\reviewers\reviewer.py", line 9, in review
File ".\reviewers\codesize.py", line 107, in review
File ".\reviewers\codesize.py", line 71, in review_variable_name_size
File ".\reviewers\helpers\variablelength.py", line 36, in is_variable_name_too_short
"""
File ".\reviewers\helpers\variablelength.py", line 21, in get_variable_minmax_occurences_in_code

Should add a unit test for this edge case