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

Documentation generator truncates config descriptions #692

Merged
merged 3 commits into from
Jan 16, 2018
Merged

Documentation generator truncates config descriptions #692

merged 3 commits into from
Jan 16, 2018

Conversation

schalkms
Copy link
Member

This should fix #691

@@ -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)
Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

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)
Copy link
Contributor

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

@arturbosch arturbosch merged commit 143ffbc into detekt:master Jan 16, 2018
@schalkms schalkms deleted the fix-#691 branch January 16, 2018 09:53
@arturbosch arturbosch added this to the RC6-3 milestone Jan 16, 2018
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.

Documentation generator truncates some configuration descriptions
5 participants