Remove violations: discouraged-comment-location

pull/1094/head
lihenggui 1 year ago
parent fb5bd225be
commit f8f932705a

@ -60,7 +60,8 @@ class StartupBenchmark {
packageName = PACKAGE_NAME, packageName = PACKAGE_NAME,
metrics = listOf(StartupTimingMetric()), metrics = listOf(StartupTimingMetric()),
compilationMode = compilationMode, compilationMode = compilationMode,
iterations = 20, // More iterations result in higher statistical significance. // More iterations result in higher statistical significance.
iterations = 20,
startupMode = COLD, startupMode = COLD,
setupBlock = { setupBlock = {
pressHome() 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. * 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 topic: Topic,
val isFollowed: Boolean, val isFollowed: Boolean,
) )

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

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

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

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

@ -328,7 +328,8 @@ private fun SearchResultBody(
topics.forEach { followableTopic -> topics.forEach { followableTopic ->
val topicId = followableTopic.topic.id val topicId = followableTopic.topic.id
item( 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, span = StaggeredGridItemSpan.FullLine,
) { ) {
InterestsItem( InterestsItem(

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

Loading…
Cancel
Save