Skip to content

Switch order of literals codemod should respect previous null checks #298

@nahsra

Description

@nahsra

There has been negative feedback to changes made by this codemod when there is a comparison to null directly previous to the suggested change.

Besides looking inside the method for previous checks, we could also check to see if it's a final class member which has null invariance on assignment.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions