Remove ktlint disable/enable comments from codebase
BUG: 319663977
Change-Id: I29c4afea3d341096d14ac1f87218064b476bf13d
diff --git a/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/ActivityResultLaunchDetectorTest.kt b/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/ActivityResultLaunchDetectorTest.kt
index 2531f7b..410aacb 100644
--- a/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/ActivityResultLaunchDetectorTest.kt
+++ b/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/ActivityResultLaunchDetectorTest.kt
@@ -28,7 +28,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ActivityResultLaunchDetector]. */
@@ -220,4 +219,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/AnnotationRetentionDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/AnnotationRetentionDetectorTest.kt
index 950880f..b9138c3 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/AnnotationRetentionDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/AnnotationRetentionDetectorTest.kt
@@ -48,7 +48,6 @@
javaSample("sample.optin.ExperimentalJavaAnnotationWrongRetention"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/ExperimentalJavaAnnotationWrongRetention.java:28: Error: Experimental annotation has RUNTIME retention, should use default (CLASS) [ExperimentalAnnotationRetention]
@@ -57,7 +56,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -71,7 +69,6 @@
ktSample("sample.optin.ExperimentalKotlinAnnotationWrongRetention"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/ExperimentalKotlinAnnotationWrongRetention.kt:21: Error: Experimental annotation has default (RUNTIME) retention, should use BINARY [ExperimentalAnnotationRetention]
@@ -80,7 +77,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -96,7 +92,6 @@
ktSample("sample.kotlin.ExperimentalKotlinAnnotationWrongAnnotation"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/ExperimentalKotlinAnnotationWrongAnnotation.kt:22: Error: Experimental annotation should use kotlin.RequiresOptIn [WrongRequiresOptIn]
@@ -105,7 +100,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt
index 13aff43..a0e8c7c 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ExperimentalDetectorTest.kt
@@ -50,7 +50,6 @@
javaSample("sample.experimental.UseJavaExperimentalFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/experimental/UseJavaExperimentalFromJava.java:25: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
@@ -127,7 +126,6 @@
+ @ExperimentalLocation
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -156,7 +154,6 @@
lintConfig
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/experimental/UseJavaExperimentalFromJava.java:53: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalLocation or @OptIn(markerClass = sample.experimental.ExperimentalLocation.class) [UnsafeOptInUsageError]
@@ -171,7 +168,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -187,7 +183,6 @@
ktSample("sample.experimental.UseJavaExperimentalFromKt")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/experimental/UseJavaExperimentalFromKt.kt:27: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTime or @OptIn(markerClass = sample.experimental.ExperimentalDateTime.class) [UnsafeOptInUsageError]
@@ -264,7 +259,6 @@
+ @ExperimentalLocation
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -282,7 +276,6 @@
javaSample("sample.experimental.UseKtExperimentalFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/experimental/UseKtExperimentalFromJava.java:25: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.ExperimentalDateTimeKt or @OptIn(markerClass = sample.experimental.ExperimentalDateTimeKt.class) [UnsafeOptInUsageError]
@@ -403,7 +396,6 @@
+ @ExperimentalDateTime
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix).expect(expected)
}
@@ -418,7 +410,6 @@
javaSample("sample.experimental.UseJavaPackageFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/experimental/UseJavaPackageFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
@@ -436,7 +427,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -451,7 +441,6 @@
ktSample("sample.experimental.UseJavaPackageFromKt")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/experimental/UseJavaPackageFromKt.kt:29: Error: This declaration is opt-in and its usage should be marked with @sample.experimental.foo.ExperimentalPackage or @OptIn(markerClass = sample.experimental.foo.ExperimentalPackage.class) [UnsafeOptInUsageError]
@@ -469,7 +458,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -559,7 +547,6 @@
check(*input).expectClean()
}
- /* ktlint-disable max-line-length */
companion object {
/**
* [TestFile] containing Experimental.kt from the experimental annotation library.
@@ -659,5 +646,4 @@
"pys4OgCGehbu7QMAAA=="
)
}
- /* ktlint-enable max-line-length */
}
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt
index c6414b6..865af3a 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/KotlinAnnotationsDetectorTest.kt
@@ -49,7 +49,6 @@
javaSample("sample.kotlin.UseJavaExperimentalMembersFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/UseJavaExperimentalMembersFromJava.java:30: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -76,7 +75,6 @@
7 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -90,7 +88,6 @@
javaSample("sample.kotlin.UseJavaExperimentalClassFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/UseJavaExperimentalClassFromJava.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -120,7 +117,6 @@
8 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -136,7 +132,6 @@
javaSample("sample.kotlin.UseJavaExperimentalMultipleMarkersFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/UseJavaExperimentalMultipleMarkersFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
@@ -151,7 +146,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -170,7 +164,7 @@
)
// TODO(b/210881073): Access to annotated property `field` is still not detected.
- /* ktlint-disable max-line-length */
+
val expected =
"""
src/sample/kotlin/UseKtExperimentalFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
@@ -209,7 +203,6 @@
11 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -224,7 +217,6 @@
javaSample("sample.kotlin.UseJavaPackageFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/UseJavaPackageFromJava.java:32: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -242,7 +234,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -261,13 +252,11 @@
javaSample("sample.kotlin.foo.RegressionTestJava218798815")
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -280,7 +269,6 @@
javaSample("sample.kotlin.RegressionTestJava193110413"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/RegressionTestJava193110413.java:92: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -304,7 +292,6 @@
6 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -317,7 +304,6 @@
javaSample("sample.kotlin.RegressionTestJava192562469"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/RegressionTestJava192562469.java:34: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -344,7 +330,6 @@
7 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -357,7 +342,6 @@
javaSample("sample.kotlin.RegressionTestJava192562926"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/kotlin/RegressionTestJava192562926.java:39: Error: This declaration is opt-in and its usage should be marked with @sample.kotlin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.kotlin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -372,12 +356,10 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
- /* ktlint-disable max-line-length */
companion object {
/**
* [TestFile] containing RequiresOptIn.kt from the experimental annotation library.
@@ -476,5 +458,4 @@
"I6JIyQMAAA=="
)
}
- /* ktlint-enable max-line-length */
}
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt
index 0d98302..7c97b58 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/RequiresOptInDetectorTest.kt
@@ -46,7 +46,6 @@
javaSample("sample.optin.UseJavaExperimentalMembersFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaExperimentalMembersFromJava.java:30: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -73,7 +72,6 @@
7 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -87,7 +85,6 @@
javaSample("sample.optin.UseJavaExperimentalClassFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaExperimentalClassFromJava.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -117,7 +114,6 @@
8 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -133,7 +129,6 @@
javaSample("sample.optin.UseJavaExperimentalMultipleMarkersFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaExperimentalMultipleMarkersFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation2 or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation2.class) [UnsafeOptInUsageError]
@@ -148,7 +143,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -165,7 +159,6 @@
ktSample("sample.optin.UseJavaExperimentalFromKt")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaExperimentalFromKt.kt:26: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -219,7 +212,6 @@
16 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -238,7 +230,7 @@
)
// TODO(b/210881073): Access to annotated property `field` is still not detected.
- /* ktlint-disable max-line-length */
+
val expected =
"""
src/sample/optin/UseKtExperimentalFromJava.java:28: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalKotlinAnnotation or @OptIn(markerClass = sample.optin.ExperimentalKotlinAnnotation.class) [UnsafeOptInUsageError]
@@ -277,7 +269,6 @@
11 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -292,7 +283,6 @@
javaSample("sample.optin.UseJavaPackageFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaPackageFromJava.java:33: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -310,7 +300,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -329,13 +318,11 @@
javaSample("sample.optin.foo.RegressionTestJava218798815")
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -350,7 +337,6 @@
ktSample("sample.optin.UseJavaPackageFromKt")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaPackageFromKt.kt:27: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -368,7 +354,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -381,7 +366,6 @@
javaSample("sample.optin.RegressionTestJava193110413"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/RegressionTestJava193110413.java:92: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -405,7 +389,6 @@
6 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -418,7 +401,6 @@
javaSample("sample.optin.RegressionTestJava192562469"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/RegressionTestJava192562469.java:34: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -445,7 +427,6 @@
7 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -458,7 +439,6 @@
javaSample("sample.optin.RegressionTestJava192562926"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/RegressionTestJava192562926.java:39: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -473,7 +453,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -491,13 +470,11 @@
javaSample("sample.optin.foo.AnnotatedJavaPackage")
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -511,7 +488,6 @@
ktSample("sample.optin.RegressionTestKotlin298322402")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/RegressionTestKotlin298322402.kt:22: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -533,7 +509,6 @@
+ @ExperimentalJavaAnnotation
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix).expect(expected)
}
@@ -547,7 +522,6 @@
javaSample("sample.optin.UseJavaExperimentalWithMessageFromJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/UseJavaExperimentalWithMessageFromJava.java:28: Error: Don't use this API, it's experimental [UnsafeOptInUsageError]
@@ -577,7 +551,6 @@
8 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -594,7 +567,6 @@
javaSample("sample.optin.RegressionTestJava313686921")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/RegressionTestJava313686921.java:31: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -606,7 +578,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -623,7 +594,6 @@
ktSample("sample.optin.RegressionTestKotlin313686921")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/sample/optin/AnnotatedKotlinAnnotation.kt:22: Error: This declaration is opt-in and its usage should be marked with @sample.optin.ExperimentalJavaAnnotation or @OptIn(markerClass = sample.optin.ExperimentalJavaAnnotation.class) [UnsafeOptInUsageError]
@@ -632,12 +602,10 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
- /* ktlint-disable max-line-length */
companion object {
/**
* [TestFile] containing RequiresOptIn.kt from the experimental annotation library.
@@ -758,5 +726,4 @@
"iDUZITwMSkjI4aiMot0Sm3bMZBXgzcoGUs4GhLVALSHgkAcAwvFVfOcDAAA="
)
}
- /* ktlint-enable max-line-length */
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/app/SetActionBarDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/app/SetActionBarDetectorTest.kt
index 1636386..67923ee 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/app/SetActionBarDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/app/SetActionBarDetectorTest.kt
@@ -79,7 +79,7 @@
// We expect the class extending the AppCompatActivity widget to be flagged
// in setActionBar call
- /* ktlint-disable max-line-length */
+
TestLintTask.lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivityClass)
.issues(SetActionBarDetector.USING_CORE_ACTION_BAR)
@@ -93,7 +93,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -122,7 +121,7 @@
// We expect the class extending the AppCompatActivity widget to be flagged
// in setActionBar call
- /* ktlint-disable max-line-length */
+
TestLintTask.lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivityClass)
.issues(SetActionBarDetector.USING_CORE_ACTION_BAR)
@@ -136,6 +135,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UseCompatDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UseCompatDetectorTest.kt
index f51370f..10f69f2 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UseCompatDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UseCompatDetectorTest.kt
@@ -32,7 +32,6 @@
javaSample("com.example.android.appcompat.CoreActivityExt")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/com/example/android/appcompat/AppCompatLintDemo.java:68: Warning: Use SwitchCompat from AppCompat or MaterialSwitch from Material library [UseSwitchCompatOrMaterialCode]
@@ -47,7 +46,6 @@
0 errors, 3 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -56,7 +54,6 @@
fun checkCompatSubstitutionsOnWidget() {
val input = arrayOf(javaSample("com.example.android.appcompat.CustomSwitch"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/com/example/android/appcompat/CustomSwitch.java:27: Warning: Use SwitchCompat from AppCompat or MaterialSwitch from Material library [UseSwitchCompatOrMaterialCode]
@@ -65,7 +62,6 @@
0 errors, 1 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UsingOnClickInXmlDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UsingOnClickInXmlDetectorTest.kt
index 527bc26..dd8b4c1 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UsingOnClickInXmlDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/integ/UsingOnClickInXmlDetectorTest.kt
@@ -31,7 +31,6 @@
xmlSample("layout.view_with_click")
)
- /* ktlint-disable max-line-length */
val expected =
"""
res/layout/view_with_click.xml:26: Warning: Use databinding or explicit wiring of click listener in code [UsingOnClickInXml]
@@ -40,7 +39,6 @@
0 errors, 1 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListAlphaDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListAlphaDetectorTest.kt
index 80b003c..bb01d21 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListAlphaDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListAlphaDetectorTest.kt
@@ -27,7 +27,7 @@
// We expect the definition of the color state list to be flagged since it has
// app:alpha but no android:alpha on one of the entries. We also expect a matching
// fix to add android:alpha attribute with the same value as the existing app:alpha one.
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.COLOR_STATE_LIST)
.issues(ColorStateListAlphaDetector.NOT_USING_ANDROID_ALPHA)
@@ -49,6 +49,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListLoadingDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListLoadingDetectorTest.kt
index b1ba29a..508e06e 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListLoadingDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListLoadingDetectorTest.kt
@@ -116,7 +116,7 @@
// We expect the call to Resources.getColorStateList to be flagged to use ContextCompat
// loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, Stubs.COLOR_STATE_LIST, manifest, customActivity)
.issues(ColorStateListLoadingDetector.NOT_USING_COMPAT_LOADING)
@@ -131,7 +131,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -179,7 +178,7 @@
// We expect the call to Resources.getColorStateList to be flagged to use AppCompatResources
// loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, Stubs.COLOR_STATE_LIST, manifest, customActivity)
.issues(ColorStateListLoadingDetector.NOT_USING_COMPAT_LOADING)
@@ -194,6 +193,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/DrawableLoadingDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/DrawableLoadingDetectorTest.kt
index f951cf9..9b27bae 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/DrawableLoadingDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/DrawableLoadingDetectorTest.kt
@@ -83,7 +83,7 @@
.within("src")
// We expect the call to Context.getDrawable to be flagged to use ContextCompat loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivity)
.issues(DrawableLoadingDetector.NOT_USING_COMPAT_LOADING)
@@ -97,7 +97,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -123,7 +122,7 @@
.within("src")
// We expect the call to Resources.getDrawable to be flagged to use ResourcesCompat loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivity)
.issues(DrawableLoadingDetector.NOT_USING_COMPAT_LOADING)
@@ -137,7 +136,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -163,7 +161,7 @@
.within("src")
// We expect the call to Resources.getDrawable to be flagged to use ResourcesCompat loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivity)
.issues(DrawableLoadingDetector.NOT_USING_COMPAT_LOADING)
@@ -177,6 +175,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/view/OnClickXmlDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/view/OnClickXmlDetectorTest.kt
index b23a48b..a99d675 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/view/OnClickXmlDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/view/OnClickXmlDetectorTest.kt
@@ -123,7 +123,7 @@
)
// We expect the android:onClick to be flagged on pre-24 min SDK
- /* ktlint-disable max-line-length */
+
lint()
.files(
Stubs.APPCOMPAT_ACTIVITY,
@@ -144,7 +144,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageCodeDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageCodeDetectorTest.kt
index 8e22e4a..bbbb259 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageCodeDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageCodeDetectorTest.kt
@@ -42,7 +42,7 @@
.within("src")
// We expect the class extending the core Switch widget to be flagged
- /* ktlint-disable max-line-length */
+
TestLintTask.lint()
.files(customSwitchClass)
.issues(SwitchUsageCodeDetector.USING_CORE_SWITCH_CODE)
@@ -56,7 +56,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -83,7 +82,7 @@
.within("src")
// We expect the class instantiating the core Switch widget to be flagged
- /* ktlint-disable max-line-length */
+
TestLintTask.lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customSwitchClass)
.issues(SwitchUsageCodeDetector.USING_CORE_SWITCH_CODE)
@@ -97,6 +96,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageXmlDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageXmlDetectorTest.kt
index b3b59db..b5fe660 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageXmlDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageXmlDetectorTest.kt
@@ -72,7 +72,7 @@
.within("res")
// We expect the definition of the core Switch to be flagged
- /* ktlint-disable max-line-length */
+
TestLintTask.lint()
.files(layout)
.issues(SwitchUsageXmlDetector.USING_CORE_SWITCH_XML)
@@ -86,6 +86,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesApiDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesApiDetectorTest.kt
index 9cc6a7f..4156d78 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesApiDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesApiDetectorTest.kt
@@ -49,7 +49,7 @@
// We expect the call to TextView.setCompoundDrawableTintList to be flagged to use
// TextViewCompat loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivity)
.issues(TextViewCompoundDrawablesApiDetector.NOT_USING_COMPAT_TEXT_VIEW_DRAWABLE_APIS)
@@ -63,7 +63,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -92,7 +91,7 @@
// We expect the call to TextView.setCompoundDrawableTintMode to be flagged to use
// TextViewCompat loading
- /* ktlint-disable max-line-length */
+
lint()
.files(Stubs.APPCOMPAT_ACTIVITY, customActivity)
.issues(TextViewCompoundDrawablesApiDetector.NOT_USING_COMPAT_TEXT_VIEW_DRAWABLE_APIS)
@@ -106,6 +105,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesXmlDetectorTest.kt b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesXmlDetectorTest.kt
index 41d92b1..0a9ab62 100644
--- a/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesXmlDetectorTest.kt
+++ b/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesXmlDetectorTest.kt
@@ -98,7 +98,7 @@
// We expect the definition of the text view to be flagged since it is using
// android: namespaced compound drawables attributes. We also expect a matching
// fix to replace the matching attributes to the app: namespace, retaining the same values
- /* ktlint-disable max-line-length */
+
lint()
.files(layout)
.issues(TextViewCompoundDrawablesXmlDetector.NOT_USING_COMPAT_TEXT_VIEW_DRAWABLE_ATTRS)
@@ -123,7 +123,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt b/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt
index b90be6c..75b748a 100644
--- a/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/MavenUploadHelperTest.kt
@@ -34,8 +34,6 @@
fun insertDefaultMultiplatformDependenciesTest() {
val pom = XmlProviderImpl(POM_COLLECTION)
- /* ktlint-disable max-line-length */
-
// Expect that collection-jvm has been inserted in <dependencies>.
val expected = """<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -84,7 +82,6 @@
</dependencies>
</project>
"""
- /* ktlint-enable max-line-length */
insertDefaultMultiplatformDependencies(pom, "jvm")
@@ -96,8 +93,6 @@
fun insertDefaultMultiplatformDependenciesNoDepsTest() {
val pom = XmlProviderImpl(POM_COMPOSE_UI_GEOMETRY)
- /* ktlint-disable max-line-length */
-
// Expect that collection-jvm has been inserted in <dependencies>.
val expected = """<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -142,7 +137,6 @@
</dependencies>
</project>
"""
- /* ktlint-enable max-line-length */
insertDefaultMultiplatformDependencies(pom, "android")
@@ -158,7 +152,7 @@
"androidx.lifecycle:lifecycle-runtime"
)
- /* ktlint-disable max-line-length */
+
// Expect that elements in <dependencies> are sorted alphabetically.
val expected = """<?xml version="1.0"?>
@@ -261,7 +255,6 @@
</dependencies>
</project>
"""
- /* ktlint-enable max-line-length */
assignAarDependencyTypes(pom, androidLibrariesSet)
@@ -271,7 +264,6 @@
@Test
fun testEnsureConsistentJvmSuffix() {
- /* ktlint-disable max-line-length */
val pom = """<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -308,7 +300,6 @@
</dependencies>
</project>
"""
- /* ktlint-enable max-line-length */
val xmlProvider = XmlProviderImpl(pom)
ensureConsistentJvmSuffix(xmlProvider)
@@ -319,7 +310,6 @@
@Test
fun testAssignSingleVersionDependenciesInGroupForPom() {
- /* ktlint-disable max-line-length */
val pom = """<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -368,7 +358,6 @@
</dependencies>
</project>
"""
- /* ktlint-enable max-line-length */
val xmlProvider = XmlProviderImpl(pom)
val mavenGroup = LibraryGroup("androidx.example", Version("1.0.0"))
@@ -382,8 +371,6 @@
fun testSortPomDependencies() {
val pom = POM_COLLECTION_JVM
- /* ktlint-disable max-line-length */
-
// Expect that elements in <dependencies> are sorted alphabetically.
val expected = """<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -440,7 +427,6 @@
</dependency>
</dependencies>
</project>"""
- /* ktlint-enable max-line-length */
val actual = sortPomDependencies(pom)
assertEquals(expected, actual)
@@ -448,7 +434,6 @@
@Test
fun testSortGradleMetadataDependencies() {
- /* ktlint-disable max-line-length */
val metadata = """
{
"formatVersion": "1.1",
@@ -665,7 +650,6 @@
]
}
""".trimIndent()
- /* ktlint-enable max-line-length */
val actual = sortGradleMetadataDependencies(metadata)
assertEquals(expected, actual)
@@ -673,7 +657,6 @@
@Test
fun testSortGradleMetadataDependenciesWithConstraints() {
- /* ktlint-disable max-line-length */
val metadata = """
{
"formatVersion": "1.1",
@@ -1024,7 +1007,6 @@
]
}
""".trimIndent()
- /* ktlint-enable max-line-length */
val actual = sortGradleMetadataDependencies(metadata)
assertEquals(expected, actual)
@@ -1032,7 +1014,6 @@
@Test
fun testVerifyGradleMetadata() {
- /* ktlint-disable max-line-length */
val metadata = """
{
"formatVersion": "1.1",
diff --git a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/BuildPropParserTest.kt b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/BuildPropParserTest.kt
index d5aa82c..6d22d7d 100644
--- a/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/BuildPropParserTest.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/dependencyTracker/BuildPropParserTest.kt
@@ -42,7 +42,6 @@
platform/prebuilts/androidx/external 28219bd26d4ef59e133a85189404db8e73ec0f70
platform/prebuilts/androidx/internal dbbb264e785643cb8089c3a5ed7f8b25c4207738
platform/prebuilts/checkstyle c52010acac9b638f45f66747762cc0ad187c1e39
- platform/prebuilts/ktlint 9a3378cb74a0ab30433181a60371673cb6eb5643
platform/tools/external/gradle 29b86bd23797fe0873ffe18f12907cd5eea5d427
platform/tools/repohooks bbc97c1419402c3d0297189c2d34228cbb60c2e6
""".trimIndent(),
diff --git a/buildSrc-tests/src/test/java/androidx/build/testutils/PomTestData.kt b/buildSrc-tests/src/test/java/androidx/build/testutils/PomTestData.kt
index 86055bb..7756abc 100644
--- a/buildSrc-tests/src/test/java/androidx/build/testutils/PomTestData.kt
+++ b/buildSrc-tests/src/test/java/androidx/build/testutils/PomTestData.kt
@@ -16,7 +16,7 @@
package androidx.build.testutils
-/* ktlint-disable max-line-length */
+
/**
* POM for androidx.collection:collection:1.3.0-alpha04, which is a KMP library anchor artifact.
@@ -260,4 +260,4 @@
</dependencies>
</project>
"""
-/* ktlint-enable max-line-length */
+
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/SettingsParser.kt b/buildSrc/private/src/main/kotlin/androidx/build/SettingsParser.kt
index 23a04db..ce1bd19 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/SettingsParser.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/SettingsParser.kt
@@ -30,7 +30,6 @@
* Match lines that start with includeProject, followed by a require argument for project gradle
* path and an optional argument for project file path.
*/
- /* ktlint-disable max-line-length */
private val includeProjectPattern =
Regex(
"""^[\n\r\s]*includeProject\("(?<name>[a-z0-9-:]*)"(,[\n\r\s]*"(?<path>[a-z0-9-/]+))?.*\).*$""",
diff --git a/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassList.kt b/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassList.kt
index 2aef004..c2894f7 100644
--- a/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassList.kt
+++ b/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassList.kt
@@ -15,9 +15,6 @@
*/
@file:Suppress("NOTHING_TO_INLINE", "RedundantVisibilityModifier", "UnusedImport")
-/* ktlint-disable max-line-length */
-/* ktlint-disable import-ordering */
-
package androidx.collection.template
import androidx.collection.LongList
diff --git a/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassSet.kt b/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassSet.kt
index 7803496..db66ff5 100644
--- a/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassSet.kt
+++ b/collection/collection/src/commonTest/kotlin/androidx/collection/template/TestValueClassSet.kt
@@ -27,9 +27,6 @@
package androidx.collection.template
-/* ktlint-disable max-line-length */
-/* ktlint-disable import-ordering */
-
import androidx.collection.LongSet
import androidx.collection.MutableLongSet
import androidx.collection.TestValueClass
@@ -39,7 +36,6 @@
import kotlin.contracts.contract
import kotlin.jvm.JvmInline
-/* ktlint-disable max-line-length */
// To use this template, you must substitute several strings. You can copy this and search/replace
// or use a sed command. These properties must be changed:
// * androidx.collection.template - target package (e.g. androidx.compose.ui.ui.collection)
diff --git a/collection/collection/template/ValueClassList.kt.template b/collection/collection/template/ValueClassList.kt.template
index 3da978b..083abd8 100644
--- a/collection/collection/template/ValueClassList.kt.template
+++ b/collection/collection/template/ValueClassList.kt.template
@@ -23,9 +23,6 @@
"PrivatePropertyName",
"NOTHING_TO_INLINE",
"UnusedImport",
- "ktlint:standard:import-ordering",
- "ktlint:standard:max-line-length",
- "ktlint:standard:no-unused-imports",
)
package PACKAGE
diff --git a/collection/collection/template/ValueClassSet.kt.template b/collection/collection/template/ValueClassSet.kt.template
index 8cfdf3c..2c2679b 100644
--- a/collection/collection/template/ValueClassSet.kt.template
+++ b/collection/collection/template/ValueClassSet.kt.template
@@ -23,9 +23,6 @@
"PrivatePropertyName",
"NOTHING_TO_INLINE",
"UnusedImport",
- "ktlint:standard:import-ordering",
- "ktlint:standard:max-line-length",
- "ktlint:standard:no-unused-imports",
)
package PACKAGE
diff --git a/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/TransitionDetectorTest.kt b/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/TransitionDetectorTest.kt
index 1c044dd..028ed0f 100644
--- a/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/TransitionDetectorTest.kt
+++ b/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/TransitionDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [TransitionDetector]. */
@@ -322,4 +321,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/UnrememberedAnimatableDetectorTest.kt b/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/UnrememberedAnimatableDetectorTest.kt
index 715608e..9e07e2d 100644
--- a/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/UnrememberedAnimatableDetectorTest.kt
+++ b/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/UnrememberedAnimatableDetectorTest.kt
@@ -28,7 +28,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [UnrememberedAnimatableDetector]. */
@@ -463,4 +462,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Expect.kt b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Expect.kt
index 41ea1da..37b6df6 100644
--- a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Expect.kt
+++ b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Expect.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/animation/animation-core/src/jvmMain/kotlin/androidx/compose/animation/core/ActualJvm.jvm.kt b/compose/animation/animation-core/src/jvmMain/kotlin/androidx/compose/animation/core/ActualJvm.jvm.kt
index 9b55670..2b23d99 100644
--- a/compose/animation/animation-core/src/jvmMain/kotlin/androidx/compose/animation/core/ActualJvm.jvm.kt
+++ b/compose/animation/animation-core/src/jvmMain/kotlin/androidx/compose/animation/core/ActualJvm.jvm.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/AnimatedImageVector.kt b/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/AnimatedImageVector.kt
index 4556658..f16f4b2 100644
--- a/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/AnimatedImageVector.kt
+++ b/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/AnimatedImageVector.kt
@@ -47,7 +47,7 @@
targets.fastMaxBy { it.animator.totalDuration }?.animator?.totalDuration ?: 0
/** Provide an empty companion object to hang platform-specific companion extensions onto. */
- companion object {} // ktlint-disable no-empty-class-body
+ companion object {}
}
/** Definition of animation to one of the elements in a [AnimatedImageVector]. */
diff --git a/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/AnimatedContentDetectorTest.kt b/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/AnimatedContentDetectorTest.kt
index e84a340..ce60080 100644
--- a/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/AnimatedContentDetectorTest.kt
+++ b/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/AnimatedContentDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [AnimatedContentDetector]. */
@@ -495,4 +494,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/CrossfadeDetectorTest.kt b/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/CrossfadeDetectorTest.kt
index acb3ff3..efd23c0 100644
--- a/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/CrossfadeDetectorTest.kt
+++ b/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/CrossfadeDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [CrossfadeDetector]. */
@@ -250,4 +249,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt
index 0f85250..85264af 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt
@@ -23,9 +23,6 @@
"PrivatePropertyName",
"NOTHING_TO_INLINE",
"UnusedImport",
- "ktlint:standard:import-ordering",
- "ktlint:standard:max-line-length",
- "ktlint:standard:no-unused-imports",
)
package androidx.compose.foundation.demos.collection
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt
index 978d6cb..20479137 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt
@@ -23,9 +23,6 @@
"PrivatePropertyName",
"NOTHING_TO_INLINE",
"UnusedImport",
- "ktlint:standard:import-ordering",
- "ktlint:standard:max-line-length",
- "ktlint:standard:no-unused-imports",
)
package androidx.compose.foundation.demos.collection
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Expect.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Expect.kt
index cfc48c7..b38525d 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Expect.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Expect.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/foundation/foundation/src/jvmMain/kotlin/androidx/compose/foundation/ActualJvm.jvm.kt b/compose/foundation/foundation/src/jvmMain/kotlin/androidx/compose/foundation/ActualJvm.jvm.kt
index 9da6d9e..1aa085d 100644
--- a/compose/foundation/foundation/src/jvmMain/kotlin/androidx/compose/foundation/ActualJvm.jvm.kt
+++ b/compose/foundation/foundation/src/jvmMain/kotlin/androidx/compose/foundation/ActualJvm.jvm.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/AsCollectionDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/AsCollectionDetectorTest.kt
index 5ceb29d..d0ae2bc 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/AsCollectionDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/AsCollectionDetectorTest.kt
@@ -23,7 +23,6 @@
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
-/* ktlint-disable max-line-length */
@RunWith(Parameterized::class)
class AsCollectionDetectorTest(val types: CollectionType) : LintDetectorTest() {
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/CommonModuleIncompatibilityDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/CommonModuleIncompatibilityDetectorTest.kt
index 3e5016f..62634bb 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/CommonModuleIncompatibilityDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/CommonModuleIncompatibilityDetectorTest.kt
@@ -25,7 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class CommonModuleIncompatibilityDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = CommonModuleIncompatibilityDetector()
@@ -345,4 +344,3 @@
lint().files(jvmFile, androidFile, file).run().expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/LambdaStructuralEqualityDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/LambdaStructuralEqualityDetectorTest.kt
index 589ca06..3afd8ee 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/LambdaStructuralEqualityDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/LambdaStructuralEqualityDetectorTest.kt
@@ -25,7 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class LambdaStructuralEqualityDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = LambdaStructuralEqualityDetector()
@@ -108,4 +107,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/ListIteratorDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/ListIteratorDetectorTest.kt
index f84371c..a3252c3 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/ListIteratorDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/ListIteratorDetectorTest.kt
@@ -25,7 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class ListIteratorDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = ListIteratorDetector()
@@ -205,4 +204,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/PrimitiveInCollectionDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/PrimitiveInCollectionDetectorTest.kt
index 797c33d..2c04bed 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/PrimitiveInCollectionDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/PrimitiveInCollectionDetectorTest.kt
@@ -24,7 +24,6 @@
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
-/* ktlint-disable max-line-length */
@RunWith(Parameterized::class)
class PrimitiveInCollectionDetectorTest(parameters: Parameters) : LintDetectorTest() {
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/SteppedForLoopDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/SteppedForLoopDetectorTest.kt
index 54695ae..667f861 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/SteppedForLoopDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/SteppedForLoopDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class SteppedForLoopDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = SteppedForLoopDetector()
@@ -269,4 +268,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/UnnecessaryLambdaCreationDetectorTest.kt b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/UnnecessaryLambdaCreationDetectorTest.kt
index 522cfe8..94c13ce 100644
--- a/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/UnnecessaryLambdaCreationDetectorTest.kt
+++ b/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/UnnecessaryLambdaCreationDetectorTest.kt
@@ -31,7 +31,6 @@
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
-/* ktlint-disable max-line-length */
@RunWith(Parameterized::class)
class UnnecessaryLambdaCreationDetectorTest(
@Suppress("unused") private val parameterizedDebugString: String,
@@ -425,4 +424,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ColorsDetectorTest.kt b/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ColorsDetectorTest.kt
index 4f41366..833a2e7 100644
--- a/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ColorsDetectorTest.kt
+++ b/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ColorsDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/**
@@ -801,4 +800,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ScaffoldPaddingDetectorTest.kt b/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ScaffoldPaddingDetectorTest.kt
index 3d48295..78c3d6d 100644
--- a/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ScaffoldPaddingDetectorTest.kt
+++ b/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ScaffoldPaddingDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ScaffoldPaddingDetector]. */
@@ -273,4 +272,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/material/material-ripple/src/desktopMain/kotlin/androidx/compose/material/ripple/Ripple.desktop.kt b/compose/material/material-ripple/src/desktopMain/kotlin/androidx/compose/material/ripple/Ripple.desktop.kt
index c13d208..9f8b307 100644
--- a/compose/material/material-ripple/src/desktopMain/kotlin/androidx/compose/material/ripple/Ripple.desktop.kt
+++ b/compose/material/material-ripple/src/desktopMain/kotlin/androidx/compose/material/ripple/Ripple.desktop.kt
@@ -1,4 +1,3 @@
-// ktlint-disable filename
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/material/material/src/jvmMain/kotlin/androidx/compose/material/ActualJvm.jvm.kt b/compose/material/material/src/jvmMain/kotlin/androidx/compose/material/ActualJvm.jvm.kt
index 791a833..a8750c8 100644
--- a/compose/material/material/src/jvmMain/kotlin/androidx/compose/material/ActualJvm.jvm.kt
+++ b/compose/material/material/src/jvmMain/kotlin/androidx/compose/material/ActualJvm.jvm.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2023 The Android Open Source Project
*
diff --git a/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/MaterialImportDetectorTest.kt b/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/MaterialImportDetectorTest.kt
index 7b6a865..dcbb62d 100644
--- a/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/MaterialImportDetectorTest.kt
+++ b/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/MaterialImportDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [MaterialImportDetector]. */
@@ -295,4 +294,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/ScaffoldPaddingDetectorTest.kt b/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/ScaffoldPaddingDetectorTest.kt
index e356389..723228a 100644
--- a/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/ScaffoldPaddingDetectorTest.kt
+++ b/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/ScaffoldPaddingDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ScaffoldPaddingDetector]. */
@@ -273,4 +272,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/material3/material3/src/jvmMain/kotlin/androidx/compose/material3/CalendarLocale.jvm.kt b/compose/material3/material3/src/jvmMain/kotlin/androidx/compose/material3/CalendarLocale.jvm.kt
index e40ab63..b7789d2 100644
--- a/compose/material3/material3/src/jvmMain/kotlin/androidx/compose/material3/CalendarLocale.jvm.kt
+++ b/compose/material3/material3/src/jvmMain/kotlin/androidx/compose/material3/CalendarLocale.jvm.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2023 The Android Open Source Project
*
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateCreationDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateCreationDetectorTest.kt
index 489c515..cc17a98 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateCreationDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateCreationDetectorTest.kt
@@ -25,7 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
-/* ktlint-disable max-line-length */
@RunWith(Parameterized::class)
class AutoboxingStateCreationDetectorTest(typeUnderTest: TypeUnderTest) : LintDetectorTest() {
@@ -602,4 +601,3 @@
override fun toString() = "type = $fqName"
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateValuePropertyDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateValuePropertyDetectorTest.kt
index 572baed2..9ca218e 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateValuePropertyDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateValuePropertyDetectorTest.kt
@@ -25,7 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class AutoboxingStateValuePropertyDetectorTest : LintDetectorTest() {
@@ -308,4 +307,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableCoroutineCreationDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableCoroutineCreationDetectorTest.kt
index dc5a1e8..d427d41 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableCoroutineCreationDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableCoroutineCreationDetectorTest.kt
@@ -29,7 +29,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ComposableCoroutineCreationDetector]. */
@@ -454,4 +453,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableFlowOperatorDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableFlowOperatorDetectorTest.kt
index 28e74cd..7d55bf9 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableFlowOperatorDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableFlowOperatorDetectorTest.kt
@@ -29,7 +29,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ComposableFlowOperatorDetector]. */
@@ -340,4 +339,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt
index 5bb8509..aa04241 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ComposableLambdaParameterDetector]. */
@@ -334,4 +333,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableNamingDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableNamingDetectorTest.kt
index c4707ca..47251cd 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableNamingDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableNamingDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ComposableNamingDetector]. */
@@ -230,4 +229,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableStateFlowValueDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableStateFlowValueDetectorTest.kt
index abca27e4..61ef950 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableStateFlowValueDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableStateFlowValueDetectorTest.kt
@@ -29,7 +29,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ComposableStateFlowValueDetector]. */
@@ -285,4 +284,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/CompositionLocalNamingDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/CompositionLocalNamingDetectorTest.kt
index c08db15..233445e 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/CompositionLocalNamingDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/CompositionLocalNamingDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [CompositionLocalNamingDetector]. */
@@ -236,4 +235,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/MutableCollectionMutableStateDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/MutableCollectionMutableStateDetectorTest.kt
index e77e697..486b144 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/MutableCollectionMutableStateDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/MutableCollectionMutableStateDetectorTest.kt
@@ -28,7 +28,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [MutableCollectionMutableStateDetector]. */
@@ -1591,4 +1590,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/OpaqueUnitKeyDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/OpaqueUnitKeyDetectorTest.kt
index 74d6264..17939fa 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/OpaqueUnitKeyDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/OpaqueUnitKeyDetectorTest.kt
@@ -23,7 +23,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class OpaqueUnitKeyDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = OpaqueUnitKeyDetector()
@@ -1741,4 +1740,3 @@
// endregion key() test cases
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ProduceStateDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ProduceStateDetectorTest.kt
index 39730e1..afb41b5 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ProduceStateDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ProduceStateDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ProduceStateDetector]. */
@@ -145,4 +144,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberDetectorTest.kt
index 92205a2..a9fad04 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [RememberDetector]. */
@@ -436,4 +435,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt
index ae21bae..ff0bac4 100644
--- a/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt
+++ b/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [UnrememberedStateDetector]. */
@@ -526,4 +525,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime-saveable-lint/src/test/java/androidx/compose/runtime/saveable/lint/RememberSaveableDetectorTest.kt b/compose/runtime/runtime-saveable-lint/src/test/java/androidx/compose/runtime/saveable/lint/RememberSaveableDetectorTest.kt
index ce4608e..3218130 100644
--- a/compose/runtime/runtime-saveable-lint/src/test/java/androidx/compose/runtime/saveable/lint/RememberSaveableDetectorTest.kt
+++ b/compose/runtime/runtime-saveable-lint/src/test/java/androidx/compose/runtime/saveable/lint/RememberSaveableDetectorTest.kt
@@ -28,7 +28,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [RememberSaveableDetector]. */
class RememberSaveableDetectorTest : LintDetectorTest() {
@@ -286,4 +285,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/internal/ComposableLambda.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/internal/ComposableLambda.kt
index db1f9b5..537335b 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/internal/ComposableLambda.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/internal/ComposableLambda.kt
@@ -50,8 +50,6 @@
*/
@Suppress("NAME_SHADOWING", "UNCHECKED_CAST")
@Stable
-/* ktlint-disable parameter-list-wrapping */
-// TODO(https://github.com/pinterest/ktlint/issues/921): reenable
internal class ComposableLambdaImpl(val key: Int, private val tracked: Boolean, block: Any?) :
ComposableLambda {
private var _block: Any? = block
diff --git a/compose/ui/ui-graphics-lint/src/test/java/androidx/compose/ui/graphics/lint/ColorDetectorTest.kt b/compose/ui/ui-graphics-lint/src/test/java/androidx/compose/ui/graphics/lint/ColorDetectorTest.kt
index 22a0e3e..1848912 100644
--- a/compose/ui/ui-graphics-lint/src/test/java/androidx/compose/ui/graphics/lint/ColorDetectorTest.kt
+++ b/compose/ui/ui-graphics-lint/src/test/java/androidx/compose/ui/graphics/lint/ColorDetectorTest.kt
@@ -26,8 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
-
/** Test for [ColorDetector]. */
@RunWith(JUnit4::class)
class ColorDetectorTest : LintDetectorTest() {
@@ -180,4 +178,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathSvgTest.kt b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathSvgTest.kt
index 075eb2c..04faf0b 100644
--- a/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathSvgTest.kt
+++ b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathSvgTest.kt
@@ -26,7 +26,6 @@
import kotlin.test.assertTrue
import org.junit.runner.RunWith
-/* ktlint-disable max-line-length */
@RunWith(AndroidJUnit4::class)
@SmallTest
class PathSvgTest {
@@ -194,8 +193,6 @@
}
}
-/* ktlint-enable max-line-length */
-
private fun assertPathEquals(a: Path, b: Path) {
val ita = a.iterator()
val itb = b.iterator()
diff --git a/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTestUtilities.kt b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTestUtilities.kt
index 50fa1bb..9ea5f44 100644
--- a/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTestUtilities.kt
+++ b/compose/ui/ui-graphics/src/androidInstrumentedTest/kotlin/androidx/compose/ui/graphics/PathTestUtilities.kt
@@ -39,7 +39,6 @@
fillType = PathFillType.EvenOdd
}
-/* ktlint-disable max-line-length */
internal enum class SvgShape(val pathData: String) {
Cubics(
"M958.729,822.904L958.729,1086.67C958.729,1159.45 899.635,1218.55 826.848,1218.55L563.086,1218.55L355.844,1444.63L450.045,1218.55L337.004,1218.55C264.217,1218.55 205.123,1159.45 205.123,1086.67L205.123,822.904C205.123,750.117 264.217,691.023 337.004,691.023L826.848,691.023C899.635,691.023 958.729,750.117 958.729,822.904ZM581.925,850.888C544.745,781.585 470.384,781.585 433.204,816.236C396.023,850.888 396.023,920.191 433.204,989.493C459.23,1041.47 526.155,1093.45 581.925,1128.1C637.696,1093.45 704.621,1041.47 730.647,989.493C767.829,920.191 767.829,850.888 730.647,816.236C693.467,781.585 619.106,781.585 581.925,850.888Z"
@@ -58,8 +57,6 @@
),
}
-/* ktlint-enable max-line-length */
-
private fun valueCountForType(type: PathSegment.Type) =
when (type) {
PathSegment.Type.Move -> 2
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ImageBitmap.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ImageBitmap.kt
index 02e863c..8db3c94 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ImageBitmap.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ImageBitmap.kt
@@ -90,7 +90,7 @@
fun prepareToDraw()
/** Provide an empty companion object to hang platform-specific companion extensions onto. */
- companion object {} // ktlint-disable no-empty-class-body
+ companion object {}
}
/**
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ComposedModifierDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ComposedModifierDetectorTest.kt
index 22c0708..fd4480c 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ComposedModifierDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ComposedModifierDetectorTest.kt
@@ -27,8 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
-
/** Test for [ComposedModifierDetector]. */
@RunWith(JUnit4::class)
class ComposedModifierDetectorTest : LintDetectorTest() {
@@ -166,4 +164,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt
index dc79e40..4bc329d 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt
@@ -27,8 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
-
/** Test for [ModifierDeclarationDetector]. */
@RunWith(JUnit4::class)
class ModifierDeclarationDetectorTest : LintDetectorTest() {
@@ -964,4 +962,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierNodeInspectablePropertiesDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierNodeInspectablePropertiesDetectorTest.kt
index d1af119..228a6df 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierNodeInspectablePropertiesDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierNodeInspectablePropertiesDetectorTest.kt
@@ -21,7 +21,6 @@
import com.android.tools.lint.detector.api.Issue
import org.junit.Test
-/* ktlint-disable max-line-length */
class ModifierNodeInspectablePropertiesDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = ModifierNodeInspectablePropertiesDetector()
@@ -259,4 +258,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt
index 48200d4..53b62d1 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt
@@ -26,8 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
-
/** Test for [ModifierParameterDetector]. */
@RunWith(JUnit4::class)
class ModifierParameterDetectorTest : LintDetectorTest() {
@@ -348,4 +346,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousCompositionLocalModifierReadDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousCompositionLocalModifierReadDetectorTest.kt
index 3c4c994..f4c3192 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousCompositionLocalModifierReadDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousCompositionLocalModifierReadDetectorTest.kt
@@ -24,7 +24,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class SuspiciousCompositionLocalModifierReadDetectorTest : LintDetectorTest() {
@@ -328,4 +327,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousModifierThenDetectorTest.kt b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousModifierThenDetectorTest.kt
index 98730fd..819c95c 100644
--- a/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousModifierThenDetectorTest.kt
+++ b/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousModifierThenDetectorTest.kt
@@ -26,8 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
-
/** Test for [SuspiciousModifierThenDetector]. */
@RunWith(JUnit4::class)
class SuspiciousModifierThenDetectorTest : LintDetectorTest() {
@@ -120,4 +118,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/Mouse.android.kt b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/Mouse.android.kt
index c18b6c5..08bfc54 100644
--- a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/Mouse.android.kt
+++ b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/Mouse.android.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/ui/ui-test/src/desktopMain/kotlin/androidx/compose/ui/test/Mouse.desktop.kt b/compose/ui/ui-test/src/desktopMain/kotlin/androidx/compose/ui/test/Mouse.desktop.kt
index 40a8298..0f7a0e6 100644
--- a/compose/ui/ui-test/src/desktopMain/kotlin/androidx/compose/ui/test/Mouse.desktop.kt
+++ b/compose/ui/ui-test/src/desktopMain/kotlin/androidx/compose/ui/test/Mouse.desktop.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AtomicReference.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AtomicReference.kt
index e2c2f80..3708e22 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AtomicReference.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AtomicReference.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/ui/ui-text/src/jvmMain/kotlin/androidx/compose/ui/text/ActualAtomicReferenceJvm.jvm.kt b/compose/ui/ui-text/src/jvmMain/kotlin/androidx/compose/ui/text/ActualAtomicReferenceJvm.jvm.kt
index 8fcb04f..1ccedd7 100644
--- a/compose/ui/ui-text/src/jvmMain/kotlin/androidx/compose/ui/text/ActualAtomicReferenceJvm.jvm.kt
+++ b/compose/ui/ui-text/src/jvmMain/kotlin/androidx/compose/ui/text/ActualAtomicReferenceJvm.jvm.kt
@@ -1,5 +1,3 @@
-// ktlint-disable filename
-
/*
* Copyright 2021 The Android Open Source Project
*
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsSort.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsSort.kt
index 94e0a61..f2618fe 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsSort.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/semantics/SemanticsSort.kt
@@ -1,5 +1,3 @@
-@file:Suppress("ktlint")
-
/*
* Copyright 2023 The Android Open Source Project
*
diff --git a/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/node/JvmTreeSet.jvm.kt b/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/node/JvmTreeSet.jvm.kt
index c0cd263..610b246 100644
--- a/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/node/JvmTreeSet.jvm.kt
+++ b/compose/ui/ui/src/jvmMain/kotlin/androidx/compose/ui/node/JvmTreeSet.jvm.kt
@@ -1,4 +1,3 @@
-// ktlint-disable filename
/*
* Copyright 2020 The Android Open Source Project
*
diff --git a/development/lintBaselineToCsv.main.kts b/development/lintBaselineToCsv.main.kts
index 7194786..c6d859c 100755
--- a/development/lintBaselineToCsv.main.kts
+++ b/development/lintBaselineToCsv.main.kts
@@ -198,11 +198,9 @@
@Test
fun `Baseline with one issue parses contents correctly`() {
- /* ktlint-disable max-line-length */
var lintBaselineText = """
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.2.0-beta06" client="gradle" variant="debug" version="4.2.0-beta06">
-
<issue
id="ClassVerificationFailure"
message="This call references a method added in API level 19; however, the containing class androidx.print.PrintHelper is reachable from earlier API levels and will fail run-time class verification."
@@ -215,7 +213,6 @@
</issue>
</issues>
""".trimIndent()
- /* ktlint-enable max-line-length */
var listIssues = LintBaselineParser.parse(lintBaselineText)
assertEquals(1, listIssues.size)
@@ -239,14 +236,12 @@
@Test
fun `Empty baseline has no issues`() {
- /* ktlint-disable max-line-length */
var lintBaselineText = """
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.2.0-beta06" client="gradle" version="4.2.0-beta06">
</issues>
""".trimIndent()
- /* ktlint-enable max-line-length */
var listIssues = LintBaselineParser.parse(lintBaselineText)
assertEquals(1, listIssues.size)
diff --git a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentLiveDataObserveDetectorTest.kt b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentLiveDataObserveDetectorTest.kt
index 0157a39..be6141f 100644
--- a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentLiveDataObserveDetectorTest.kt
+++ b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentLiveDataObserveDetectorTest.kt
@@ -117,7 +117,6 @@
"""
)
)
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/TestFragment.java:12: Error: Use getViewLifecycleOwner() as the LifecycleOwner. [FragmentLiveDataObserve]
@@ -126,7 +125,6 @@
1 errors, 0 warnings
"""
)
- /* ktlint-enable max-line-length */
.checkFix(
null,
java(
@@ -193,7 +191,6 @@
"""
)
)
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/TestFragment.kt:11: Error: Use viewLifecycleOwner as the LifecycleOwner. [FragmentLiveDataObserve]
@@ -202,7 +199,6 @@
1 errors, 0 warnings
"""
)
- /* ktlint-enable max-line-length */
.checkFix(
null,
kotlin(
@@ -271,7 +267,6 @@
"""
)
)
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/TestFragment.kt:15: Error: Use viewLifecycleOwner as the LifecycleOwner. [FragmentLiveDataObserve]
@@ -280,7 +275,6 @@
1 errors, 0 warnings
"""
)
- /* ktlint-enable max-line-length */
.checkFix(
null,
kotlin(
@@ -346,7 +340,6 @@
"""
)
)
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/test/Foo.kt:10: Error: Unsafe call to observe with Fragment instance as LifecycleOwner from TestFragment.onCreateView. [FragmentLiveDataObserve]
@@ -355,7 +348,6 @@
1 errors, 0 warnings
"""
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -405,7 +397,6 @@
"""
)
)
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/test/Foo.kt:17: Error: Unsafe call to observe with Fragment instance as LifecycleOwner from TestFragment.onCreateView. [FragmentLiveDataObserve]
@@ -414,7 +405,6 @@
1 errors, 0 warnings
"""
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -439,7 +429,6 @@
"""
)
)
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/TestFragment.kt:12: Error: Use viewLifecycleOwner as the LifecycleOwner. [FragmentLiveDataObserve]
@@ -449,7 +438,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
.checkFix(
null,
kotlin(
diff --git a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
index 01cbce9..b6b1a49 100644
--- a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
+++ b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class OnCreateDialogIncorrectCallbackDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector = OnCreateDialogIncorrectCallbackDetector()
diff --git a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UnsafeRepeatOnLifecycleDetectorTest.kt b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UnsafeRepeatOnLifecycleDetectorTest.kt
index b69870e..86fb0e6 100644
--- a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UnsafeRepeatOnLifecycleDetectorTest.kt
+++ b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UnsafeRepeatOnLifecycleDetectorTest.kt
@@ -25,8 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-enable max-line-length */
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class UnsafeRepeatOnLifecycleDetectorTest : LintDetectorTest() {
diff --git a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseGetLayoutInflaterTest.kt b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseGetLayoutInflaterTest.kt
index 01062c5..08fa987 100644
--- a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseGetLayoutInflaterTest.kt
+++ b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseGetLayoutInflaterTest.kt
@@ -25,8 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-enable max-line-length */
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class UseGetLayoutInflaterTest : LintDetectorTest() {
diff --git a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseRequireInsteadOfGetTest.kt b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseRequireInsteadOfGetTest.kt
index cfaa68d..f3f406a 100644
--- a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseRequireInsteadOfGetTest.kt
+++ b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseRequireInsteadOfGetTest.kt
@@ -25,7 +25,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
class UseRequireInsteadOfGetTest {
@@ -1123,4 +1122,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/glance/glance/src/test/kotlin/androidx/glance/color/ColorProvidersTest.kt b/glance/glance/src/test/kotlin/androidx/glance/color/ColorProvidersTest.kt
index d6e352d..89892c7 100644
--- a/glance/glance/src/test/kotlin/androidx/glance/color/ColorProvidersTest.kt
+++ b/glance/glance/src/test/kotlin/androidx/glance/color/ColorProvidersTest.kt
@@ -183,8 +183,7 @@
.m3_sys_color_dynamic_light_secondary_container,
androidx.glance.R.color.glance_colorOnSecondaryContainer to
com.google.android.material.R.color
- .m3_sys_color_dynamic_light_on_secondary_container, // ktlint-disable
- // max-line-length
+ .m3_sys_color_dynamic_light_on_secondary_container,
androidx.glance.R.color.glance_colorTertiary to
com.google.android.material.R.color.m3_sys_color_dynamic_light_tertiary,
androidx.glance.R.color.glance_colorOnTertiary to
@@ -194,8 +193,7 @@
.m3_sys_color_dynamic_light_tertiary_container,
androidx.glance.R.color.glance_colorOnTertiaryContainer to
com.google.android.material.R.color
- .m3_sys_color_dynamic_light_on_tertiary_container, // ktlint-disable
- // max-line-length
+ .m3_sys_color_dynamic_light_on_tertiary_container,
androidx.glance.R.color.glance_colorBackground to
com.google.android.material.R.color.m3_sys_color_dynamic_light_background,
androidx.glance.R.color.glance_colorOnBackground to
@@ -253,8 +251,7 @@
.m3_sys_color_dynamic_dark_secondary_container,
androidx.glance.R.color.glance_colorOnSecondaryContainer to
com.google.android.material.R.color
- .m3_sys_color_dynamic_dark_on_secondary_container, // ktlint-disable
- // max-line-length
+ .m3_sys_color_dynamic_dark_on_secondary_container,
androidx.glance.R.color.glance_colorTertiary to
com.google.android.material.R.color.m3_sys_color_dynamic_dark_tertiary,
androidx.glance.R.color.glance_colorOnTertiary to
diff --git a/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/RepeatOnLifecycleDetectorTest.kt b/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/RepeatOnLifecycleDetectorTest.kt
index fc038ed..57082c7 100644
--- a/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/RepeatOnLifecycleDetectorTest.kt
+++ b/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/RepeatOnLifecycleDetectorTest.kt
@@ -136,7 +136,7 @@
val error = "${config.apiMethod}(Lifecycle.State.STARTED) { }"
Error(error = error, curlyCharacters = error.length, indent = 4, wrongLine = "13")
}
- /* ktlint-disable max-line-length */
+
return """
src/foo/$className.kt:$wrongLine: Error: Wrong usage of repeatOnLifecycle from $className.${config.lifecycleMethod}. [RepeatOnLifecycleWrongUsage]
${" ".repeat(indent)}$error
@@ -150,7 +150,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 errors, 0 warnings
*/
- /* ktlint-enable max-line-length */
+
}
private fun fragmentTemplate(
diff --git a/lifecycle/lifecycle-runtime-testing-lint/src/test/java/androidx/lifecycle/runtime/testing/lint/TestLifecycleOwnerInCoroutineDetectorTest.kt b/lifecycle/lifecycle-runtime-testing-lint/src/test/java/androidx/lifecycle/runtime/testing/lint/TestLifecycleOwnerInCoroutineDetectorTest.kt
index 878e529..549095e 100644
--- a/lifecycle/lifecycle-runtime-testing-lint/src/test/java/androidx/lifecycle/runtime/testing/lint/TestLifecycleOwnerInCoroutineDetectorTest.kt
+++ b/lifecycle/lifecycle-runtime-testing-lint/src/test/java/androidx/lifecycle/runtime/testing/lint/TestLifecycleOwnerInCoroutineDetectorTest.kt
@@ -294,4 +294,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/lint-checks/integration-tests/src/main/java/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt b/lint-checks/integration-tests/src/main/java/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt
index 451efc1..49cfe2c 100644
--- a/lint-checks/integration-tests/src/main/java/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt
+++ b/lint-checks/integration-tests/src/main/java/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt
@@ -55,7 +55,6 @@
// Nothing to see here.
}
- /* ktlint-disable max-line-length */
@kotlin.OptIn(
RequiresOptInSampleAnnotationJava::class,
RequiresOptInSampleAnnotationJavaDuplicate::class
@@ -64,8 +63,6 @@
// Nothing to see here.
}
- /* ktlint-enable max-line-length */
-
@androidx.annotation.OptIn(RequiresAndroidXOptInSampleAnnotationJava::class)
fun invalidMethodWithSingleAndroidXOptIn() {
// Nothing to see here.
@@ -79,7 +76,6 @@
// Nothing to see here.
}
- /* ktlint-disable max-line-length */
@androidx.annotation.OptIn(
RequiresAndroidXOptInSampleAnnotationJava::class,
RequiresAndroidXOptInSampleAnnotationJavaDuplicate::class
@@ -87,5 +83,4 @@
fun invalidMethodWithMultipleAndroidXOptInsWithoutLineBreaks() {
// Nothing to see here.
}
- /* ktlint-enable max-line-length */
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/AndroidManifestServiceExportedDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/AndroidManifestServiceExportedDetectorTest.kt
index 1f34ae4..89a6776 100644
--- a/lint-checks/src/test/java/androidx/build/lint/AndroidManifestServiceExportedDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/AndroidManifestServiceExportedDetectorTest.kt
@@ -33,7 +33,6 @@
fun `Detect missing exported=true declaration in service tag`() {
val input = arrayOf(manifestSample())
- /* ktlint-disable max-line-length */
val expected =
"""
AndroidManifest.xml:21: Error: Missing exported=true in <service> tag [MissingServiceExportedEqualsTrue]
@@ -42,7 +41,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanConcurrentHashMapTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanConcurrentHashMapTest.kt
index 33211a0..77f78b6 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanConcurrentHashMapTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanConcurrentHashMapTest.kt
@@ -51,7 +51,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ConcurrentHashMapImportJava.java:3: Error: Detected ConcurrentHashMap usage. [BanConcurrentHashMap]
@@ -60,7 +59,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(input).expect(expected)
}
@@ -85,7 +83,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ConcurrentHashMapUsageJava.java:5: Error: Detected ConcurrentHashMap usage. [BanConcurrentHashMap]
@@ -97,7 +94,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(input).expect(expected)
}
@@ -123,7 +119,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ConcurrentHashMapImportKotlin.kt:3: Error: Detected ConcurrentHashMap usage. [BanConcurrentHashMap]
@@ -132,7 +127,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, input)
@@ -163,7 +157,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ConcurrentHashMapUsageKotlin.kt:4: Error: Detected ConcurrentHashMap usage. [BanConcurrentHashMap]
@@ -175,7 +168,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
lint().files(*stubs, input).run().expect(expected)
}
@@ -201,7 +193,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ConcurrentHashMapUsageAliasKotlin.kt:3: Error: Detected ConcurrentHashMap usage. [BanConcurrentHashMap]
@@ -210,7 +201,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, input)
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanInappropriateExperimentalUsageTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanInappropriateExperimentalUsageTest.kt
index 93ece14..1eab2b8 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanInappropriateExperimentalUsageTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanInappropriateExperimentalUsageTest.kt
@@ -47,7 +47,6 @@
@Test
fun `Check if annotation is always allowed`() {
- /* ktlint-disable max-line-length */
// These annotations are used in AndroidX
assertTrue(isAnnotationAlwaysAllowed("com.google.devtools.ksp.KspExperimental"))
@@ -65,12 +64,11 @@
assertFalse(isAnnotationAlwaysAllowed("androidx.foo.bar"))
assertFalse(isAnnotationAlwaysAllowed("com.google.foo.bar"))
- /* ktlint-enable max-line-length */
}
@Test
fun `getLibraryFromPath should return correct Maven coordinates`() {
- /* ktlint-disable max-line-length */
+
val paging =
getMavenCoordinatesFromPath(
"/path/to/checkout/out/androidx/paging/paging-common/build/libs/paging-common-3.2.0-alpha01.jar"
@@ -79,7 +77,6 @@
getMavenCoordinatesFromPath(
"/path/to/checkout/out/androidx/room/room-compiler-processing/build/libs/room-compiler-processing-2.5.0-alpha02.jar"
)
- /* ktlint-enable max-line-length */
assertNotNull(paging!!)
assertEquals("androidx.paging", paging.groupId)
@@ -112,13 +109,11 @@
.indented(),
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(provider).expect(expected)
}
@@ -140,13 +135,11 @@
.indented(),
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(provider).expect(expected)
}
@@ -154,7 +147,6 @@
@Test
fun `Test cross-module Experimental usage via Gradle model`() {
- /* ktlint-disable max-line-length */
val provider =
project()
.name("provider")
@@ -182,7 +174,6 @@
)
.indented(),
)
- /* ktlint-enable max-line-length */
val consumer =
project()
@@ -201,7 +192,6 @@
.indented(),
)
- /* ktlint-disable max-line-length */
val expected =
"""
../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:35: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
@@ -216,22 +206,21 @@
../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:50: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
@kotlin.OptIn(
^
-../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:59: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
+../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:58: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
@kotlin.OptIn(
^
-../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:69: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
+../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:66: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
@androidx.annotation.OptIn(RequiresAndroidXOptInSampleAnnotationJava::class)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:74: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
+../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:71: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
@androidx.annotation.OptIn(
^
-../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:83: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
+../consumer/src/main/kotlin/androidx/sample/consumer/OutsideGroupExperimentalAnnotatedClass.kt:79: Error: Experimental and RequiresOptIn APIs may only be used within the same-version group where they were defined. [IllegalExperimentalApiUsage]
@androidx.annotation.OptIn(
^
8 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(provider, consumer).expect(expected)
}
@@ -239,7 +228,6 @@
@Test
fun `Test cross-module Experimental usage in alpha via Gradle model`() {
- /* ktlint-disable max-line-length */
val provider =
project()
.name("provider")
@@ -268,7 +256,6 @@
)
.indented(),
)
- /* ktlint-enable max-line-length */
val consumer =
project()
@@ -288,13 +275,11 @@
.indented(),
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(provider, consumer).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanInlineOptInTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanInlineOptInTest.kt
index b31f832..62a9404 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanInlineOptInTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanInlineOptInTest.kt
@@ -43,7 +43,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/ExperimentalSampleAnnotation.kt:5: Error: Inline functions cannot opt into experimental APIs. [BanInlineOptIn]
@@ -52,7 +51,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanKeepAnnotationTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanKeepAnnotationTest.kt
index 6ec5296..29fa1db 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanKeepAnnotationTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanKeepAnnotationTest.kt
@@ -37,7 +37,6 @@
javaSample("androidx.KeepAnnotationUsageJava"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/KeepAnnotationUsageJava.java:21: Error: Uses @Keep annotation [BanKeepAnnotation]
@@ -46,7 +45,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -58,7 +56,6 @@
ktSample("androidx.KeepAnnotationUsageKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/KeepAnnotationUsageKotlin.kt:21: Error: Uses @Keep annotation [BanKeepAnnotation]
@@ -67,7 +64,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanParcelableUsageTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanParcelableUsageTest.kt
index 7c0a081..bd95155 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanParcelableUsageTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanParcelableUsageTest.kt
@@ -36,7 +36,6 @@
javaSample("androidx.ParcelableUsageJava"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ParcelableUsageJava.java:25: Error: Class implements android.os.Parcelable [BanParcelableUsage]
@@ -45,7 +44,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -57,7 +55,6 @@
ktSample("androidx.ParcelableUsageKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ParcelableUsageKotlin.kt:23: Error: Class implements android.os.Parcelable [BanParcelableUsage]
@@ -66,7 +63,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanRestrictToTestsScopeTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanRestrictToTestsScopeTest.kt
index cf84739..1c9dee7 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanRestrictToTestsScopeTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanRestrictToTestsScopeTest.kt
@@ -37,7 +37,6 @@
javaSample("androidx.RestrictToTestsAnnotationUsageJava"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/RestrictToTestsAnnotationUsageJava.java:26: Error: Replace @RestrictTo(TESTS) with @VisibleForTesting [UsesRestrictToTestsScope]
@@ -79,7 +78,6 @@
+ @androidx.annotation.VisibleForTesting
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(fixDiffs)
}
@@ -91,7 +89,6 @@
ktSample("androidx.RestrictToTestsAnnotationUsageKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/RestrictToTestsAnnotationUsageKotlin.kt:24: Error: Replace @RestrictTo(TESTS) with @VisibleForTesting [UsesRestrictToTestsScope]
@@ -123,7 +120,6 @@
+ @get:VisibleForTesting val testPropertyGet = "test"
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(fixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanSynchronizedMethodsTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanSynchronizedMethodsTest.kt
index d14fb6f..5ac2273 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanSynchronizedMethodsTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanSynchronizedMethodsTest.kt
@@ -44,7 +44,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/SynchronizedMethodJava.java:3: Error: Use of synchronized methods is not recommended [BanSynchronizedMethods]
@@ -53,7 +52,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(input).expect(expected)
}
@@ -73,7 +71,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/SynchronizedMethodKotlin.kt:3: Error: Use of synchronized methods is not recommended [BanSynchronizedMethods]
@@ -82,7 +79,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanThreadSleepTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanThreadSleepTest.kt
index b27181f..f551220 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanThreadSleepTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanThreadSleepTest.kt
@@ -37,7 +37,6 @@
javaSample("androidx.ThreadSleepUsageJava"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ThreadSleepUsageJava.java:21: Error: Uses Thread.sleep() [BanThreadSleep]
@@ -46,7 +45,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -58,7 +56,6 @@
ktSample("androidx.ThreadSleepUsageKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ThreadSleepUsageKotlin.kt:21: Error: Uses Thread.sleep() [BanThreadSleep]
@@ -67,7 +64,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt
index 780ea88..c50bfab 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanUncheckedReflectionTest.kt
@@ -35,7 +35,6 @@
fun `Detection of unchecked reflection in real-world Java sources`() {
val input = arrayOf(javaSample("androidx.sample.core.app.ActivityRecreator"), RestrictTo)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/core/app/ActivityRecreator.java:261: Error: Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API. [BanUncheckedReflection]
@@ -47,7 +46,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -56,7 +54,6 @@
fun `Detection of unchecked reflection in real-world Kotlin sources`() {
val input = arrayOf(ktSample("androidx.sample.core.app.ActivityRecreatorKt"), RestrictTo)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/core/app/ActivityRecreatorKt.kt:172: Error: Method.invoke requires both an upper and lower SDK bounds checks to be safe, and the upper bound must be below SdkVersionInfo.HIGHEST_KNOWN_API. [BanUncheckedReflection]
@@ -68,7 +65,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
lint().files(*input).run().expect(expected)
}
@@ -78,13 +74,11 @@
val input =
arrayOf(javaSample("androidx.sample.core.app.ActivityRecreatorChecked"), RestrictTo)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanVisibilityDocTagsTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanVisibilityDocTagsTest.kt
index 080a19d..20e6ba9 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanVisibilityDocTagsTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanVisibilityDocTagsTest.kt
@@ -58,7 +58,6 @@
fun `Detection of Hide tag in Javadoc`() {
val input = arrayOf(fileWithHideInJavadoc)
- /* ktlint-disable max-line-length */
val expected =
"""
src/HideClass.java:4: Error: @hide is not allowed in documentation [BanHideTag]
@@ -73,7 +72,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -103,7 +101,6 @@
fun `Detection of Suppress tag in Kdoc`() {
val input = arrayOf(fileWithSuppressInKdoc)
- /* ktlint-disable max-line-length */
val expected =
"""
src/SuppressClass.kt:4: Error: @suppress is not allowed in documentation [BanSuppressTag]
@@ -118,7 +115,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/BanVisibleForTestingParamsTest.kt b/lint-checks/src/test/java/androidx/build/lint/BanVisibleForTestingParamsTest.kt
index 339dc19..a7b5190 100644
--- a/lint-checks/src/test/java/androidx/build/lint/BanVisibleForTestingParamsTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/BanVisibleForTestingParamsTest.kt
@@ -37,7 +37,6 @@
javaSample("androidx.VisibleForTestingUsageJava"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/VisibleForTestingUsageJava.java:23: Error: Found non-default otherwise value for @VisibleForTesting [UsesNonDefaultVisibleForTesting]
@@ -74,7 +73,6 @@
+ @VisibleForTesting
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(fixDiffs)
}
@@ -86,7 +84,6 @@
ktSample("androidx.VisibleForTestingUsageKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/VisibleForTestingUsageKotlin.kt:26: Error: Found non-default otherwise value for @VisibleForTesting [UsesNonDefaultVisibleForTesting]
@@ -145,7 +142,6 @@
+ @get:VisibleForTesting val testPropertyGet = "test"
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(fixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/CameraXQuirksClassDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/CameraXQuirksClassDetectorTest.kt
index 87698c3..f696625 100644
--- a/lint-checks/src/test/java/androidx/build/lint/CameraXQuirksClassDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/CameraXQuirksClassDetectorTest.kt
@@ -34,7 +34,6 @@
fun `Detection of CameraX Quirks in Java`() {
val input = arrayOf(javaSample("androidx.CameraXMissingQuirkSummaryJava"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/CameraXMissingQuirkSummaryJava.java:22: Error: CameraX quirks should include this template in the javadoc:
@@ -49,7 +48,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
diff --git a/lint-checks/src/test/java/androidx/build/lint/ClassVerificationFailureDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ClassVerificationFailureDetectorTest.kt
index 32b9a74..676096f 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ClassVerificationFailureDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ClassVerificationFailureDetectorTest.kt
@@ -42,7 +42,6 @@
val input =
arrayOf(javaSample("androidx.ClassVerificationFailureFromJava"), RequiresApi, IntRange)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ClassVerificationFailureFromJava.java:37: Error: This call references a method added in API level 21; however, the containing class androidx.ClassVerificationFailureFromJava is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -57,7 +56,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -69,7 +67,6 @@
javaSample("androidx.sample.core.widget.ListViewCompat"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/core/widget/ListViewCompat.java:39: Error: This call references a method added in API level 19; however, the containing class androidx.sample.core.widget.ListViewCompat is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -122,7 +119,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -134,7 +130,6 @@
ktSample("androidx.sample.core.widget.ListViewCompatKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/core/widget/ListViewCompatKotlin.kt:33: Error: This call references a method added in API level 19; however, the containing class androidx.sample.core.widget.ListViewCompatKotlin is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -146,7 +141,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -155,13 +149,11 @@
fun `Detection of RequiresApi annotation in outer class in Java source`() {
val input = arrayOf(javaSample("androidx.RequiresApiJava"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -170,7 +162,6 @@
fun `Detection of RequiresApi annotation in outer class in Kotlin source`() {
val input = arrayOf(ktSample("androidx.RequiresApiKotlin"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/RequiresApiKotlinOuter19Passes.kt:67: Error: This call references a method added in API level 19; however, the containing class androidx.RequiresApiKotlinNoAnnotationFails.MyStaticClass is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -188,7 +179,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -200,7 +190,6 @@
javaSample("androidx.AutofixUnsafeVoidMethodReferenceJava"),
)
- /* ktlint-disable max-line-length */
val expectedFix =
"""
Fix for src/androidx/AutofixUnsafeVoidMethodReferenceJava.java line 34: Extract to static inner class:
@@ -223,7 +212,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix)
}
@@ -235,7 +223,6 @@
javaSample("androidx.AutofixUnsafeConstructorReferenceJava"),
)
- /* ktlint-disable max-line-length */
val expectedFix =
"""
Fix for src/androidx/AutofixUnsafeConstructorReferenceJava.java line 35: Extract to static inner class:
@@ -258,7 +245,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix)
}
@@ -270,7 +256,6 @@
javaSample("androidx.AutofixUnsafeStaticMethodReferenceJava"),
)
- /* ktlint-disable max-line-length */
val expectedFix =
"""
Fix for src/androidx/AutofixUnsafeStaticMethodReferenceJava.java line 33: Extract to static inner class:
@@ -293,7 +278,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix)
}
@@ -305,7 +289,6 @@
javaSample("androidx.AutofixUnsafeGenericMethodReferenceJava"),
)
- /* ktlint-disable max-line-length */
val expectedFix =
"""
Fix for src/androidx/AutofixUnsafeGenericMethodReferenceJava.java line 34: Extract to static inner class:
@@ -328,7 +311,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix)
}
@@ -338,7 +320,6 @@
val input =
arrayOf(javaSample("androidx.AutofixUnsafeReferenceWithExistingClassJava"), RequiresApi)
- /* ktlint-disable max-line-length */
val expectedFix =
"""
Fix for src/androidx/AutofixUnsafeReferenceWithExistingClassJava.java line 36: Extract to static inner class:
@@ -361,7 +342,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expectFixDiffs(expectedFix)
}
@@ -375,7 +355,6 @@
DoNotInline
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeReferenceWithExistingFix.java:37: Error: This call references a method added in API level 21; however, the containing class androidx.AutofixUnsafeReferenceWithExistingFix is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -406,7 +385,6 @@
+ }
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -419,7 +397,6 @@
RequiresApi
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/appcompat/widget/ActionBarBackgroundDrawable.java:71: Error: This call references a method added in API level 21; however, the containing class androidx.sample.appcompat.widget.ActionBarBackgroundDrawable is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -472,7 +449,6 @@
+ }
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -482,7 +458,6 @@
val input =
arrayOf(javaSample("androidx.AutofixUnsafeMethodWithQualifiedClass"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeMethodWithQualifiedClass.java:40: Error: This call references a method added in API level 19; however, the containing class androidx.AutofixUnsafeMethodWithQualifiedClass is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -510,7 +485,6 @@
@@ -43 +54
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -519,7 +493,6 @@
fun `Auto-fix for unsafe method call on this`() {
val input = arrayOf(javaSample("androidx.AutofixUnsafeCallToThis"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeCallToThis.java:39: Error: This call references a method added in API level 21; however, the containing class androidx.AutofixUnsafeCallToThis is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -591,7 +564,6 @@
@@ -61 +72
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -600,7 +572,6 @@
fun `Auto-fix for unsafe method call on cast object (issue 206111383)`() {
val input = arrayOf(javaSample("androidx.AutofixUnsafeCallOnCast"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeCallOnCast.java:32: Error: This call references a method added in API level 28; however, the containing class androidx.AutofixUnsafeCallOnCast is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -630,7 +601,6 @@
@@ -36 +47
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -640,7 +610,6 @@
val input =
arrayOf(javaSample("androidx.AutofixUnsafeCallWithImplicitReturnCast"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeCallWithImplicitReturnCast.java:36: Error: This call references a method added in API level 26; however, the containing class androidx.AutofixUnsafeCallWithImplicitReturnCast is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -754,7 +723,6 @@
@@ -78 +89
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -764,7 +732,6 @@
val input =
arrayOf(javaSample("androidx.AutofixUnsafeConstructorQualifiedClass"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeConstructorQualifiedClass.java:32: Error: This call references a method added in API level 24; however, the containing class androidx.AutofixUnsafeConstructorQualifiedClass is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -792,7 +759,6 @@
@@ -35 +46
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -802,7 +768,6 @@
val input =
arrayOf(javaSample("androidx.AutofixUnsafeCallWithImplicitParamCast"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixUnsafeCallWithImplicitParamCast.java:34: Error: This call references a method added in API level 16; however, the containing class androidx.AutofixUnsafeCallWithImplicitParamCast is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -853,7 +818,6 @@
@@ -46 +57
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
@@ -863,7 +827,6 @@
val input =
arrayOf(javaSample("androidx.AutofixOnUnsafeCallWithImplicitVarArgsCast"), RequiresApi)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/AutofixOnUnsafeCallWithImplicitVarArgsCast.java:35: Error: This call references a method added in API level 27; however, the containing class androidx.AutofixOnUnsafeCallWithImplicitVarArgsCast is reachable from earlier API levels and will fail run-time class verification. [ClassVerificationFailure]
@@ -935,7 +898,6 @@
@@ -55 +66
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFix)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/DeprecationMismatchDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/DeprecationMismatchDetectorTest.kt
index bc97ee9..6df8cc1 100644
--- a/lint-checks/src/test/java/androidx/build/lint/DeprecationMismatchDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/DeprecationMismatchDetectorTest.kt
@@ -97,7 +97,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/Foo.java:6: Error: Items with a @deprecated doc tag must be annotated with @Deprecated [DeprecationMismatch]
@@ -132,7 +131,6 @@
+ @Deprecated
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -161,7 +159,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/Foo.java:4: Error: Items annotated with @Deprecated must have a @deprecated doc tag [DeprecationMismatch]
@@ -179,7 +176,6 @@
4 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt
index eca2896..2064a38 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ExperimentalPropertyAnnotationDetectorTest.kt
@@ -90,7 +90,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:5: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -130,7 +129,6 @@
+ @get:ExperimentalKotlinAnnotation
+ @Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -173,7 +171,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:5: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -214,7 +211,6 @@
+ @get:ExperimentalKotlinAnnotation
+ @Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -270,7 +266,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:5: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -299,7 +294,6 @@
+ @get:ExperimentalKotlinAnnotation
+ @Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -386,7 +380,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:7: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -402,7 +395,6 @@
+ @set:ExperimentalJavaAnnotation
+ @property:ExperimentalJavaAnnotation
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -426,7 +418,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/test.kt:4: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -442,7 +433,6 @@
+ @set:ExperimentalKotlinAnnotation
+ @property:ExperimentalKotlinAnnotation
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -470,7 +460,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:6: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -486,7 +475,6 @@
+ @set:ExperimentalKotlinAnnotation
+ @property:ExperimentalKotlinAnnotation
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -512,7 +500,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:5: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -527,7 +514,6 @@
@@ -5 +5
+ @property:ExperimentalKotlinAnnotation
"""
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, *input)
@@ -656,7 +642,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/AnnotatedProperty.kt:7: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -681,7 +666,6 @@
+ @get:ExperimentalKotlinAnnotation
+ @Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -722,7 +706,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/test.kt:3: Error: This property does not have all required annotations to correctly mark it as experimental. [ExperimentalPropertyAnnotation]
@@ -738,7 +721,6 @@
+ @get:ExperimentalKotlinAnnotation
+ @Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/IdeaSuppressionDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/IdeaSuppressionDetectorTest.kt
index 2949d44..ece42736 100644
--- a/lint-checks/src/test/java/androidx/build/lint/IdeaSuppressionDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/IdeaSuppressionDetectorTest.kt
@@ -55,7 +55,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/IdeaSuppressionJava.java:5: Error: Uses IntelliJ-specific suppression, should use @SuppressWarnings("deprecation") [IdeaSuppression]
@@ -64,7 +63,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
lint()
.files(*stubs, input)
@@ -99,7 +97,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/IdeaSuppressionKotlin.kt:5: Error: Uses IntelliJ-specific suppression, should use @SuppressWarnings("deprecation") [IdeaSuppression]
@@ -108,7 +105,7 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
+
lint()
.files(*stubs, input)
.allowDuplicates()
diff --git a/lint-checks/src/test/java/androidx/build/lint/IgnoreClassLevelDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/IgnoreClassLevelDetectorTest.kt
index 3e9e805..294f44b 100644
--- a/lint-checks/src/test/java/androidx/build/lint/IgnoreClassLevelDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/IgnoreClassLevelDetectorTest.kt
@@ -52,7 +52,6 @@
Stubs.TestAnnotation
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/TestClass.kt:7: Error: @Ignore should not be used at the class level. Move the annotation to each test individually. [IgnoreClassLevelDetector]
@@ -60,7 +59,6 @@
~~~~~~~~~~~~~~~~
1 errors, 0 warnings
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -91,7 +89,6 @@
Stubs.TestAnnotation
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/TestClass.java:7: Error: @Ignore should not be used at the class level. Move the annotation to each test individually. [IgnoreClassLevelDetector]
@@ -99,7 +96,6 @@
~~~~~~~
1 errors, 0 warnings
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/ImplicitCastVerificationFailureDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ImplicitCastVerificationFailureDetectorTest.kt
index 379e981..da62c1e 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ImplicitCastVerificationFailureDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ImplicitCastVerificationFailureDetectorTest.kt
@@ -96,7 +96,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/UnsafeImplicitCastAsMethodArgumentJava.java:11: Error: This expression has type android.app.Notification.MessagingStyle (introduced in API level 24) but it used as type android.app.Notification.Style (introduced in API level 16). Run-time class verification will not be able to validate this implicit cast on devices between these API levels. [ImplicitCastClassVerificationFailure]
@@ -129,7 +128,6 @@
@@ -24 +35
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -204,7 +202,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/UnsafeImplicitCastInCatchBlockJava.java:15: Error: This expression has type android.view.WindowManager.InvalidDisplayException (introduced in API level 17) but it used as type java.lang.Throwable (introduced in API level 1). Run-time class verification will not be able to validate this implicit cast on devices between these API levels. [ImplicitCastClassVerificationFailure]
@@ -231,7 +228,6 @@
+ }
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -278,7 +274,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/UnsafeImplicitCastInAssignmentJava.java:11: Error: This expression has type android.app.Notification.MessagingStyle (introduced in API level 24) but it used as type android.app.Notification.Style (introduced in API level 16). Run-time class verification will not be able to validate this implicit cast on devices between these API levels. [ImplicitCastClassVerificationFailure]
@@ -311,7 +306,6 @@
@@ -14 +25
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -354,7 +348,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/ImplicitCastOnReturnJava.java:9: Error: This expression has type android.app.Notification.MessagingStyle (introduced in API level 24) but it used as type android.app.Notification.Style (introduced in API level 16). Run-time class verification will not be able to validate this implicit cast on devices between these API levels. [ImplicitCastClassVerificationFailure]
@@ -387,7 +380,6 @@
@@ -12 +23
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -453,7 +445,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/ImplicitCastOfMethodCallResultJava.java:11: Error: This expression has type android.graphics.drawable.AdaptiveIconDrawable (introduced in API level 26) but it used as type android.graphics.drawable.Drawable (introduced in API level 1). Run-time class verification will not be able to validate this implicit cast on devices between these API levels. [ImplicitCastClassVerificationFailure]
@@ -480,7 +471,6 @@
+ }
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -790,7 +780,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/UnsafeCastToVarargs.java:11: Error: This expression has type android.icu.number.FormattedNumber (introduced in API level 30) but it used as type java.lang.CharSequence (introduced in API level 1). Run-time class verification will not be able to validate this implicit cast on devices between these API levels. [ImplicitCastClassVerificationFailure]
@@ -861,7 +850,6 @@
@@ -23 +34
+ }
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/MetadataTagInsideApplicationTagDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/MetadataTagInsideApplicationTagDetectorTest.kt
index 60eec26..32b4a90 100644
--- a/lint-checks/src/test/java/androidx/build/lint/MetadataTagInsideApplicationTagDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/MetadataTagInsideApplicationTagDetectorTest.kt
@@ -33,7 +33,6 @@
fun `Detect usage of metadata tag inside application tag`() {
val input = arrayOf(manifestSample())
- /* ktlint-disable max-line-length */
val expected =
"""
AndroidManifest.xml:19: Error: Detected <application>-level meta-data tag. [MetadataTagInsideApplicationTag]
@@ -42,7 +41,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/MissingJvmDefaultWithCompatibilityDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/MissingJvmDefaultWithCompatibilityDetectorTest.kt
index 17c805f..19fd6c5 100644
--- a/lint-checks/src/test/java/androidx/build/lint/MissingJvmDefaultWithCompatibilityDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/MissingJvmDefaultWithCompatibilityDetectorTest.kt
@@ -42,7 +42,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/InterfaceWithDefaultMethod.kt:4: Error: This interface must be annotated with @JvmDefaultWithCompatibility because it has a stable method with a default implementation [MissingJvmDefaultWithCompatibility]
@@ -57,7 +56,6 @@
@@ -4 +4
+ @JvmDefaultWithCompatibility
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -77,7 +75,6 @@
)
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/InterfaceWithMethodWithDefaultParameterValue.kt:4: Error: This interface must be annotated with @JvmDefaultWithCompatibility because it has a stable method with a parameter with a default value [MissingJvmDefaultWithCompatibility]
@@ -92,7 +89,6 @@
@@ -4 +4
+ @JvmDefaultWithCompatibility
"""
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -125,7 +121,6 @@
Stubs.JvmDefaultWithCompatibility
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/InterfaceWithoutAnnotation.kt:4: Error: This interface must be annotated with @JvmDefaultWithCompatibility because it implements an interface which uses this annotation [MissingJvmDefaultWithCompatibility]
@@ -141,7 +136,6 @@
+ @JvmDefaultWithCompatibility
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -226,7 +220,6 @@
Stubs.OptIn
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/java/androidx/InterfaceWithStableAndUnstableMethods.kt:4: Error: This interface must be annotated with @JvmDefaultWithCompatibility because it has a stable method with a default implementation [MissingJvmDefaultWithCompatibility]
@@ -242,7 +235,6 @@
+ @JvmDefaultWithCompatibility
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/NullabilityAnnotationsDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/NullabilityAnnotationsDetectorTest.kt
index ceef49d..f5df9d0 100644
--- a/lint-checks/src/test/java/androidx/build/lint/NullabilityAnnotationsDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/NullabilityAnnotationsDetectorTest.kt
@@ -49,7 +49,6 @@
val input = arrayOf(source, JetBrainsAnnotations)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/NullabilityAnnotationsJava.java:5: Error: Use @androidx.annotation.NonNull instead of @org.jetbrains.annotations.NotNull [NullabilityAnnotationsDetector]
@@ -74,7 +73,6 @@
+ private void method2(@androidx.annotation.Nullable String arg) {
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt
index 3b905d1..2b077f9 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt
@@ -50,7 +50,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -66,7 +65,6 @@
- if (BuildCompat.isAtLeastN()) {
+ if (Build.VERSION.SDK_INT >= 24) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
@@ -90,7 +88,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -106,7 +103,6 @@
- if (isAtLeastN()) {
+ if (Build.VERSION.SDK_INT >= 24) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
@@ -130,7 +126,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -146,7 +141,6 @@
- if (BuildCompat.isAtLeastNMR1()) {
+ if (Build.VERSION.SDK_INT >= 25) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
@@ -170,7 +164,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -186,7 +179,6 @@
- if (BuildCompat.isAtLeastO()) {
+ if (Build.VERSION.SDK_INT >= 26) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
@@ -210,7 +202,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -226,7 +217,6 @@
- if (BuildCompat.isAtLeastOMR1()) {
+ if (Build.VERSION.SDK_INT >= 27) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
@@ -250,7 +240,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -266,7 +255,6 @@
- if (BuildCompat.isAtLeastP()) {
+ if (Build.VERSION.SDK_INT >= 28) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
@@ -290,7 +278,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/foo/Example.java:5: Error: Using deprecated BuildCompat methods [ObsoleteBuildCompat]
@@ -306,7 +293,6 @@
- if (BuildCompat.isAtLeastQ()) {
+ if (Build.VERSION.SDK_INT >= 29) {
"""
- /* ktlint-enable max-line-length */
check(input).expect(expected.trimIndent()).expectFixDiffs(expectedDiff.trimIndent())
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/ObsoleteCompatDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ObsoleteCompatDetectorTest.kt
index 2a558b7..96fcc18 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ObsoleteCompatDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ObsoleteCompatDetectorTest.kt
@@ -55,7 +55,6 @@
javaSample("androidx.ObsoleteCompatMethod"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ObsoleteCompatMethod.java:33: Error: Obsolete compat method should provide replacement [ObsoleteCompatMethod]
@@ -87,7 +86,6 @@
+ /** @deprecated Call {@link Object#hashCode()} directly. */
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedAutoFix)
}
@@ -99,7 +97,6 @@
javaSample("androidx.ObsoleteCompatMethodMissingReplaceWith"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ObsoleteCompatMethodMissingReplaceWith.java:32: Error: Obsolete compat method should provide replacement [ObsoleteCompatMethod]
@@ -118,7 +115,6 @@
+ @ReplaceWith(expression = "obj.hashCode()")
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedAutoFix)
}
@@ -130,7 +126,6 @@
javaSample("androidx.ObsoleteCompatMethodMissingMultiLineReplaceWith"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ObsoleteCompatMethodMissingMultiLineReplaceWith.java:32: Error: Obsolete compat method should provide replacement [ObsoleteCompatMethod]
@@ -149,7 +144,6 @@
+ @ReplaceWith(expression = "obj.hashCode()")
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedAutoFix)
}
@@ -161,7 +155,6 @@
javaSample("androidx.ObsoleteCompatMethodMissingDeprecated"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ObsoleteCompatMethodMissingDeprecated.java:37: Error: Obsolete compat method should provide replacement [ObsoleteCompatMethod]
@@ -178,7 +171,6 @@
+ @Deprecated
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedAutoFix)
}
@@ -190,7 +182,6 @@
javaSample("androidx.ObsoleteCompatMethodMissingJavadoc"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ObsoleteCompatMethodMissingJavadoc.java:37: Error: Obsolete compat method should provide replacement [ObsoleteCompatMethod]
@@ -213,7 +204,6 @@
+ /** @deprecated Call {@link Object#hashCode()} directly. */
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedAutoFix)
}
@@ -225,7 +215,6 @@
javaSample("androidx.ObsoleteCompatMethodMissingDeprecatedAndJavadoc"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/ObsoleteCompatMethodMissingDeprecatedAndJavadoc.java:36: Error: Obsolete compat method should provide replacement [ObsoleteCompatMethod]
@@ -251,7 +240,6 @@
+ /** @deprecated Call {@link Object#hashCode()} directly. */
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedAutoFix)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/PrereleaseSdkCoreDependencyDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/PrereleaseSdkCoreDependencyDetectorTest.kt
index ce9e5f6..55e7e65 100644
--- a/lint-checks/src/test/java/androidx/build/lint/PrereleaseSdkCoreDependencyDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/PrereleaseSdkCoreDependencyDetectorTest.kt
@@ -59,7 +59,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/main/kotlin/androidx/test/test.kt:6: Error: Prelease SDK check isAtLeastU cannot be called as this project has a versioned dependency on androidx.core:core [PrereleaseSdkCoreDependency]
@@ -68,7 +67,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -128,7 +126,6 @@
),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/main/kotlin/androidx/test/test.kt:6: Error: Prelease SDK check isAtLeastSv2 cannot be called as this project has a versioned dependency on androidx.core:core [PrereleaseSdkCoreDependency]
@@ -137,7 +134,6 @@
1 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/PrivateConstructorForUtilityClassDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/PrivateConstructorForUtilityClassDetectorTest.kt
index 34e2adb..2fb37aa 100644
--- a/lint-checks/src/test/java/androidx/build/lint/PrivateConstructorForUtilityClassDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/PrivateConstructorForUtilityClassDetectorTest.kt
@@ -61,7 +61,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/PrivateConstructorForUtilityClassJava.java:9: Error: Utility class is missing private constructor [PrivateConstructorForUtilityClass]
@@ -76,7 +75,6 @@
3 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/SampledAnnotationDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/SampledAnnotationDetectorTest.kt
index cfb4891..bcf1cee 100644
--- a/lint-checks/src/test/java/androidx/build/lint/SampledAnnotationDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/SampledAnnotationDetectorTest.kt
@@ -26,8 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
-
/**
* Test for [SampledAnnotationDetector]
*
@@ -660,4 +658,3 @@
checkKotlin(sampleFile = sampleFile, expectedText = expected)
}
}
-/* ktlint-enable max-line-length */
diff --git a/lint-checks/src/test/java/androidx/build/lint/Stubs.kt b/lint-checks/src/test/java/androidx/build/lint/Stubs.kt
index 5382118..5f4d440 100644
--- a/lint-checks/src/test/java/androidx/build/lint/Stubs.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/Stubs.kt
@@ -26,8 +26,6 @@
companion object {
- /* ktlint-disable max-line-length */
-
/** [TestFile] containing Keep.java from the annotation library. */
val Keep =
TestFiles.java(
@@ -458,6 +456,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationDetectorTest.kt
index 1a22ce7..0375bd8 100644
--- a/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationDetectorTest.kt
@@ -36,7 +36,6 @@
javaSample("androidx.TargetApiUsageJava"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/TargetApiUsageJava.java:22: Error: Use @RequiresApi instead of @TargetApi [BanTargetApiAnnotation]
@@ -48,7 +47,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
@@ -60,7 +58,6 @@
ktSample("androidx.TargetApiUsageKotlin"),
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/TargetApiUsageKotlin.kt:22: Error: Use @RequiresApi instead of @TargetApi [BanTargetApiAnnotation]
@@ -72,7 +69,6 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationUsageDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationUsageDetectorTest.kt
index 55b568b..f18f209 100644
--- a/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationUsageDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/TargetApiAnnotationUsageDetectorTest.kt
@@ -74,7 +74,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/SampleClass.java:5: Error: Use @RequiresApi instead of @TargetApi [BanTargetApiAnnotation]
@@ -86,9 +85,7 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
- /* ktlint-disable max-line-length */
val expectFixDiffs =
"""
Fix for src/androidx/sample/SampleClass.java line 5: Replace with `@RequiresApi`:
@@ -101,7 +98,6 @@
+ @androidx.annotation.RequiresApi(15)
"""
.trimIndent()
- /* ktlint-enable max-line-length */
checkTask(input).run().expect(expected).expectFixDiffs(expectFixDiffs)
}
@@ -126,7 +122,6 @@
.trimIndent()
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/androidx/sample/SampleClass.kt:5: Error: Use @RequiresApi instead of @TargetApi [BanTargetApiAnnotation]
@@ -138,9 +133,7 @@
2 errors, 0 warnings
"""
.trimIndent()
- /* ktlint-enable max-line-length */
- /* ktlint-disable max-line-length */
val expectFixDiffs =
"""
Fix for src/androidx/sample/SampleClass.kt line 5: Replace with `@RequiresApi`:
@@ -153,7 +146,6 @@
+ @androidx.annotation.RequiresApi(15)
"""
.trimIndent()
- /* ktlint-enable max-line-length */
checkTask(input).run().expect(expected).expectFixDiffs(expectFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/TestSizeAnnotationEnforcerTest.kt b/lint-checks/src/test/java/androidx/build/lint/TestSizeAnnotationEnforcerTest.kt
index 1be9b28..ede18d1 100644
--- a/lint-checks/src/test/java/androidx/build/lint/TestSizeAnnotationEnforcerTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/TestSizeAnnotationEnforcerTest.kt
@@ -93,14 +93,12 @@
)
.run()
.expect(
- /* ktlint-disable max-line-length */
"""
src/test/androidx/foo/Test.kt:8: Error: Unexpected test size annotation [UnexpectedTestSizeAnnotation]
@MediumTest
~~~~~~~~~~~
1 errors, 0 warnings
"""
- /* ktlint-enable max-line-length */
)
}
@@ -124,14 +122,12 @@
)
.run()
.expect(
- /* ktlint-disable max-line-length */
"""
src/androidTest/androidx/foo/Test.kt:7: Error: Unsupported test runner. Supported runners are: [androidx.test.ext.junit.runners.AndroidJUnit4, org.junit.runners.Parameterized] [UnsupportedTestRunner]
@RunWith(JUnit4::class)
~~~~~~~~~~~~~
1 errors, 0 warnings
"""
- /* ktlint-enable max-line-length */
)
}
@@ -269,14 +265,12 @@
)
.run()
.expect(
- /* ktlint-disable max-line-length */
"""
src/androidTest/androidx/foo/Test.kt:16: Error: Missing test size annotation [MissingTestSizeAnnotation]
fun bar() {}
~~~
1 errors, 0 warnings
"""
- /* ktlint-enable max-line-length */
)
}
@@ -309,7 +303,6 @@
)
.run()
.expect(
- /* ktlint-disable max-line-length */
"""
src/androidTest/androidx/foo/Test.kt:11: Error: Missing test size annotation [MissingTestSizeAnnotation]
fun foo() {}
@@ -319,7 +312,6 @@
~~~
2 errors, 0 warnings
"""
- /* ktlint-enable max-line-length */
)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorConstructorTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorConstructorTest.kt
index f7d2efa..a25f506 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorConstructorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorConstructorTest.kt
@@ -31,7 +31,6 @@
javaSample("replacewith.ConstructorStaticClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorStaticClass.java:25: Information: Replacement available [ReplaceWith]
@@ -49,7 +48,6 @@
+ new StringBuffer("parameter");
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -62,7 +60,6 @@
javaSample("replacewith.ConstructorNonStaticClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorNonStaticClass.java:25: Information: Replacement available [ReplaceWith]
@@ -80,7 +77,6 @@
+ new ReplaceWithUsageJava().new InnerClass();
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -93,7 +89,6 @@
javaSample("replacewith.ConstructorToStaticMethod")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorToStaticMethod.java:25: Information: Replacement available [ReplaceWith]
@@ -111,7 +106,6 @@
+ ReplaceWithUsageJava.newInstance(10000);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -124,7 +118,6 @@
ktSample("replacewith.ConstructorStaticClassKotlin")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorStaticClassKotlin.kt:22: Information: Replacement available [ReplaceWith]
@@ -142,7 +135,6 @@
+ StringBuffer("parameter")
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -155,7 +147,6 @@
ktSample("replacewith.ConstructorNonStaticClassKotlin")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorNonStaticClassKotlin.kt:22: Information: Replacement available [ReplaceWith]
@@ -173,7 +164,6 @@
+ ReplaceWithUsageJava().InnerClass()
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -186,7 +176,6 @@
ktSample("replacewith.ConstructorToStaticMethodKotlin")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorToStaticMethodKotlin.kt:22: Information: Replacement available [ReplaceWith]
@@ -204,7 +193,6 @@
+ ReplaceWithUsageJava.newInstance(10000)
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorFieldTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorFieldTest.kt
index 5e60b13..bc187a4 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorFieldTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorFieldTest.kt
@@ -31,7 +31,6 @@
javaSample("replacewith.StaticFieldExplicitClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/StaticFieldExplicitClass.java:25: Information: Replacement available [ReplaceWith]
@@ -49,7 +48,6 @@
+ System.out.println(View.AUTOFILL_HINT_NAME);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -62,7 +60,6 @@
javaSample("replacewith.StaticFieldImplicitClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/StaticFieldImplicitClass.java:27: Information: Replacement available [ReplaceWith]
@@ -80,7 +77,6 @@
+ System.out.println(View.AUTOFILL_HINT_NAME);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorImportsTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorImportsTest.kt
index 47eb584..1be5a54 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorImportsTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorImportsTest.kt
@@ -27,7 +27,6 @@
fun methodWithImportsJava() {
val input = arrayOf(javaSample("replacewith.MethodWithImportsJava"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/MethodWithImportsJava.java:38: Information: Replacement available [ReplaceWith]
@@ -57,7 +56,6 @@
+ newMethod(null);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -70,7 +68,6 @@
javaSample("replacewith.ReplaceWithUsageJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/MethodWithImportsKotlin.kt:25: Information: Replacement available [ReplaceWith]
@@ -100,7 +97,6 @@
+ "world".toString()
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -109,7 +105,6 @@
fun methodWithNoImportsJava() {
val input = arrayOf(javaSample("replacewith.MethodWithNoImportsJava"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/MethodWithNoImportsJava.java:37: Information: Replacement available [ReplaceWith]
@@ -141,7 +136,6 @@
+ newMethod(null);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -154,7 +148,6 @@
javaSample("replacewith.ReplaceWithUsageJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/MethodWithNoImportsKotlin.kt:22: Information: Replacement available [ReplaceWith]
@@ -186,7 +179,6 @@
+ "world".toString()
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -195,7 +187,6 @@
fun methodWithNoImportsOrPackage() {
val input = arrayOf(javaSample("replacewith.MethodWithNoImportsOrPackage"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/MethodWithNoImportsOrPackage.java:35: Information: Replacement available [ReplaceWith]
@@ -225,7 +216,6 @@
+ import androidx.annotation.NonNull;
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinConstructorTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinConstructorTest.kt
index e6fcd8d..d042160 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinConstructorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinConstructorTest.kt
@@ -31,7 +31,6 @@
javaSample("replacewith.ConstructorKotlinStaticClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorKotlinStaticClass.java:25: Information: Replacement available [ReplaceWith]
@@ -52,7 +51,6 @@
+ new StringBuffer("parameter");
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -65,7 +63,6 @@
javaSample("replacewith.ConstructorKotlinNonStaticClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorKotlinNonStaticClass.java:25: Information: Replacement available [ReplaceWith]
@@ -83,7 +80,6 @@
+ new ReplaceWithUsageKotlin().new InnerClass();
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -96,7 +92,6 @@
javaSample("replacewith.ConstructorKotlinToStaticMethod")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/ConstructorKotlinToStaticMethod.java:25: Information: Replacement available [ReplaceWith]
@@ -114,7 +109,6 @@
+ ReplaceWithUsageKotlin.obtain(10000);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinMethodTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinMethodTest.kt
index 85882f4..a802aca 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinMethodTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorKotlinMethodTest.kt
@@ -31,7 +31,6 @@
javaSample("replacewith.StaticKotlinMethodExplicitClassJava")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/StaticKotlinMethodExplicitClassJava.java:25: Information: Replacement available [ReplaceWith]
@@ -49,7 +48,6 @@
+ this.toString();
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -62,13 +60,11 @@
ktSample("replacewith.StaticKotlinMethodExplicitClassKotlin")
)
- /* ktlint-disable max-line-length */
val expected =
"""
No warnings.
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorMethodTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorMethodTest.kt
index 6211c62..8294ca6 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorMethodTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorMethodTest.kt
@@ -31,7 +31,6 @@
javaSample("replacewith.StaticMethodExplicitClass")
)
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/StaticMethodExplicitClass.java:25: Information: Replacement available [ReplaceWith]
@@ -49,7 +48,6 @@
+ this.toString();
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -58,7 +56,6 @@
fun methodImplicitThis() {
val input = arrayOf(javaSample("replacewith.MethodImplicitThis"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/MethodImplicitThis.java:33: Information: Replacement available [ReplaceWith]
@@ -76,7 +73,6 @@
+ newMethod(null);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
@@ -85,7 +81,6 @@
fun methodExplicitThis() {
val input = arrayOf(javaSample("replacewith.MethodExplicitThis"))
- /* ktlint-disable max-line-length */
val expected =
"""
src/replacewith/MethodExplicitThis.java:33: Information: Replacement available [ReplaceWith]
@@ -103,7 +98,6 @@
+ this.newMethod(null);
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorPropertyTest.kt b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorPropertyTest.kt
index 4ac1ff0..407c0b7 100644
--- a/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorPropertyTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/replacewith/ReplaceWithDetectorPropertyTest.kt
@@ -31,7 +31,6 @@
javaSample("replacewith.PropertyJava")
)
- /* ktlint-disable max-line-length */
// TODO(b/323214452): This is incomplete, but we have explicitly suppressed replacement of
// Kotlin property accessors until we can properly convert the expressions to Java.
val expected =
@@ -60,7 +59,6 @@
+ clazz.otherProperty();
"""
.trimIndent()
- /* ktlint-enable max-line-length */
check(*input).expect(expected).expectFixDiffs(expectedFixDiffs)
}
diff --git a/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/ComposableDestinationInComposeScopeDetectorTest.kt b/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/ComposableDestinationInComposeScopeDetectorTest.kt
index 399b9dd..1c86f94 100644
--- a/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/ComposableDestinationInComposeScopeDetectorTest.kt
+++ b/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/ComposableDestinationInComposeScopeDetectorTest.kt
@@ -26,7 +26,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [ComposableDestinationInComposeScopeDetector]. */
@@ -159,4 +158,3 @@
)
}
}
-/* ktlint-enable max-line-length */
diff --git a/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/UnrememberedGetBackStackEntryDetectorTest.kt b/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/UnrememberedGetBackStackEntryDetectorTest.kt
index 5997275..2c20566 100644
--- a/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/UnrememberedGetBackStackEntryDetectorTest.kt
+++ b/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/UnrememberedGetBackStackEntryDetectorTest.kt
@@ -27,7 +27,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-/* ktlint-disable max-line-length */
@RunWith(JUnit4::class)
/** Test for [UnrememberedGetBackStackEntryDetector]. */
@@ -378,4 +377,3 @@
.expectClean()
}
}
-/* ktlint-enable max-line-length */
diff --git a/navigation/navigation-dynamic-features-runtime/src/androidTest/java/androidx/navigation/dynamicfeatures/DynamicActivityNavigatorTest.kt b/navigation/navigation-dynamic-features-runtime/src/androidTest/java/androidx/navigation/dynamicfeatures/DynamicActivityNavigatorTest.kt
index cbe9f43..8a187cc 100644
--- a/navigation/navigation-dynamic-features-runtime/src/androidTest/java/androidx/navigation/dynamicfeatures/DynamicActivityNavigatorTest.kt
+++ b/navigation/navigation-dynamic-features-runtime/src/androidTest/java/androidx/navigation/dynamicfeatures/DynamicActivityNavigatorTest.kt
@@ -33,8 +33,6 @@
import org.mockito.Mockito.mock
import org.mockito.Mockito.`when` as mockWhen
-/* ktlint-enable unused-imports */
-
@SmallTest
@RunWith(AndroidJUnit4::class)
public class DynamicActivityNavigatorTest {
diff --git a/playground-common/playground-plugin/src/main/kotlin/androidx/playground/SettingsParser.kt b/playground-common/playground-plugin/src/main/kotlin/androidx/playground/SettingsParser.kt
index 1917262..d725a82 100644
--- a/playground-common/playground-plugin/src/main/kotlin/androidx/playground/SettingsParser.kt
+++ b/playground-common/playground-plugin/src/main/kotlin/androidx/playground/SettingsParser.kt
@@ -29,7 +29,7 @@
* Match lines that start with includeProject, followed by a require argument for project gradle
* path and an optional argument for project file path.
*/
- /* ktlint-disable max-line-length */
+
private val includeProjectPattern = Regex(
"""^[\n\r\s]*includeProject\("(?<name>[a-z0-9-:]*)"(,[\n\r\s]*"(?<path>[a-z0-9-/]+))?.*\).*$""",
setOf(RegexOption.MULTILINE, RegexOption.IGNORE_CASE)
diff --git a/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/InvalidSetHasFixedSizeTest.kt b/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/InvalidSetHasFixedSizeTest.kt
index 763a4e1..e670460 100644
--- a/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/InvalidSetHasFixedSizeTest.kt
+++ b/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/InvalidSetHasFixedSizeTest.kt
@@ -207,7 +207,6 @@
.files(VIEW, RECYCLER_VIEW, layoutFile, resourceIds, source)
.issues(InvalidSetHasFixedSizeDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/Example.kt:10: Error: When using `setHasFixedSize() in an RecyclerView, wrap_content cannot be used as a value for size in the scrolling direction. [InvalidSetHasFixedSize]
@@ -217,7 +216,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -279,7 +277,6 @@
.files(VIEW, RECYCLER_VIEW, layoutFile, resourceIds, source)
.issues(InvalidSetHasFixedSizeDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/Example.kt:10: Error: When using `setHasFixedSize() in an RecyclerView, wrap_content cannot be used as a value for size in the scrolling direction. [InvalidSetHasFixedSize]
@@ -289,7 +286,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -354,7 +350,6 @@
.files(VIEW, RECYCLER_VIEW, layoutFile, resourceIds, source)
.issues(InvalidSetHasFixedSizeDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/Example.kt:14: Error: When using `setHasFixedSize() in an RecyclerView, wrap_content cannot be used as a value for size in the scrolling direction. [InvalidSetHasFixedSize]
@@ -364,6 +359,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_AutoMigration_1_2_Impl.kt b/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_AutoMigration_1_2_Impl.kt
index 7709e2c..2d55971 100644
--- a/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_AutoMigration_1_2_Impl.kt
+++ b/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_AutoMigration_1_2_Impl.kt
@@ -1,5 +1,3 @@
-@file:Suppress("ktlint") // Generated code
-
package androidx.room.integration.kotlintestapp.test
import androidx.room.migration.AutoMigrationSpec
diff --git a/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_Impl.kt b/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_Impl.kt
index d8c0d67..18f7ccc 100644
--- a/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_Impl.kt
+++ b/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_Impl.kt
@@ -1,5 +1,4 @@
@file:Suppress(
- "ktlint",
"UNCHECKED_CAST",
"UNSAFE_CALL",
"DEPRECATION",
diff --git a/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_TheDao_Impl.kt b/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_TheDao_Impl.kt
index 79895e4..f0f3883 100644
--- a/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_TheDao_Impl.kt
+++ b/room/integration-tests/kotlintestapp/src/androidTestWithKspGenKotlin/java/androidx/room/integration/kotlintestapp/test/PreKmpDatabase_TheDao_Impl.kt
@@ -1,5 +1,3 @@
-@file:Suppress("ktlint") // Generated code
-
package androidx.room.integration.kotlintestapp.test
import android.database.Cursor
diff --git a/room/room-runtime-lint/src/test/java/androidx/room/lint/CursorKotlinUseIssueDetectorTest.kt b/room/room-runtime-lint/src/test/java/androidx/room/lint/CursorKotlinUseIssueDetectorTest.kt
index 40638df..2933d50 100644
--- a/room/room-runtime-lint/src/test/java/androidx/room/lint/CursorKotlinUseIssueDetectorTest.kt
+++ b/room/room-runtime-lint/src/test/java/androidx/room/lint/CursorKotlinUseIssueDetectorTest.kt
@@ -42,7 +42,6 @@
)
.issues(CursorKotlinUseIssueDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/Foo.kt:4: Error: Usage of kotlin.io.use() with Cursor requires API 16. [CursorKotlinUse]
diff --git a/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/EnsureInitializerMetadataTest.kt b/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/EnsureInitializerMetadataTest.kt
index ab3b256..eed9b38 100644
--- a/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/EnsureInitializerMetadataTest.kt
+++ b/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/EnsureInitializerMetadataTest.kt
@@ -35,7 +35,6 @@
.files(INITIALIZER, TEST_INITIALIZER)
.issues(EnsureInitializerMetadataDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/TestInitializer.kt:5: Error: Every Initializer needs to be accompanied by a corresponding <meta-data> entry in the AndroidManifest.xml file. [EnsureInitializerMetadata]
@@ -45,7 +44,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/InitializerConstructorTest.kt b/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/InitializerConstructorTest.kt
index f1989af..7573e4c 100644
--- a/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/InitializerConstructorTest.kt
+++ b/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/InitializerConstructorTest.kt
@@ -70,7 +70,6 @@
.files(INITIALIZER, component)
.issues(InitializerConstructorDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/TestInitializer.kt:5: Error: Missing Initializer no-arg constructor [EnsureInitializerNoArgConstr]
@@ -80,6 +79,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/wear/watchface/watchface-complications-data-source-samples/src/main/java/androidx/wear/watchface/complications/datasource/samples/dynamic/RequestPermissionActivity.kt b/wear/watchface/watchface-complications-data-source-samples/src/main/java/androidx/wear/watchface/complications/datasource/samples/dynamic/RequestPermissionActivity.kt
index ad425f2..308c73f 100644
--- a/wear/watchface/watchface-complications-data-source-samples/src/main/java/androidx/wear/watchface/complications/datasource/samples/dynamic/RequestPermissionActivity.kt
+++ b/wear/watchface/watchface-complications-data-source-samples/src/main/java/androidx/wear/watchface/complications/datasource/samples/dynamic/RequestPermissionActivity.kt
@@ -53,9 +53,9 @@
companion object {
private val ACTION_TO_PERMISSION: Map<String, String> =
mapOf(
- "androidx.wear.watchface.complications.datasource.samples.dynamic.REQUEST_ACTIVITY_RECOGNITION_PERMISSION" to // ktlint-disable max-line-length
+ "androidx.wear.watchface.complications.datasource.samples.dynamic.REQUEST_ACTIVITY_RECOGNITION_PERMISSION" to
permission.ACTIVITY_RECOGNITION,
- "androidx.wear.watchface.complications.datasource.samples.dynamic.REQUEST_BODY_SENSORS_PERMISSION" to // ktlint-disable max-line-length
+ "androidx.wear.watchface.complications.datasource.samples.dynamic.REQUEST_BODY_SENSORS_PERMISSION" to
permission.BODY_SENSORS,
)
}
diff --git a/wear/watchface/watchface-style/src/androidTest/java/androidx/wear/watchface/style/UserStyleSettingWithStringResourcesTest.kt b/wear/watchface/watchface-style/src/androidTest/java/androidx/wear/watchface/style/UserStyleSettingWithStringResourcesTest.kt
index 9a7ea94..fa41a807 100644
--- a/wear/watchface/watchface-style/src/androidTest/java/androidx/wear/watchface/style/UserStyleSettingWithStringResourcesTest.kt
+++ b/wear/watchface/watchface-style/src/androidTest/java/androidx/wear/watchface/style/UserStyleSettingWithStringResourcesTest.kt
@@ -301,7 +301,7 @@
@Test
@Suppress("deprecation")
- public fun complicationsUserStyleSettingWireFormatRoundTrip_noScreenReaderName_filledByDisplayName() { // ktlint-disable max-line-length
+ public fun complicationsUserStyleSettingWireFormatRoundTrip_noScreenReaderName_filledByDisplayName() {
val complicationSetting =
ComplicationSlotsUserStyleSetting(
UserStyleSetting.Id("complications_style_setting1"),
diff --git a/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt b/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
index 389c0c0..0f7ca2d 100644
--- a/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
+++ b/wear/watchface/watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
@@ -1389,7 +1389,7 @@
internal companion object {
private fun <T> bindScale(
function:
- ( // ktlint-disable parameter-list-wrapping
+ (
resources: Resources,
parser: XmlResourceParser,
complicationScaleX: Float,
@@ -2185,7 +2185,7 @@
internal companion object {
private fun <T> bindIdToSetting(
function:
- ( // ktlint-disable parameter-list-wrapping
+ (
resources: Resources,
parser: XmlResourceParser,
idToSetting: Map<String, UserStyleSetting>
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
index 84939b2..0c213d6 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
@@ -1465,7 +1465,7 @@
// succeed.
pendingWallpaperInstance =
InteractiveInstanceManager
- .setParameterlessEngineOrTakePendingWallpaperInteractiveWatchFaceInstance( // ktlint-disable max-line-length
+ .setParameterlessEngineOrTakePendingWallpaperInteractiveWatchFaceInstance(
this
)
}
diff --git a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeChallenge.kt b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeChallenge.kt
index 6147d74..8b8c130 100644
--- a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeChallenge.kt
+++ b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeChallenge.kt
@@ -22,14 +22,12 @@
import java.security.MessageDigest
import java.util.Base64
-/* ktlint-disable max-line-length */
/**
* Authorization code challenge.
*
* Related specifications:
* [Proof Key for Code Exchange by OAuth Public Clients (RFC 7636)](https://tools.ietf.org/html/rfc7636)
*/
-/* ktlint-enable max-line-length */
@RequiresApi(Build.VERSION_CODES.O)
public class CodeChallenge constructor(codeVerifier: CodeVerifier) {
/** The challenge value. */
diff --git a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeVerifier.kt b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeVerifier.kt
index d66c54f..b63aecb91 100644
--- a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeVerifier.kt
+++ b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/CodeVerifier.kt
@@ -22,14 +22,12 @@
import java.security.SecureRandom
import java.util.Base64
-/* ktlint-disable max-line-length */
/**
* Authorisation code verifier.
*
* Related specifications:
* [Proof Key for Code Exchange by OAuth Public Clients (RFC 7636).](https://tools.ietf.org/html/rfc7636)
*/
-/* ktlint-enable max-line-length */
@RequiresApi(Build.VERSION_CODES.O)
public class CodeVerifier {
private companion object {
diff --git a/wear/wear-remote-interactions/src/main/java/androidx/wear/remote/interactions/RemoteActivityHelper.kt b/wear/wear-remote-interactions/src/main/java/androidx/wear/remote/interactions/RemoteActivityHelper.kt
index 2f43168..60c969c 100644
--- a/wear/wear-remote-interactions/src/main/java/androidx/wear/remote/interactions/RemoteActivityHelper.kt
+++ b/wear/wear-remote-interactions/src/main/java/androidx/wear/remote/interactions/RemoteActivityHelper.kt
@@ -39,7 +39,7 @@
import kotlinx.coroutines.flow.flowOf
// Disabling max line length is needed for the link to work properly in the KDoc.
-/* ktlint-disable max-line-length */
+
/**
* Support for opening android intents on other devices.
*
@@ -69,7 +69,6 @@
* @param executor [Executor] used for getting data to be passed in remote intent. If not specified,
* default will be `Executors.newSingleThreadExecutor()`.
*/
-/* ktlint-enable max-line-length */
public class RemoteActivityHelper
@JvmOverloads
constructor(
diff --git a/work/work-lint/src/test/java/androidx/work/lint/BadConfigurationProviderTest.kt b/work/work-lint/src/test/java/androidx/work/lint/BadConfigurationProviderTest.kt
index f80dea3..b875a56 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/BadConfigurationProviderTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/BadConfigurationProviderTest.kt
@@ -86,7 +86,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
lint()
.files(
ANDROID_APPLICATION,
@@ -103,7 +102,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-lint/src/test/java/androidx/work/lint/IdleBatteryChargingConstraintsDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/IdleBatteryChargingConstraintsDetectorTest.kt
index 305c0f6..1d088f5 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/IdleBatteryChargingConstraintsDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/IdleBatteryChargingConstraintsDetectorTest.kt
@@ -48,7 +48,6 @@
.files(CONSTRAINTS, customApplication)
.issues(IdleBatteryChargingConstraintsDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/App.kt:8: Warning: Constraints may not be met for some devices [IdleBatteryChargingConstraints]
@@ -58,7 +57,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -87,7 +85,6 @@
.files(CONSTRAINTS, customApplication)
.issues(IdleBatteryChargingConstraintsDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/App.kt:8: Warning: Constraints may not be met for some devices [IdleBatteryChargingConstraints]
@@ -97,7 +94,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-lint/src/test/java/androidx/work/lint/InvalidPeriodicWorkRequestIntervalDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/InvalidPeriodicWorkRequestIntervalDetectorTest.kt
index 2161543..59255e6 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/InvalidPeriodicWorkRequestIntervalDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/InvalidPeriodicWorkRequestIntervalDetectorTest.kt
@@ -38,7 +38,7 @@
)
.indented()
.within("src")
- /* ktlint-disable max-line-length */
+
val snippet =
kotlin(
"com/example/Test.kt",
@@ -71,7 +71,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -90,7 +89,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
val snippet =
kotlin(
"com/example/Test.kt",
@@ -111,7 +109,6 @@
)
.indented()
.within("src")
- /* ktlint-enable max-line-length */
lint()
.files(LISTENABLE_WORKER, PERIODIC_WORK_REQUEST, worker, snippet)
@@ -135,7 +132,7 @@
)
.indented()
.within("src")
- /* ktlint-disable max-line-length */
+
val snippet =
kotlin(
"com/example/Test.kt",
@@ -169,7 +166,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -187,7 +183,7 @@
)
.indented()
.within("src")
- /* ktlint-disable max-line-length */
+
val snippet =
kotlin(
"com/example/Test.kt",
@@ -221,7 +217,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-lint/src/test/java/androidx/work/lint/PeriodicEnqueueIssueDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/PeriodicEnqueueIssueDetectorTest.kt
index e2a63cb..bd7f667 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/PeriodicEnqueueIssueDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/PeriodicEnqueueIssueDetectorTest.kt
@@ -50,7 +50,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
lint()
.files(
WORK_MANAGER,
@@ -71,7 +70,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -97,7 +95,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
lint()
.files(
WORK_MANAGER,
@@ -118,7 +115,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -146,7 +142,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
lint()
.files(
WORK_MANAGER,
@@ -167,7 +162,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-lint/src/test/java/androidx/work/lint/RemoveWorkManagerInitializerDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/RemoveWorkManagerInitializerDetectorTest.kt
index 7f1bcb3..55472cd 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/RemoveWorkManagerInitializerDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/RemoveWorkManagerInitializerDetectorTest.kt
@@ -168,7 +168,6 @@
)
.indented()
- /* ktlint-disable max-line-length */
lint()
.files(
// Manifest file
@@ -189,7 +188,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -235,7 +233,6 @@
)
.indented()
- /* ktlint-disable max-line-length */
lint()
.files(
// Manifest file
@@ -256,7 +253,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -304,7 +300,6 @@
)
.indented()
- /* ktlint-disable max-line-length */
lint()
.files(
// Manifest file
@@ -317,6 +312,5 @@
.issues(RemoveWorkManagerInitializerDetector.ISSUE)
.run()
.expectClean()
- /* ktlint-enable max-line-length */
}
}
diff --git a/work/work-lint/src/test/java/androidx/work/lint/RxWorkerSetProgressDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/RxWorkerSetProgressDetectorTest.kt
index e1d1342..1ea995d 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/RxWorkerSetProgressDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/RxWorkerSetProgressDetectorTest.kt
@@ -51,7 +51,6 @@
)
.issues(RxWorkerSetProgressDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/App.kt:8: Error: setProgress is deprecated. Use setCompletableProgress instead. [UseRxSetProgress2]
@@ -70,6 +69,5 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
}
diff --git a/work/work-lint/src/test/java/androidx/work/lint/SpecifyForegroundServiceTypeIssueDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/SpecifyForegroundServiceTypeIssueDetectorTest.kt
index d82dff8..c3fddff 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/SpecifyForegroundServiceTypeIssueDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/SpecifyForegroundServiceTypeIssueDetectorTest.kt
@@ -55,7 +55,6 @@
)
.issues(SpecifyForegroundServiceTypeIssueDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/App.kt:9: Error: Missing dataSync foregroundServiceType in the AndroidManifest.xml [SpecifyForegroundServiceType]
@@ -65,7 +64,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
@@ -121,7 +119,6 @@
)
.issues(SpecifyForegroundServiceTypeIssueDetector.ISSUE)
.run()
- /* ktlint-disable max-line-length */
.expect(
"""
src/com/example/App.kt:9: Error: Missing dataSync foregroundServiceType in the AndroidManifest.xml [SpecifyForegroundServiceType]
@@ -131,7 +128,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-lint/src/test/java/androidx/work/lint/SpecifyJobSchedulerIdRangeIssueDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/SpecifyJobSchedulerIdRangeIssueDetectorTest.kt
index 181cd61..cff24d3 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/SpecifyJobSchedulerIdRangeIssueDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/SpecifyJobSchedulerIdRangeIssueDetectorTest.kt
@@ -42,7 +42,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
lint()
.files(JOB_SERVICE, service)
.issues(SpecifyJobSchedulerIdRangeIssueDetector.ISSUE)
@@ -56,7 +55,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-lint/src/test/java/androidx/work/lint/WorkerHasPublicModifierDetectorTest.kt b/work/work-lint/src/test/java/androidx/work/lint/WorkerHasPublicModifierDetectorTest.kt
index df2947b..abdcd86 100644
--- a/work/work-lint/src/test/java/androidx/work/lint/WorkerHasPublicModifierDetectorTest.kt
+++ b/work/work-lint/src/test/java/androidx/work/lint/WorkerHasPublicModifierDetectorTest.kt
@@ -42,7 +42,6 @@
.indented()
.within("src")
- /* ktlint-disable max-line-length */
lint()
.files(
// Source files
@@ -60,7 +59,6 @@
"""
.trimIndent()
)
- /* ktlint-enable max-line-length */
}
@Test
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableDelegatingWorker.kt b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableDelegatingWorker.kt
index d2f6e0d..9f38fae 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableDelegatingWorker.kt
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableDelegatingWorker.kt
@@ -100,9 +100,7 @@
// The RemoteListenableWorker class to delegate to.
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- /* ktlint-disable max-line-length */
const val ARGUMENT_REMOTE_LISTENABLE_WORKER_NAME =
"androidx.work.multiprocess.RemoteListenableDelegatingWorker.ARGUMENT_REMOTE_LISTENABLE_WORKER_NAME"
- /* ktlint-enable max-line-length */
}
}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueUtils.kt b/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueUtils.kt
index fbdebe5..c2f1d2d 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueUtils.kt
+++ b/work/work-runtime/src/main/java/androidx/work/impl/utils/EnqueueUtils.kt
@@ -156,7 +156,6 @@
"androidx.work.impl.workers.RemoteListenableWorker.ARGUMENT_CLASS_NAME"
// The RemoteListenableWorker class to delegate to.
-/* ktlint-disable max-line-length */
+
internal const val ARGUMENT_REMOTE_LISTENABLE_WORKER_NAME =
"androidx.work.multiprocess.RemoteListenableDelegatingWorker.ARGUMENT_REMOTE_LISTENABLE_WORKER_NAME"
-/* ktlint-enable max-line-length */