-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
Documentation generator truncates config descriptions #692
Conversation
@@ -92,9 +92,10 @@ internal class RuleVisitor : DetektVisitor() { | |||
valid | |||
} | |||
.map { | |||
val name = it.split("-")[0].trim() | |||
val delimiterIndex = it.indexOf('-') | |||
val name = it.substring(0, delimiterIndex-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces around the -
: delimiterIndex-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a trim(). It doesn't matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm talking about your code at this line, not the documentation it generates. The code needs a reformatting.
val defaultValue = configurationDefaultValueRegex.find(it)?.groupValues?.get(1)?.trim() ?: "" | ||
val description = it.split("-")[1] | ||
val description = it.substring(delimiterIndex+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces around the +
: delimiterIndex+1
This should fix #691