Self-add Compose lint ownership
Test: N/A
Change-Id: I594a09c253999d9bd56e02b5d1050d28febea5ae
diff --git a/buildSrc/OWNERS b/buildSrc/OWNERS
index e866ad4..ec63c9a 100644
--- a/buildSrc/OWNERS
+++ b/buildSrc/OWNERS
@@ -6,3 +6,4 @@
per-file *AndroidXPlaygroundRootPlugin.kt = dustinlam@google.com, rahulrav@google.com, yboyar@google.com
per-file *LintConfiguration.kt = juliamcclellan@google.com, tiem@google.com
+per-file *AndroidXComposeLintIssues.kt = anbailey@google.com, lelandr@google.com
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt
index c596da5..97382e3 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeImplPlugin.kt
@@ -148,26 +148,7 @@
// Lint tries to apply this rule to modules that do not have this lint check, so
// we disable that check too
disable.add("UnknownIssueId")
- error.add("ComposableNaming")
- error.add("ComposableLambdaParameterNaming")
- error.add("ComposableLambdaParameterPosition")
- error.add("CompositionLocalNaming")
- error.add("ComposableModifierFactory")
- error.add("AutoboxingStateCreation")
- error.add("AutoboxingStateValueProperty")
- error.add("InvalidColorHexValue")
- error.add("MissingColorAlphaChannel")
- error.add("ModifierFactoryReturnType")
- error.add("ModifierFactoryExtensionFunction")
- error.add("ModifierNodeInspectableProperties")
- error.add("ModifierParameter")
- error.add("MutableCollectionMutableState")
- error.add("OpaqueUnitKey")
- error.add("UnnecessaryComposedModifier")
- error.add("FrequentlyChangedStateReadInComposition")
- error.add("ReturnFromAwaitPointerEventScope")
- error.add("UseOfNonLambdaOffsetOverload")
- error.add("MultipleAwaitPointerEventScopes")
+ error.addAll(ComposeLintWarningIdsToTreatAsErrors)
// Paths we want to enable ListIterator checks for - for higher level
// libraries it won't have a noticeable performance impact, and we don't want
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeLintIssues.kt b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeLintIssues.kt
new file mode 100644
index 0000000..4f039ec
--- /dev/null
+++ b/buildSrc/private/src/main/kotlin/androidx/build/AndroidXComposeLintIssues.kt
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.build
+
+/**
+ * These lint checks are normally a warning (or lower), but in AndroidX we ignore warnings in Lint.
+ * We want these errors to be reported, so they'll be promoted from a warning to an error in
+ * modules that use the [AndroidXComposeImplPlugin].
+ */
+internal val ComposeLintWarningIdsToTreatAsErrors = listOf(
+ "ComposableNaming",
+ "ComposableLambdaParameterNaming",
+ "ComposableLambdaParameterPosition",
+ "CompositionLocalNaming",
+ "ComposableModifierFactory",
+ "AutoboxingStateCreation",
+ "AutoboxingStateValueProperty",
+ "InvalidColorHexValue",
+ "MissingColorAlphaChannel",
+ "ModifierFactoryReturnType",
+ "ModifierFactoryExtensionFunction",
+ "ModifierNodeInspectableProperties",
+ "ModifierParameter",
+ "MutableCollectionMutableState",
+ "OpaqueUnitKey",
+ "UnnecessaryComposedModifier",
+ "FrequentlyChangedStateReadInComposition",
+ "ReturnFromAwaitPointerEventScope",
+ "UseOfNonLambdaOffsetOverload",
+ "MultipleAwaitPointerEventScopes",
+)
\ No newline at end of file
diff --git a/compose/lint/OWNERS b/compose/lint/OWNERS
new file mode 100644
index 0000000..a973ce0
--- /dev/null
+++ b/compose/lint/OWNERS
@@ -0,0 +1 @@
+anbailey@google.com
\ No newline at end of file