ucr-riple / NullAwayAnnotator

A tool to help adapting code bases to NullAway type system.
MIT License
13 stars 6 forks source link

Add support for modifications on local variables #184

Closed nimakarimipour closed 1 year ago

nimakarimipour commented 1 year ago

This PR adds support for applying changes on local variables declared in methods.

To locate a local variable declaration statement node in the AST, information below must be passed to injector:

  1. Flat name of the enclosing class.
  2. Method signature of the closest enclosing method.
  3. Local variable name.

With these information, injector is able to locate the variable declaration statement and apply the requested changes.

msridhar commented 1 year ago

@nimakarimipour to be clear this PR shouldn't impact NullAway support in any way, correct?

nimakarimipour commented 1 year ago

@nimakarimipour to be clear this PR shouldn't impact NullAway support in any way, correct?

@msridhar Yes exactly, it does not in any way.

nimakarimipour commented 1 year ago

@msridhar Thank you for the review, this is ready for another round.