diff --git a/docs/README.md.html b/docs/README.md.html
index 7e6916c6..dd5a4108 100644
--- a/docs/README.md.html
+++ b/docs/README.md.html
@@ -42,6 +42,8 @@
- [Adding Quick Fixes](api-guide/quickfixes.md.html)
- [Terminology](api-guide/terminology.md.html)
- [Partial analysis](api-guide/partial-analysis.md.html)
+ - [Crafting error messages](api-guide/messages.md.html)
+ - [Configuring detectors with options](api-guide/options.md.html)
- [Frequently Asked Questions](api-guide/faq.md.html)
* Documents for lint internals, intended for developers of lint
itself, in the `internal` folder:
@@ -52,6 +54,8 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Documentation History:
+* June 2022: Added documentation for [crafting error
+ messages](messages.md.html)
* May 2022: Noticed that the document rendering
was broken, such that many chapters were missing from
the api-guide: "Adding Quickfixes", "Partial Analysis",
diff --git a/docs/api-guide/messages.md.html b/docs/api-guide/messages.md.html
index a3168cc6..2267cc21 100644
--- a/docs/api-guide/messages.md.html
+++ b/docs/api-guide/messages.md.html
@@ -44,7 +44,7 @@
should be “Unused import foo”, not “Unused import foo.”
However, if there are multiple sentences in the error message, all sentences
-should be punctuate.
+should be punctuated.
Note that there should be no space before an exclamation (!) or question mark
(?) sign.
@@ -62,7 +62,7 @@
cause problems as soon as the line numbers drift after edits to the file), lint
matches by error message in the file, so the more unique error messages are,
the better. If all unused import warnings were just “Unused import”, lint would
-match them in order, which often would be the wrong thing.
+match them in order, which often would match the wrong import.
## Reference Android By Number
@@ -103,7 +103,6 @@
* [AccidentalOctal] The leading 0 turns this number into octal which is probably not what was intended (interpreted as 8)
* [AdapterViewChildren] A list/grid should have no children declared in XML
-* [AddJavascriptInterface] \`WebView.addJavascriptInterface\` should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application
* [AllCaps] Using \`textAllCaps\` with a string (\`has_markup\`) that contains markup; the markup will be dropped by the caps conversion
* [AllowAllHostnameVerifier] Using the \`AllowAllHostnameVerifier\` HostnameVerifier is unsafe because it always returns true, which could cause insecure network traffic due to trusting TLS/SSL server certificates for wrong hostnames
* [AlwaysShowAction] Prefer \`ifRoom\` instead of \`always\`
diff --git a/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html b/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html
index 2fa3851d..0d98f2c4 100644
--- a/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html
+++ b/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html
@@ -51,8 +51,8 @@
Here is an example of lint warnings produced by this check:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text
build.gradle:3:Warning: Use the Lifecycle Java 8 API provided by the
-lifecycle-common-java8 library instead of Lifecycle annotations for
-faster incremental build. [LifecycleAnnotationProcessorWithJava8]
+lifecycle-common library instead of Lifecycle annotations for faster
+incremental build. [LifecycleAnnotationProcessorWithJava8]
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
---------------------------------------
diff --git a/docs/checks/OutdatedLibrary.md.html b/docs/checks/OutdatedLibrary.md.html
index 5ec6f205..ce46a31a 100644
--- a/docs/checks/OutdatedLibrary.md.html
+++ b/docs/checks/OutdatedLibrary.md.html
@@ -54,8 +54,8 @@
build.gradle:8:Error: log4j:log4j version 1.2.12 has been marked as
-outdated by its author and will block publishing to Play Console
-[OutdatedLibrary]
+outdated by its author and will block publishing of your app to Play
+Console [OutdatedLibrary]
compile 'log4j:log4j:1.2.12' // OUTDATED BLOCKING
--------------------
diff --git a/docs/checks/ReturnFromAwaitPointerEventScope.md.html b/docs/checks/ReturnFromAwaitPointerEventScope.md.html
new file mode 100644
index 00000000..2ff67cc5
--- /dev/null
+++ b/docs/checks/ReturnFromAwaitPointerEventScope.md.html
@@ -0,0 +1,105 @@
+
+(#) Returning from awaitPointerEventScope may cause some input events to be dropped
+
+!!! WARNING: Returning from awaitPointerEventScope may cause some input events to be dropped
+ This is a warning.
+
+Id
+: `ReturnFromAwaitPointerEventScope`
+Summary
+: Returning from awaitPointerEventScope may cause some input events to be dropped
+Severity
+: Warning
+Category
+: Correctness
+Platform
+: Any
+Vendor
+: Jetpack Compose
+Identifier
+: androidx.compose.ui
+Feedback
+: https://issuetracker.google.com/issues/new?component=612128
+Affects
+: Kotlin and Java files and test sources
+Editing
+: This check runs on the fly in the IDE editor
+Implementation
+: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/ReturnFromAwaitPointerEventScopeDetector.kt)
+Tests
+: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ReturnFromAwaitPointerEventScopeDetectorTest.kt)
+Copyright Year
+: 2022
+
+Pointer Input events are queued inside awaitPointerEventScope. By using
+the return value of awaitPointerEventScope one might unexpectedly lose
+events. If another awaitPointerEventScope is restarted there is no
+guarantee that the events will persist between those calls. In this case
+you should keep all events inside the awaitPointerEventScope block.
+
+(##) Suppressing
+
+You can suppress false positives using one of the following mechanisms:
+
+* Using a suppression annotation like this on the enclosing
+ element:
+
+ ```kt
+ // Kotlin
+ @Suppress("ReturnFromAwaitPointerEventScope")
+ fun method() {
+ awaitPointerEventScope(...)
+ }
+ ```
+
+ or
+
+ ```java
+ // Java
+ @SuppressWarnings("ReturnFromAwaitPointerEventScope")
+ void method() {
+ awaitPointerEventScope(...);
+ }
+ ```
+
+* Using a suppression comment like this on the line above:
+
+ ```kt
+ //noinspection ReturnFromAwaitPointerEventScope
+ problematicStatement()
+ ```
+
+* Using a special `lint.xml` file in the source tree which turns off
+ the check in that folder and any sub folder. A simple file might look
+ like this:
+ ```xml
+ <?xml version="1.0" encoding="UTF-8"?>
+ <lint>
+ <issue id="ReturnFromAwaitPointerEventScope" severity="ignore" />
+ </lint>
+ ```
+ Instead of `ignore` you can also change the severity here, for
+ example from `error` to `warning`. You can find additional
+ documentation on how to filter issues by path, regular expression and
+ so on
+ [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html).
+
+* In Gradle projects, using the DSL syntax to configure lint. For
+ example, you can use something like
+ ```gradle
+ lintOptions {
+ disable 'ReturnFromAwaitPointerEventScope'
+ }
+ ```
+ In Android projects this should be nested inside an `android { }`
+ block.
+
+* For manual invocations of `lint`, using the `--ignore` flag:
+ ```
+ $ lint --ignore ReturnFromAwaitPointerEventScope ...`
+ ```
+
+* Last, but not least, using baselines, as discussed
+ [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html).
+
+
\ No newline at end of file
diff --git a/docs/checks/RiskyLibrary.md.html b/docs/checks/RiskyLibrary.md.html
index 702fa0b1..00b09596 100644
--- a/docs/checks/RiskyLibrary.md.html
+++ b/docs/checks/RiskyLibrary.md.html
@@ -50,9 +50,9 @@
Here is an example of lint warnings produced by this check:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text
-build.gradle:7:Error: log4j:log4j version 1.2.13 has an associated
-message from its author that will block publishing to Play Console
-[RiskyLibrary]
+build.gradle:7:Error: log4j:log4j version 1.2.13 has been reported as
+problematic by its author and will block publishing of your app to Play
+Console [RiskyLibrary]
compile 'log4j:log4j:1.2.13' // Critical BLOCKING
--------------------
diff --git a/docs/checks/UnrememberedMutableState.md.html b/docs/checks/UnrememberedMutableState.md.html
index c2d982f4..5c4b95b8 100644
--- a/docs/checks/UnrememberedMutableState.md.html
+++ b/docs/checks/UnrememberedMutableState.md.html
@@ -25,9 +25,9 @@
Editing
: This check runs on the fly in the IDE editor
Implementation
-: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/main/java/androidx/compose/runtime/lint/UnrememberedMutableStateDetector.kt)
+: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/main/java/androidx/compose/runtime/lint/UnrememberedStateDetector.kt)
Tests
-: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedMutableStateDetectorTest.kt)
+: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt)
Copyright Year
: 2020
@@ -61,126 +61,168 @@
-----------------
-src/androidx/compose/runtime/foo/{.kt:14:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:11:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:15:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:15:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:16:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:16:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:17:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
-----------------
-src/androidx/compose/runtime/foo/{.kt:20:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:18:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:22:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:21:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:23:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:22:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:24:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
-----------------
-src/androidx/compose/runtime/foo/{.kt:31:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:25:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:34:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:32:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:35:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:33:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:36:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
-----------------
-src/androidx/compose/runtime/foo/{.kt:36:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:37:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:40:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:37:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:41:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:38:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:42:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
-----------------
-src/androidx/compose/runtime/foo/{.kt:44:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:43:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:49:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:45:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:50:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:46:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:51:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
-----------------
-src/androidx/compose/runtime/foo/{.kt:50:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:52:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:56:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:51:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:57:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:52:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:58:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
@@ -188,26 +230,40 @@
src/androidx/compose/runtime/foo/{.kt:59:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
+src/androidx/compose/runtime/foo/{.kt:66:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val foo = mutableStateOf(0)
--------------
-src/androidx/compose/runtime/foo/{.kt:60:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:67:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val bar = mutableStateListOf<Int>()
------------------
-src/androidx/compose/runtime/foo/{.kt:61:Error: Creating a state object
+src/androidx/compose/runtime/foo/{.kt:68:Error: Creating a state object
during composition without using remember [UnrememberedMutableState]
val baz = mutableStateMapOf<Int, Float>()
-----------------
+src/androidx/compose/runtime/foo/{.kt:69:Error: Creating a state object
+during composition without using remember [UnrememberedMutableState]
+
+ val derived = derivedStateOf { foo.value }
+ --------------
+
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is the source file referenced above:
@@ -223,18 +279,21 @@
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
val lambda = @Composable {
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
val lambda2: @Composable () -> Unit = {
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
@Composable
@@ -246,11 +305,13 @@
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
})
LambdaParameter {
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
}
@@ -259,12 +320,14 @@
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
val localLambda2: @Composable () -> Unit = {
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
}
@@ -274,16 +337,17 @@
val foo = mutableStateOf(0)
val bar = mutableStateListOf()
val baz = mutableStateMapOf()
+ val derived = derivedStateOf { foo.value }
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can also visit the
-[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedMutableStateDetectorTest.kt)
+[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt)
for the unit tests for this check to see additional scenarios.
The above example was automatically extracted from the first unit test
-found for this lint check, `UnrememberedMutableStateDetector.notRemembered`.
+found for this lint check, `UnrememberedStateDetector.notRemembered`.
To report a problem with this extracted sample, visit
https://issuetracker.google.com/issues/new?component=612128.
@@ -298,7 +362,7 @@
// Kotlin
@Suppress("UnrememberedMutableState")
fun method() {
- mutableStateOf(...)
+ derivedStateOf(...)
}
```
@@ -308,7 +372,7 @@
// Java
@SuppressWarnings("UnrememberedMutableState")
void method() {
- mutableStateOf(...);
+ derivedStateOf(...);
}
```
diff --git a/docs/checks/UseOfNonLambdaOffsetOverload.md.html b/docs/checks/UseOfNonLambdaOffsetOverload.md.html
new file mode 100644
index 00000000..97c2098e
--- /dev/null
+++ b/docs/checks/UseOfNonLambdaOffsetOverload.md.html
@@ -0,0 +1,103 @@
+
+(#) Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.
+
+!!! WARNING: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.
+ This is a warning.
+
+Id
+: `UseOfNonLambdaOffsetOverload`
+Summary
+: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.
+Severity
+: Warning
+Category
+: Performance
+Platform
+: Any
+Vendor
+: Jetpack Compose
+Identifier
+: androidx.compose.foundation
+Feedback
+: https://issuetracker.google.com/issues/new?component=612128
+Affects
+: Kotlin and Java files and test sources
+Editing
+: This check runs on the fly in the IDE editor
+Implementation
+: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/foundation/foundation-lint/src/main/java/androidx/compose/foundation/lint/NonLambdaOffsetModifierDetector.kt)
+Tests
+: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/foundation/foundation-lint/src/test/java/androidx/compose/foundation/lint/NonLambdaOffsetModifierDetectorTest.kt)
+Copyright Year
+: 2022
+
+`Modifier.offset()` is recommended to be used with static arguments only
+to avoid unnecessary recompositions. `Modifier.offset{ }` is preferred
+in the cases where the arguments are backed by a `State`.
+
+(##) Suppressing
+
+You can suppress false positives using one of the following mechanisms:
+
+* Using a suppression annotation like this on the enclosing
+ element:
+
+ ```kt
+ // Kotlin
+ @Suppress("UseOfNonLambdaOffsetOverload")
+ fun method() {
+ offset(...)
+ }
+ ```
+
+ or
+
+ ```java
+ // Java
+ @SuppressWarnings("UseOfNonLambdaOffsetOverload")
+ void method() {
+ offset(...);
+ }
+ ```
+
+* Using a suppression comment like this on the line above:
+
+ ```kt
+ //noinspection UseOfNonLambdaOffsetOverload
+ problematicStatement()
+ ```
+
+* Using a special `lint.xml` file in the source tree which turns off
+ the check in that folder and any sub folder. A simple file might look
+ like this:
+ ```xml
+ <?xml version="1.0" encoding="UTF-8"?>
+ <lint>
+ <issue id="UseOfNonLambdaOffsetOverload" severity="ignore" />
+ </lint>
+ ```
+ Instead of `ignore` you can also change the severity here, for
+ example from `error` to `warning`. You can find additional
+ documentation on how to filter issues by path, regular expression and
+ so on
+ [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html).
+
+* In Gradle projects, using the DSL syntax to configure lint. For
+ example, you can use something like
+ ```gradle
+ lintOptions {
+ disable 'UseOfNonLambdaOffsetOverload'
+ }
+ ```
+ In Android projects this should be nested inside an `android { }`
+ block.
+
+* For manual invocations of `lint`, using the `--ignore` flag:
+ ```
+ $ lint --ignore UseOfNonLambdaOffsetOverload ...`
+ ```
+
+* Last, but not least, using baselines, as discussed
+ [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html).
+
+
\ No newline at end of file
diff --git a/docs/checks/categories.md.html b/docs/checks/categories.md.html
index 48d869cc..88d2f99b 100644
--- a/docs/checks/categories.md.html
+++ b/docs/checks/categories.md.html
@@ -3,7 +3,7 @@
Order: [Alphabetical](index.md.html) | By category | [By vendor](vendors.md.html) | [By severity](severity.md.html) | [By year](year.md.html)
-* Correctness (311)
+* Correctness (312)
- [AaptCrash: Potential AAPT crash](AaptCrash.md.html)
- [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html)
@@ -225,6 +225,7 @@
- [ResourceName: Resource with Wrong Prefix](ResourceName.md.html)
- [ResourceType: Wrong Resource Type](ResourceType.md.html)
- [RestrictedApi: Restricted API](RestrictedApi.md.html)
+ - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html)
- [ReturnThis: Method must return `this`](ReturnThis.md.html)
- [SQLiteString: Using STRING instead of TEXT](SQLiteString.md.html)
- [ScopedStorage: Affected by scoped storage](ScopedStorage.md.html)
@@ -404,7 +405,7 @@
- [PlaySdkIndexNonCompliant: Library has policy issues in SDK Index](PlaySdkIndexNonCompliant.md.html)
- [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html)
-* Performance (43)
+* Performance (44)
- [AnimatorKeep: Missing @Keep for Animated Properties](AnimatorKeep.md.html)
- [AnnotationProcessorOnCompilePath: Annotation Processor on Compile Classpath](AnnotationProcessorOnCompilePath.md.html)
@@ -440,6 +441,7 @@
- [UsableSpace: Using getUsableSpace()](UsableSpace.md.html)
- [UseCompoundDrawables: Node can be replaced by a `TextView` with compound drawables](UseCompoundDrawables.md.html)
- [UseOfBundledGooglePlayServices: Use of bundled version of Google Play services](UseOfBundledGooglePlayServices.md.html)
+ - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html)
- [UseSparseArrays: HashMap can be replaced with SparseArray](UseSparseArrays.md.html)
- [UseValueOf: Should use `valueOf` instead of `new`](UseValueOf.md.html)
- [UselessLeaf: Unnecessary leaf layout](UselessLeaf.md.html)
diff --git a/docs/checks/index.md.html b/docs/checks/index.md.html
index bd0c26da..45e44ac7 100644
--- a/docs/checks/index.md.html
+++ b/docs/checks/index.md.html
@@ -343,6 +343,7 @@
- [ResourceName: Resource with Wrong Prefix](ResourceName.md.html)
- [ResourceType: Wrong Resource Type](ResourceType.md.html)
- [RestrictedApi: Restricted API](RestrictedApi.md.html)
+ - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html)
- [ReturnThis: Method must return `this`](ReturnThis.md.html)
- [RiskyLibrary: Libraries with Privacy or Security Risks](RiskyLibrary.md.html)
- [RtlCompat: Right-to-left text compatibility issues](RtlCompat.md.html)
@@ -455,6 +456,7 @@
- [UseCompoundDrawables: Node can be replaced by a `TextView` with compound drawables](UseCompoundDrawables.md.html)
- [UseGetLayoutInflater: Use getLayoutInflater() to get the LayoutInflater instead of calling LayoutInflater.from(Context).](UseGetLayoutInflater.md.html)
- [UseOfBundledGooglePlayServices: Use of bundled version of Google Play services](UseOfBundledGooglePlayServices.md.html)
+ - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html)
- [UseRequireInsteadOfGet: Use the 'require_____()' API rather than 'get____()' API for more descriptive error messages when it's null.](UseRequireInsteadOfGet.md.html)
- [UseRxSetProgress2: `setProgress` is deprecated. Use `setCompletableProgress` instead.](UseRxSetProgress2.md.html)
- [UseSparseArrays: HashMap can be replaced with SparseArray](UseSparseArrays.md.html)
diff --git a/docs/checks/severity.md.html b/docs/checks/severity.md.html
index 90d18062..7523f0d6 100644
--- a/docs/checks/severity.md.html
+++ b/docs/checks/severity.md.html
@@ -216,7 +216,7 @@
- [WrongViewCast: Mismatched view type](WrongViewCast.md.html)
- [XmlEscapeNeeded: Missing XML Escape](XmlEscapeNeeded.md.html)
-* Warning (297)
+* Warning (299)
- [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html)
- [AdapterViewChildren: `AdapterView` cannot have children in XML](AdapterViewChildren.md.html)
@@ -405,6 +405,7 @@
- [Registered: Class is not registered in the manifest](Registered.md.html)
- [RelativeOverlap: Overlapping items in RelativeLayout](RelativeOverlap.md.html)
- [RequiresFeature: Requires Feature](RequiresFeature.md.html)
+ - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html)
- [RiskyLibrary: Libraries with Privacy or Security Risks](RiskyLibrary.md.html)
- [RtlEnabled: Using RTL attributes without enabling RTL support](RtlEnabled.md.html)
- [RtlHardcoded: Using left/right instead of start/end attributes](RtlHardcoded.md.html)
@@ -485,6 +486,7 @@
- [UseCompoundDrawables: Node can be replaced by a `TextView` with compound drawables](UseCompoundDrawables.md.html)
- [UseGetLayoutInflater: Use getLayoutInflater() to get the LayoutInflater instead of calling LayoutInflater.from(Context).](UseGetLayoutInflater.md.html)
- [UseOfBundledGooglePlayServices: Use of bundled version of Google Play services](UseOfBundledGooglePlayServices.md.html)
+ - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html)
- [UseSparseArrays: HashMap can be replaced with SparseArray](UseSparseArrays.md.html)
- [UseSupportActionBar: Should not call `Activity.setActionBar` if you extend `AppCompatActivity`](UseSupportActionBar.md.html)
- [UseSwitchCompatOrMaterialCode: Replace usage of `Switch` widget](UseSwitchCompatOrMaterialCode.md.html)
diff --git a/docs/checks/vendors.md.html b/docs/checks/vendors.md.html
index 0bef8ed8..09c517e7 100644
--- a/docs/checks/vendors.md.html
+++ b/docs/checks/vendors.md.html
@@ -528,9 +528,10 @@
- [UnrememberedAnimatable: Creating an Animatable during composition without using `remember`](UnrememberedAnimatable.md.html)
- [UnusedTransitionTargetStateParameter: Transition.animate* calls should use the provided targetState when defining values](UnusedTransitionTargetStateParameter.md.html)
-* Jetpack Compose (androidx.compose.foundation) (1)
+* Jetpack Compose (androidx.compose.foundation) (2)
- [FrequentlyChangedStateReadInComposition: Frequently changing state should not be directly read in composable function](FrequentlyChangedStateReadInComposition.md.html)
+ - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html)
* Jetpack Compose (androidx.compose.material) (2)
@@ -559,13 +560,14 @@
- [RememberSaveableSaverParameter: `Saver` objects should be passed to the saver parameter, not the vararg `inputs` parameter](RememberSaveableSaverParameter.md.html)
-* Jetpack Compose (androidx.compose.ui) (6)
+* Jetpack Compose (androidx.compose.ui) (7)
- [ComposableModifierFactory: Modifier factory functions should not be @Composable](ComposableModifierFactory.md.html)
- [ModifierFactoryExtensionFunction: Modifier factory functions should be extensions on Modifier](ModifierFactoryExtensionFunction.md.html)
- [ModifierFactoryReturnType: Modifier factory functions should return Modifier](ModifierFactoryReturnType.md.html)
- [ModifierFactoryUnreferencedReceiver: Modifier factory functions must use the receiver Modifier instance](ModifierFactoryUnreferencedReceiver.md.html)
- [ModifierParameter: Guidelines for Modifier parameters in a Composable function](ModifierParameter.md.html)
+ - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html)
- [UnnecessaryComposedModifier: Modifier.composed should only be used for modifiers that invoke @Composable functions](UnnecessaryComposedModifier.md.html)
* Jetpack Compose (androidx.compose.ui.graphics) (2)
diff --git a/docs/checks/year.md.html b/docs/checks/year.md.html
index d9eed62e..525d9306 100644
--- a/docs/checks/year.md.html
+++ b/docs/checks/year.md.html
@@ -3,7 +3,7 @@
Order: [Alphabetical](index.md.html) | [By category](categories.md.html) | [By vendor](vendors.md.html) | [By severity](severity.md.html) | By year
-* 2022 (24)
+* 2022 (26)
- [CustomPermissionTypo: Permission appears to be a custom permission with a typo](CustomPermissionTypo.md.html)
- [DeepLinkInActivityDestination: A should not be attached to an destination](DeepLinkInActivityDestination.md.html)
@@ -22,6 +22,7 @@
- [OpenForTesting: Extending API only allowed from tests](OpenForTesting.md.html)
- [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html)
- [ReservedSystemPermission: Permission name is a reserved Android permission](ReservedSystemPermission.md.html)
+ - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html)
- [ReturnThis: Method must return `this`](ReturnThis.md.html)
- [StringEscaping: Invalid string escapes](StringEscaping.md.html)
- [SystemPermissionTypo: Permission appears to be a standard permission with a typo](SystemPermissionTypo.md.html)
@@ -29,6 +30,7 @@
- [UnusedMaterial3ScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterial3ScaffoldPaddingParameter.md.html)
- [UnusedMaterialScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterialScaffoldPaddingParameter.md.html)
- [UnusedTranslation: Unused Translation](UnusedTranslation.md.html)
+ - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html)
* 2021 (44)
diff --git a/docs/internal/guidelines.md.html b/docs/internal/guidelines.md.html
index 82078ddb..ce08f536 100644
--- a/docs/internal/guidelines.md.html
+++ b/docs/internal/guidelines.md.html
@@ -151,4 +151,19 @@
a per incident basis too, so you can pick warning or error as
default based on the specific check.
+# Informational Checks
+
+Lint checks should pinpoint a problem. They are not intended to only be
+educational or to just "bring awareness" around recent changes to an API.
+Especially if the lint check cannot check whether the guidance applies, for
+example because it depends on policy approval which is not available for
+inspection in the code.
+
+A check which unconditionally flags code in order to educate users is often
+considered by users to be "spammy". We've had some checks like that in the
+past, and they were not popular, and the issue id soon ended up in default
+ignore rules for lint. For an example, see [this StackOverflow
+thread](https://stackoverflow.com/questions/34173545/missing-support-for-fireb
+ase-app-indexing-android-lint).
+
diff --git a/docs/usage/changes.md.html b/docs/usage/changes.md.html
index 4026bc0f..dc194942 100644
--- a/docs/usage/changes.md.html
+++ b/docs/usage/changes.md.html
@@ -24,6 +24,10 @@
`SquareAndRoundTilePreviews`| TileProvider does not have round and square previews
`InternalInsetResource` | Using internal inset dimension resource
+* Lint now respects the `--offline` flag passed to Gradle, and will refrain
+ from making network calls for checks that normally do (such as
+ `AppLinksAutoVerify`).
+
**7.3**
* New built-in lint-checks: