summaryrefslogtreecommitdiff
path: root/android-lint/src
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2022-01-18 08:20:09 -0800
committerTor Norbye <tnorbye@google.com>2022-01-21 01:27:33 +0000
commit892fd2b5a21049b2c1a59849fdd994584491ea70 (patch)
treedd5dee1e554b5344b9451ed37bdbd3059dff39b1 /android-lint/src
parentff8d544a96e2b3b90004011f6ef28daec153aeb0 (diff)
downloadidea-892fd2b5a21049b2c1a59849fdd994584491ea70.tar.gz
Register the new id is 0 lint check as an inspection
Test: In lint (this is just machine generated registration code) Bug: Not filed Change-Id: If5f63bc1e901f5da695db09a5d169c39b21e1720
Diffstat (limited to 'android-lint/src')
-rw-r--r--android-lint/src/META-INF/android-lint-plugin.xml1
-rw-r--r--android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintNotificationId0Inspection.kt24
2 files changed, 25 insertions, 0 deletions
diff --git a/android-lint/src/META-INF/android-lint-plugin.xml b/android-lint/src/META-INF/android-lint-plugin.xml
index 08f83342541..92b503e32c4 100644
--- a/android-lint/src/META-INF/android-lint-plugin.xml
+++ b/android-lint/src/META-INF/android-lint-plugin.xml
@@ -166,6 +166,7 @@
<globalInspection hasStaticDescription="true" shortName="AndroidLintLogConditional" displayName="Unconditional Logging Calls" bundle="messages.AndroidLintBundle" enabledByDefault="false" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintLogConditionalInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintLogTagMismatch" displayName="Mismatched Log Tags" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="ERROR" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintLogTagMismatchInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintLongLogTag" displayName="Too Long Log Tags" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="ERROR" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintLongLogTagInspection"/>
+ <globalInspection hasStaticDescription="true" shortName="AndroidLintNotificationId0" displayName="Notification Id is 0" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="ERROR" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintNotificationId0Inspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintNotifyDataSetChanged" displayName="Invalidating All RecyclerView Data" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintNotifyDataSetChangedInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintMangledCRLF" displayName="Mangled file line endings" bundle="messages.AndroidLintBundle" enabledByDefault="false" level="ERROR" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintMangledCRLFInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintManifestOrder" displayName="Incorrect order of elements in manifest" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintManifestOrderInspection"/>
diff --git a/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintNotificationId0Inspection.kt b/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintNotificationId0Inspection.kt
new file mode 100644
index 00000000000..2a497563132
--- /dev/null
+++ b/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintNotificationId0Inspection.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2022 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 com.android.tools.idea.lint.inspections
+
+import com.android.tools.idea.lint.common.AndroidLintInspectionBase
+import com.android.tools.lint.checks.InvalidNotificationIdDetector
+import com.android.tools.idea.lint.AndroidLintBundle.Companion.message
+
+class AndroidLintNotificationId0Inspection : AndroidLintInspectionBase(
+ message("android.lint.inspections.notification.id0"), InvalidNotificationIdDetector.ISSUE
+) \ No newline at end of file