Ignore function naming check when annotated with @Test

pull/1094/head
lihenggui 1 year ago
parent 485440b550
commit 56fbe13b5a

@ -4,4 +4,4 @@
[*.{kt,kts}]
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
ktlint_function_naming_ignore_when_annotated_with=Composable
ktlint_function_naming_ignore_when_annotated_with=Composable, Test

@ -24,7 +24,6 @@ import kotlin.test.assertEquals
class ResultKtTest {
@Suppress("ktlint:standard:function-naming")
@Test
fun Result_catches_errors() = runTest {
flow {

@ -27,7 +27,7 @@ import kotlin.test.assertTrue
class IntToStringIdsMigrationTest {
@Test
fun intToStringIdsMigration_should_migrate_topic_ids() = runTest {
fun IntToStringIdsMigration_should_migrate_topic_ids() = runTest {
// Set up existing preferences with topic int ids
val preMigrationUserPreferences = userPreferences {
deprecatedIntFollowedTopicIds.addAll(listOf(1, 2, 3))
@ -56,7 +56,7 @@ class IntToStringIdsMigrationTest {
}
@Test
fun intToStringIdsMigration_should_migrate_author_ids() = runTest {
fun IntToStringIdsMigration_should_migrate_author_ids() = runTest {
// Set up existing preferences with author int ids
val preMigrationUserPreferences = userPreferences {
deprecatedIntFollowedAuthorIds.addAll(listOf(4, 5, 6))

@ -24,7 +24,7 @@ import kotlin.test.assertTrue
class ListToMapMigrationTest {
@Test
fun listToMapMigration_should_migrate_topic_ids() = runTest {
fun ListToMapMigration_should_migrate_topic_ids() = runTest {
// Set up existing preferences with topic ids
val preMigrationUserPreferences = userPreferences {
deprecatedFollowedTopicIds.addAll(listOf("1", "2", "3"))
@ -50,7 +50,7 @@ class ListToMapMigrationTest {
}
@Test
fun listToMapMigration_should_migrate_author_ids() = runTest {
fun ListToMapMigration_should_migrate_author_ids() = runTest {
// Set up existing preferences with author ids
val preMigrationUserPreferences = userPreferences {
deprecatedFollowedAuthorIds.addAll(listOf("4", "5", "6"))
@ -76,7 +76,7 @@ class ListToMapMigrationTest {
}
@Test
fun listToMapMigration_should_migrate_bookmarks() = runTest {
fun ListToMapMigration_should_migrate_bookmarks() = runTest {
// Set up existing preferences with bookmarks
val preMigrationUserPreferences = userPreferences {
deprecatedBookmarkedNewsResourceIds.addAll(listOf("7", "8", "9"))

@ -47,7 +47,7 @@ class TagScreenshotTests() {
val composeTestRule = createAndroidComposeRule<ComponentActivity>()
@Test
fun tag_multipleThemes() {
fun Tag_multipleThemes() {
composeTestRule.captureMultiTheme("Tag") {
NiaTopicTag(followed = true, onClick = {}) {
Text("TOPIC")

Loading…
Cancel
Save