deprecated.frosted icon indicating copy to clipboard operation
deprecated.frosted copied to clipboard

Feature Request: Add more checks

Open msmhrt opened this issue 11 years ago • 3 comments

I think it would be nice if frosted can check the following code.

def a(b):
    if b:
        c = 1
    return c  # variable 'c' may not exist
def a():
    b = 0  # this line should be error "local variable 'b' is assigned to but never used"
    return
    b += 1  # unreachable code

msmhrt avatar Jan 30 '14 14:01 msmhrt

Thanks for finding these failure cases! I'll put a fix in for them prior to the next release.

~Timothy

timothycrosley avatar Jan 30 '14 22:01 timothycrosley

On the other hand, the unreachable code should be a warning as well. :)

smokey42 avatar Jul 01 '14 09:07 smokey42

Should frosted be picking up undeclared variables at the moment?

zoidyzoidzoid avatar Aug 20 '14 13:08 zoidyzoidzoid