Convert platform conditions for method (or property) scope

Description

Currenty,

converts to:

... but should optimally produce:

 

Note: in the ideal world we should generate the following, although this seems too difficult - just a suggestion for future:

Environment

None

Activity

Show:
Alex Petuschak
August 18, 2020, 4:45 PM

I’ve updated the description since it was misleading.

If you uncomment the directives, could you still produce the following? https://take.ms/VwFra

I definitely think we should uncomment directives.

If you can make this change and post a sample “before“ and “after“, that would be awesome.

 

Let’s still have a short call tomorrow to summarize what remains.

Dmitry Rassadin
August 18, 2020, 11:29 PM

We discussed it and decided to eliminate commenting for converted lines.

I made two revisions both without commenting. The first checks whether the directives are insideCompoundStatement and if not, doesn’t try to indent it. The second tries to indent all the converted outcome(and even swaps negate branches).

Alex Petuschak
August 20, 2020, 4:28 PM

Put this in review if all done here.

Dmitry Rassadin
August 20, 2020, 4:30 PM

Ok, I assumed last call, we decided to follow the second version(last commit on Feature/AvailabilitySupport).

Alex Petuschak
August 20, 2020, 4:43 PM
Edited

Great. Just merged Feature/AvailabilitySupportto Develop.

Once you are done with that branch you may delete it.

The error rate (with the set of our test projects) looks good in both of your branches, so we are fine to release those changes.

Assignee

Dmitry Rassadin

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

High
Configure