Roslyn: Add a refactoring to convert conditional to if statement

Created on 16 Aug 2018  路  5Comments  路  Source: dotnet/roslyn

This would be the reverse of IDE0046 for users that prefer if statements.

Also consider making it a setting in .editorconfig

Area-IDE Feature Request help wanted

Most helpful comment

  1. I'm definitely supportive of hte refactoring to convert conditional-to-if.
  2. I'm more wary of the idea of this being .editorconfig. I don't think i'd really want to support an option saying: you can't use conditionals and you must use if-statements.

All 5 comments

  1. I'm definitely supportive of hte refactoring to convert conditional-to-if.
  2. I'm more wary of the idea of this being .editorconfig. I don't think i'd really want to support an option saying: you can't use conditionals and you must use if-statements.

I would be interested in working on this if no one has started on it. It is my first time contributing to the project and seems like a good introduction.

Sure , Go for it @tokarzkj
cc @heejaechang as your buddy to help out if you have questions.

@tokarzkj I'd recommend holding off on this until https://github.com/dotnet/roslyn/pull/28768 goes in. Because this new refactoring of the current analyzer/fix that is in the product, it would be good if that dependent PR goes in as it will help force the appropriate shape for the refactoring you'd provide.

@CyrusNajmabadi - Thanks for the heads up! I will wait for that PR before beginning my work then.

Was this page helpful?
0 / 5 - 0 ratings