@Operation(summary = "random Events Handler", description = "Endpoints for receiving random events")
@ApiResponse(responseCode = "200")
@PostMapping("/random")
fun handleEvent(@RequestBody event: Event) = service.handleEvents(event)
Observed Behavior
I have a method with one parameter that has an expression that is within my 140 character limit, and yet ktlint formats to add a new line within the parantheses as-well as a comma after the first parameter. I've scoured the ruleset and tried modifying values to no avail.
Ktlint formats as
@Operation(summary = "RandomEvents Handler", description = "Endpoints for receiving random events")
@ApiResponse(responseCode = "200")
@PostMapping("/random")
fun handleEvent(
@RequestBody event: Event,
) = service.handleEvents(event)
So it properly retains the expression to one line, but the signature get's placed on a multiline. Maybe I'm not fully understanding the documentation, but I have tried it to various setting with no luck
* Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): N/A as occurs with ktlint intellij plugin as-well
* Version of Gradle used (if applicable): `v7.4.2`
* Operating System: `Windows 10`
* Version: `10.0.22631 Build 22631`
Expected Behavior
So currently in my
.editorconfig
I have set, among others, the followingBelow is my expectation
Observed Behavior
I have a method with one parameter that has an expression that is within my
140
character limit, and yet ktlint formats to add a new line within the parantheses as-well as a comma after the first parameter. I've scoured the ruleset and tried modifying values to no avail.Ktlint formats as
So it properly retains the expression to one line, but the signature get's placed on a multiline. Maybe I'm not fully understanding the documentation, but I have tried it to various setting with no luck
Steps to Reproduce
Your Environment
1.2.1
.editorconfig
settingsGeneral Configuration
indent_size = 4 indent_style = space insert_final_newline = true max_line_length = 140 end_of_line = lf
Intellij Configuration
ij_kotlin_allow_trailing_comma = true ij_kotlin_allow_trailing_comma_on_call_site = true ij_kotlin_packages_to_use_import_on_demand = *,java.,javax.,kotlin.*,^ ij_kotlin_imports_layout = ,java.,javax.,kotlin.**,^ ij_kotlin_line_break_after_multiline_when_entry = true