-
Notifications
You must be signed in to change notification settings - Fork 1
Explore utilizing type-checking information #140
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestfalse-negativethe issue can create a false-negativethe issue can create a false-negativevet-botthe issue is part of VetBot's responsibilitythe issue is part of VetBot's responsibility
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestfalse-negativethe issue can create a false-negativethe issue can create a false-negativevet-botthe issue is part of VetBot's responsibilitythe issue is part of VetBot's responsibility
Type
Fields
Give feedbackNo fields configured for issues without a type.
Tim King pointed out the possibility for code like this to yield false negatives. The issue is one of not being able to perform a whole program analysis without downloading dependencies.
Suppose that
barreturns some type whose declaration ofmethodis not present in the target repository, and is not available for VetBot to analyze. Suppose also that there are unary functions namedmethoddeclared in the target repository, and that the argument is marked safe.If the declaration of
methodactually usesvin an unsafe way, VetBot will report a false-negative. Also, VetBot currently has no way to understand that the method being used refers to a declaration that it cannot see.The approach to use here is to try and provide VetBot with whatever information it needs to determine that
methodrefers to a declaration VetBot did not see. To do that means we will need to rely on some type-checking information to at least determine whether the type referred to is one that is declared in the repository rather than imported from a third-party.That means exploring the use of the
typesandpackagespackages. That is a rather involved undertaking which may disrupt changes happening in parallel.