Do not sort twice
This commit is contained in:
@@ -383,14 +383,13 @@ internal class DescriptorRendererImpl(
|
|||||||
} ?: emptyList()
|
} ?: emptyList()
|
||||||
val defaultList = parameterDescriptorsWithDefaultValue.filter { !allValueArguments.containsKey(it) }.map {
|
val defaultList = parameterDescriptorsWithDefaultValue.filter { !allValueArguments.containsKey(it) }.map {
|
||||||
"${it.getName().asString()} = ..."
|
"${it.getName().asString()} = ..."
|
||||||
}.sorted()
|
}
|
||||||
val argumentList = allValueArguments.entrySet()
|
val argumentList = allValueArguments.entrySet()
|
||||||
.map { entry ->
|
.map { entry ->
|
||||||
val name = entry.key.getName().asString()
|
val name = entry.key.getName().asString()
|
||||||
val value = if (!parameterDescriptorsWithDefaultValue.contains(entry.key)) renderConstant(entry.value) else "..."
|
val value = if (!parameterDescriptorsWithDefaultValue.contains(entry.key)) renderConstant(entry.value) else "..."
|
||||||
"$name = $value"
|
"$name = $value"
|
||||||
}
|
}
|
||||||
.sorted()
|
|
||||||
return (defaultList + argumentList).sorted()
|
return (defaultList + argumentList).sorted()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ fun getDirectoryString(dir: File, interestingPaths: List<String>): String {
|
|||||||
val listFiles = dir.listFiles()
|
val listFiles = dir.listFiles()
|
||||||
assertNotNull(listFiles)
|
assertNotNull(listFiles)
|
||||||
|
|
||||||
val children = listFiles!!.toList().sortedBy { it.getName() }.sortedBy { it.isDirectory() }
|
val children = listFiles!!.sortedWith(compareBy ({ it.directory }, { it.name } ))
|
||||||
for (child in children) {
|
for (child in children) {
|
||||||
if (child.isDirectory()) {
|
if (child.isDirectory()) {
|
||||||
p.println(child.name)
|
p.println(child.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user