Remove violations: discouraged-comment-location

pull/1094/head
lihenggui 7 months ago
parent fb5bd225be
commit f8f932705a

@ -60,7 +60,8 @@ class StartupBenchmark {
packageName = PACKAGE_NAME,
metrics = listOf(StartupTimingMetric()),
compilationMode = compilationMode,
iterations = 20, // More iterations result in higher statistical significance.
// More iterations result in higher statistical significance.
iterations = 20,
startupMode = COLD,
setupBlock = {
pressHome()

@ -19,7 +19,8 @@ package com.google.samples.apps.nowinandroid.core.model.data
/**
* A [topic] with the additional information for whether or not it is followed.
*/
data class FollowableTopic( // TODO consider changing to UserTopic and flattening
// TODO consider changing to UserTopic and flattening
data class FollowableTopic(
val topic: Topic,
val isFollowed: Boolean,
)

@ -38,8 +38,10 @@ import org.robolectric.RuntimeEnvironment
val DefaultRoborazziOptions =
RoborazziOptions(
compareOptions = CompareOptions(changeThreshold = 0f), // Pixel-perfect matching
recordOptions = RecordOptions(resizeScale = 0.5), // Reduce the size of the PNGs
// Pixel-perfect matching
compareOptions = CompareOptions(changeThreshold = 0f),
// Reduce the size of the PNGs
recordOptions = RecordOptions(resizeScale = 0.5),
)
enum class DefaultTestDevices(val description: String, val spec: String) {

@ -186,7 +186,8 @@ fun NewsResourceHeaderImage(
painterResource(drawable.ic_placeholder_default)
},
// TODO b/226661685: Investigate using alt text of image to populate content description
contentDescription = null, // decorative image,
// decorative image,
contentDescription = null,
)
}
}
@ -295,7 +296,8 @@ fun NewsResourceTopics(
modifier: Modifier = Modifier,
) {
Row(
modifier = modifier.horizontalScroll(rememberScrollState()), // causes narrow chips
// causes narrow chips
modifier = modifier.horizontalScroll(rememberScrollState()),
horizontalArrangement = Arrangement.spacedBy(4.dp),
) {
for (followableTopic in topics) {

@ -437,7 +437,8 @@ fun TopicIcon(
DynamicAsyncImage(
placeholder = painterResource(R.drawable.ic_icon_placeholder),
imageUrl = imageUrl,
contentDescription = null, // decorative
// decorative
contentDescription = null,
modifier = modifier
.padding(10.dp)
.size(32.dp),

@ -99,7 +99,8 @@ private fun InterestsIcon(topicImageUrl: String, modifier: Modifier = Modifier)
.background(MaterialTheme.colorScheme.surface)
.padding(4.dp),
imageVector = NiaIcons.Person,
contentDescription = null, // decorative image
// decorative image
contentDescription = null,
)
} else {
DynamicAsyncImage(

@ -328,7 +328,8 @@ private fun SearchResultBody(
topics.forEach { followableTopic ->
val topicId = followableTopic.topic.id
item(
key = "topic-$topicId", // Append a prefix to distinguish a key for news resources
// Append a prefix to distinguish a key for news resources
key = "topic-$topicId",
span = StaggeredGridItemSpan.FullLine,
) {
InterestsItem(

@ -39,7 +39,6 @@ rootProject {
mapOf(
"android" to "true",
"ktlint_standard_property-naming" to "disabled",
"ktlint_standard_discouraged-comment-location" to "disabled",
),
)
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))

Loading…
Cancel
Save