Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit.FormatDocument fails to format arguments when return value is NOT ignored #54496

Open
vsfeedback opened this issue Jun 30, 2021 · 0 comments
Labels
Area-IDE Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Formatter Code formatter and/or smart indent
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]

Before Editor.FormatDocument

Argument list is not formatted for statements that assign RVALUE.

private string NewString ( char [] value, int startIndex, int length )
{
  new string(   new [] {'i', 'o', 'p'}    , 3  ,   9   );
  string str = new string(   new [] {'i', 'o', 'p'}    , 3  ,   9   );
  
  NewString (   new [] {'i', 'o', 'p'}    , 3  ,   9  );
  var str2 = NewString(   new [] {'i', 'o', 'p'}    , 3  ,   9  );
  
  int.Parse( "3" );
  var int1 = int.Parse( "3" );
  
  return "";
}

After it

private string NewString ( char [] value, int startIndex, int length )
{
  new string (new [] { 'i', 'o', 'p' }, 3, 9);
  string str = new string(   new [] {'i', 'o', 'p'}    , 3  ,   9   ); // <---- Spacing kept

  NewString (new [] { 'i', 'o', 'p' }, 3, 9);
  var str2 = NewString(   new [] {'i', 'o', 'p'}    , 3  ,   9  ); // <---- Spacing kept

  int.Parse ("3");
  var int1 = int.Parse( "3" ); // <---- Spacing kept

  return "";
}

Original Comments

Feedback Bot on 6/28/2021, 06:45 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 30, 2021
@jinujoseph jinujoseph added Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Formatter Code formatter and/or smart indent and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 9, 2021
@jinujoseph jinujoseph added this to the Backlog milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Formatter Code formatter and/or smart indent
Projects
None yet
Development

No branches or pull requests

2 participants