How to put "#nullable" after using (import) block after code reformat
Answered
Please help to find a setting for this.
How to say to Rider (Resharper) put #nullable after using (import) block after code reformat?
My example:
- Preconditions:
- JetBrains Rider 2022.1.2. I expect the same results with Resharper because Rider and Resharper use the same settings.
- File with content:
using System.Collections.Generic;
#nullable enable
internal record Response
{
public IList<decimal>? Items { get; init; }
}
- Steps:
1. Choose the file in solution explorer
2. Context menu -> Refactor this -> Move to folder
Actual result:
- `#nullable enable` was moved before using (import) block.
#nullable enable
using System.Collections.Generic;
internal record Response
{
public IList<decimal>? Items { get; init; }
}
Expected result:
- File content did not change.
Please sign in to leave a comment.
Sergey Rubtsov, thank you for your question. I've submitted a new feature request to YouTrack: https://youtrack.jetbrains.com/issue/RSRP-489353. Please comment/vote for it. I changed the text of the request, I hope that I understood the problem correctly and the general meaning of the question is the same. Please let me know if something is wrong. Thank you!
Maria Pleskunina Thank you for creating the feature request. You have understood the problem correctly.
Great, thank you for letting me know!