Do not rename generated optional variables (omit `a` or `an` prefixes)

Description

+See Keegan's objectives in SWC-646.
Instead of

we should generate

if we can still keep the same error rate as with the current solution.

Environment

None

Activity

Show:
Alex Petuschak
April 4, 2018, 9:35 AM
Edited

+Related: need to extract the optional variable name based on the ANTLR context, rather than the last (or first) identifier in the given expression.
Example (ZendDesk ticket #173):

is converted to this rather verbose

The optional variable name should be `data` rather than `aPath` here.

Alex Petuschak
December 27, 2018, 2:16 PM

After some testing, I cannot find any single issue / case when using shadow variables increases the number of errors in the output.
Thus, we have removed `a` prefixes.
If we find another case(s) when using shadow variables (i.e. `if let myVar = myVar`) affects the error rate, let's revisit this.

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

High
Configure