4

I prefer having parameter attributes stay on the same line as the parameter itself:

[Authorize]
[HttpPost()]
public async Task<ActionResult<QuoteResponse>> CreateQuoteDataOnly([FromBody] QuoteRequest request)

However, I can't find the settings in Rider to make that happen.

Instead I get this:

[Authorize]
[HttpPost()]
public async Task<ActionResult<QuoteResponse>> CreateQuoteDataOnly([FromBody]
    QuoteRequest request)

It puts a line break AFTER the FromBody attribute.

Image of some of my settings in Rider: Rider settings The docs here haven't helped me yet: https://www.jetbrains.com/help/rider/EditorConfig_CSHARP_LineBreaksPageSchema.html

Hopefully I'm not the only one who finds this annoying, and so far my googling skills have failed me.

Nateous
  • 757
  • 9
  • 23
  • Your answer is probably here: https://stackoverflow.com/questions/24355976/how-to-change-line-width-in-intellij-from-120-character – Oguz Ozgul Mar 12 '20 at 23:18
  • I have my line width set at 300 already, and I have the "soft wraps" turned on, but the formatter inserts a new line just after the attribute – Nateous Mar 13 '20 at 01:56
  • I have same problem. Can somebody help us ? – Ramin May 16 '21 at 11:28

1 Answers1

2

Increase "Place attribute section list on separate line if it is longer than" parameter value in "Line Breaks and Wrapping" tab: Screenshot

camle
  • 21
  • 4