Inconsistency with removal of underscore from identifier names

Description

converts to:

(if using a global scope).

+An underscore should be either kept or removed in both usages.

Environment

None

Activity

Show:
Alex Petuschak
February 14, 2018, 3:09 PM
Edited

+Related: both the declaration and usage of the `_instance` global / private variable should have the underscore kept or removed (see attached UserNotificationCenter.*).
Currently, the converted declaration keeps underscore:

.. but further usages of this variable do not have the underscore.

Alex Petuschak
October 18, 2018, 9:09 AM
Edited

Related report (daniel.cascais@gmail.com):

If a private var is used with an underscore _myVar, don't replace it with myVar.

Update: this is fixed for the case when the variable declaration is known for the converter.
When the variable declaration is unknown (the case with a partial code conversion),
an alternative option is to remove underscores from instance variables only ().

Alex Petuschak
February 20, 2019, 3:48 PM
Edited

+Related report (nicolas.kick@gmail.com):

12) "[super description]" in an NSObject subclass was converted to "super._description" which doesn't exist.

+Fixed: see `ShouldTranslateNSObjectDescriptionProperty` test.

Alex Petuschak
June 11, 2019, 3:45 PM
Edited

+Related:

Fails and produces the following:

 

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

Git Branch Name

None

GitHub Issue

None

Time tracking

4h

Components

Fix versions

Priority

High
Configure