Project: | Prolint Issue Tracker |
Component: | Rules |
Category: | feature request |
Priority: | normal |
Assigned: | Unassigned |
Status: | active |
Suppose there is a statement:
FIND something WHERE something.color = "red" NO-ERROR etc
but there is no unique key on the selected fields (color). The FIND statement will return nothing. Of course this can be intentional, but I think it is often a mistake.
Comments
FIND can still return
FIND can still return something if there is only 1 instance of color red ...
I would probably flag this in all cases though if 'if ambiguous' is not specified following it (which I think is very hard to check with globally defined buffers) ... I'd rather say ' possible ambiguous find' message so that developer can take a second look, than skip it worrying that it will generate a false positive.