From ddf70a210e7cc774c8610a0b951d3faf564ce2c5 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Fri, 1 Mar 2024 20:00:29 +0100 Subject: [PATCH] Enable Ktlint `filename` rule (#5512) --- .editorconfig | 1 - .../streetcomplete/data/osmtracks/{Track.kt => Trackpoint.kt} | 0 .../streetcomplete/osm/{LocalizedNames.kt => LocalizedName.kt} | 0 .../streetcomplete/osm/{WaysCrossings.kt => WaysCrossing.kt} | 0 .../{SidewalkSurface.kt => LeftAndRightSidewalkSurface.kt} | 0 .../streetcomplete/osm/street_parking/StreetParkingKtTest.kt | 2 +- .../streetcomplete/quests/building_entrance/AddEntranceTest.kt | 2 +- .../building_entrance_reference/AddEntranceReferenceTest.kt | 2 +- 8 files changed, 3 insertions(+), 4 deletions(-) rename app/src/main/java/de/westnordost/streetcomplete/data/osmtracks/{Track.kt => Trackpoint.kt} (100%) rename app/src/main/java/de/westnordost/streetcomplete/osm/{LocalizedNames.kt => LocalizedName.kt} (100%) rename app/src/main/java/de/westnordost/streetcomplete/osm/{WaysCrossings.kt => WaysCrossing.kt} (100%) rename app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk_surface/{SidewalkSurface.kt => LeftAndRightSidewalkSurface.kt} (100%) diff --git a/.editorconfig b/.editorconfig index 37e606c1f8..d3b5842e80 100644 --- a/.editorconfig +++ b/.editorconfig @@ -26,7 +26,6 @@ ktlint_standard_blank-line-between-when-conditions = disabled ktlint_standard_block-comment-initial-star-alignment = disabled ktlint_standard_chain-wrapping = disabled ktlint_standard_comment-wrapping = disabled -ktlint_standard_filename = disabled ktlint_standard_function-naming = disabled ktlint_standard_function-signature = disabled ktlint_standard_if-else-wrapping = disabled diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmtracks/Track.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmtracks/Trackpoint.kt similarity index 100% rename from app/src/main/java/de/westnordost/streetcomplete/data/osmtracks/Track.kt rename to app/src/main/java/de/westnordost/streetcomplete/data/osmtracks/Trackpoint.kt diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/LocalizedNames.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/LocalizedName.kt similarity index 100% rename from app/src/main/java/de/westnordost/streetcomplete/osm/LocalizedNames.kt rename to app/src/main/java/de/westnordost/streetcomplete/osm/LocalizedName.kt diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/WaysCrossings.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/WaysCrossing.kt similarity index 100% rename from app/src/main/java/de/westnordost/streetcomplete/osm/WaysCrossings.kt rename to app/src/main/java/de/westnordost/streetcomplete/osm/WaysCrossing.kt diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk_surface/SidewalkSurface.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk_surface/LeftAndRightSidewalkSurface.kt similarity index 100% rename from app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk_surface/SidewalkSurface.kt rename to app/src/main/java/de/westnordost/streetcomplete/osm/sidewalk_surface/LeftAndRightSidewalkSurface.kt diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingKtTest.kt index 4dbc17943a..c1bae2a99c 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingKtTest.kt @@ -3,7 +3,7 @@ package de.westnordost.streetcomplete.osm.street_parking import kotlin.test.Test import kotlin.test.assertEquals -class StreetParkingTest { +class StreetParkingKtTest { @Test fun validOrNullValues() { for (invalidParking in listOf(IncompleteStreetParking, UnknownStreetParking)) { assertEquals( diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance/AddEntranceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance/AddEntranceTest.kt index b7f562f768..21a8a209f0 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance/AddEntranceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance/AddEntranceTest.kt @@ -9,7 +9,7 @@ import de.westnordost.streetcomplete.testutils.way import kotlin.test.Test import kotlin.test.assertEquals -class AddBuildingEntranceTest { +class AddEntranceTest { private val questType = AddEntrance() diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance_reference/AddEntranceReferenceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance_reference/AddEntranceReferenceTest.kt index b3b4abbdf8..f79af52e8f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance_reference/AddEntranceReferenceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/building_entrance_reference/AddEntranceReferenceTest.kt @@ -10,7 +10,7 @@ import de.westnordost.streetcomplete.testutils.way import kotlin.test.Test import kotlin.test.assertEquals -class AddBuildingEntranceReferenceTest { +class AddEntranceReferenceTest { private val questType = AddEntranceReference()