Skip to content

Commit 1d0569d

Browse files
authored
Merge pull request #77 from tnorbye/snapshot13
Update documentation snapshot
2 parents ed91e68 + c1fcdfa commit 1d0569d

15 files changed

+346
-42
lines changed

docs/README.md.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
- [Adding Quick Fixes](api-guide/quickfixes.md.html)
4343
- [Terminology](api-guide/terminology.md.html)
4444
- [Partial analysis](api-guide/partial-analysis.md.html)
45+
- [Crafting error messages](api-guide/messages.md.html)
46+
- [Configuring detectors with options](api-guide/options.md.html)
4547
- [Frequently Asked Questions](api-guide/faq.md.html)
4648
* Documents for lint internals, intended for developers of lint
4749
itself, in the `internal` folder:
@@ -52,6 +54,8 @@
5254
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5355

5456
Documentation History:
57+
* June 2022: Added documentation for [crafting error
58+
messages](messages.md.html)
5559
* May 2022: Noticed that the document rendering
5660
was broken, such that many chapters were missing from
5761
the api-guide: "Adding Quickfixes", "Partial Analysis",

docs/api-guide/messages.md.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
should be “Unused import foo”, not “Unused import foo.”
4545

4646
However, if there are multiple sentences in the error message, all sentences
47-
should be punctuate.
47+
should be punctuated.
4848

4949
Note that there should be no space before an exclamation (!) or question mark
5050
(?) sign.
@@ -62,7 +62,7 @@
6262
cause problems as soon as the line numbers drift after edits to the file), lint
6363
matches by error message in the file, so the more unique error messages are,
6464
the better. If all unused import warnings were just “Unused import”, lint would
65-
match them in order, which often would be the wrong thing.
65+
match them in order, which often would match the wrong import.
6666

6767
## Reference Android By Number
6868

@@ -103,7 +103,6 @@
103103

104104
* [AccidentalOctal] The leading 0 turns this number into octal which is probably not what was intended (interpreted as 8)
105105
* [AdapterViewChildren] A list/grid should have no children declared in XML
106-
* [AddJavascriptInterface] \`WebView.addJavascriptInterface\` should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application
107106
* [AllCaps] Using \`textAllCaps\` with a string (\`has_markup\`) that contains markup; the markup will be dropped by the caps conversion
108107
* [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
109108
* [AlwaysShowAction] Prefer \`ifRoom\` instead of \`always\`

docs/checks/LifecycleAnnotationProcessorWithJava8.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
Here is an example of lint warnings produced by this check:
5252
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text
5353
build.gradle:3:Warning: Use the Lifecycle Java 8 API provided by the
54-
lifecycle-common-java8 library instead of Lifecycle annotations for
55-
faster incremental build. [LifecycleAnnotationProcessorWithJava8]
54+
lifecycle-common library instead of Lifecycle annotations for faster
55+
incremental build. [LifecycleAnnotationProcessorWithJava8]
5656

5757
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
5858
---------------------------------------

docs/checks/OutdatedLibrary.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454

5555

5656
build.gradle:8:Error: log4j:log4j version 1.2.12 has been marked as
57-
outdated by its author and will block publishing to Play Console
58-
[OutdatedLibrary]
57+
outdated by its author and will block publishing of your app to Play
58+
Console [OutdatedLibrary]
5959

6060
compile 'log4j:log4j:1.2.12' // OUTDATED BLOCKING
6161
--------------------
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<meta charset="utf-8">
2+
(#) Returning from awaitPointerEventScope may cause some input events to be dropped
3+
4+
!!! WARNING: Returning from awaitPointerEventScope may cause some input events to be dropped
5+
This is a warning.
6+
7+
Id
8+
: `ReturnFromAwaitPointerEventScope`
9+
Summary
10+
: Returning from awaitPointerEventScope may cause some input events to be dropped
11+
Severity
12+
: Warning
13+
Category
14+
: Correctness
15+
Platform
16+
: Any
17+
Vendor
18+
: Jetpack Compose
19+
Identifier
20+
: androidx.compose.ui
21+
Feedback
22+
: https://issuetracker.google.com/issues/new?component=612128
23+
Affects
24+
: Kotlin and Java files and test sources
25+
Editing
26+
: This check runs on the fly in the IDE editor
27+
Implementation
28+
: [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)
29+
Tests
30+
: [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)
31+
Copyright Year
32+
: 2022
33+
34+
Pointer Input events are queued inside awaitPointerEventScope. By using
35+
the return value of awaitPointerEventScope one might unexpectedly lose
36+
events. If another awaitPointerEventScope is restarted there is no
37+
guarantee that the events will persist between those calls. In this case
38+
you should keep all events inside the awaitPointerEventScope block.
39+
40+
(##) Suppressing
41+
42+
You can suppress false positives using one of the following mechanisms:
43+
44+
* Using a suppression annotation like this on the enclosing
45+
element:
46+
47+
```kt
48+
// Kotlin
49+
@Suppress("ReturnFromAwaitPointerEventScope")
50+
fun method() {
51+
awaitPointerEventScope(...)
52+
}
53+
```
54+
55+
or
56+
57+
```java
58+
// Java
59+
@SuppressWarnings("ReturnFromAwaitPointerEventScope")
60+
void method() {
61+
awaitPointerEventScope(...);
62+
}
63+
```
64+
65+
* Using a suppression comment like this on the line above:
66+
67+
```kt
68+
//noinspection ReturnFromAwaitPointerEventScope
69+
problematicStatement()
70+
```
71+
72+
* Using a special `lint.xml` file in the source tree which turns off
73+
the check in that folder and any sub folder. A simple file might look
74+
like this:
75+
```xml
76+
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
77+
&lt;lint&gt;
78+
&lt;issue id="ReturnFromAwaitPointerEventScope" severity="ignore" /&gt;
79+
&lt;/lint&gt;
80+
```
81+
Instead of `ignore` you can also change the severity here, for
82+
example from `error` to `warning`. You can find additional
83+
documentation on how to filter issues by path, regular expression and
84+
so on
85+
[here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html).
86+
87+
* In Gradle projects, using the DSL syntax to configure lint. For
88+
example, you can use something like
89+
```gradle
90+
lintOptions {
91+
disable 'ReturnFromAwaitPointerEventScope'
92+
}
93+
```
94+
In Android projects this should be nested inside an `android { }`
95+
block.
96+
97+
* For manual invocations of `lint`, using the `--ignore` flag:
98+
```
99+
$ lint --ignore ReturnFromAwaitPointerEventScope ...`
100+
```
101+
102+
* Last, but not least, using baselines, as discussed
103+
[here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html).
104+
105+
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>

docs/checks/RiskyLibrary.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050

5151
Here is an example of lint warnings produced by this check:
5252
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text
53-
build.gradle:7:Error: log4j:log4j version 1.2.13 has an associated
54-
message from its author that will block publishing to Play Console
55-
[RiskyLibrary]
53+
build.gradle:7:Error: log4j:log4j version 1.2.13 has been reported as
54+
problematic by its author and will block publishing of your app to Play
55+
Console [RiskyLibrary]
5656

5757
compile 'log4j:log4j:1.2.13' // Critical BLOCKING
5858
--------------------

0 commit comments

Comments
 (0)