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

fix: add support for leading tab characters with trim-kotlin-indent. #2579

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

testersen
Copy link

@testersen testersen commented Apr 19, 2024

We're using Springdoc with Kotlin + Ktlint. We have configured Ktlint to use tabs instead of spaces as indents.

	@GetMapping("/assets")
	@Operation(
		operationId = "getAssets",
		summary = "Get the assets of the signed in user",
		description = """
			Get the assets owned by the currently signed in user.
		""",
		// ^^^^ Tab characters here turned into a code block.
	)
	@[WithExternalEndUser ScopesAllowed("...")]
	fun getAssets(
		@RequestParam(required = false, defaultValue = "nb-NO") locale: String,
	): List<AssetCard> = TODO()

This pull request appends on the condition in the countLeadingSpaces method where the count loop filters on spaces. The change makes the condition break on a non space or tab character.

@testersen
Copy link
Author

@bnasslahsen Heyo :) Any ETA for when we can look into merging this? Would you like to see any changes in this suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant