Skip to content

Commit a1cddca

Browse files
authored
Merge pull request #70 from tnorbye/snapshot13
Update documentation snapshot
2 parents d63e0e8 + fa4765f commit a1cddca

27 files changed

+363
-245
lines changed

docs/api-guide/basics.md.html

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

3232
### API Stability
3333

34-
Lint's APIs are still marked as @Beta, and we have made it very clear
35-
all along that this is not a stable API, so custom lint checks may need
36-
to be updated periodically to keep working.
34+
Lint's APIs are not stable, and a large part of Lint's API surface is
35+
not under our control (such as UAST and PSI). Therefore, custom lint
36+
checks may need to be updated periodically to keep working.
3737

3838
However, ”some APIs are more stable than others“. In particular, the
3939
detector API (described below) is much less likely to change than the

docs/api-guide/changes.md.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
annotations in source form (until now, this only worked if the files
2020
were provided as binary class files)
2121

22+
* String replacement quickfixes can now be configured with a list of
23+
imports to be performed when the fix is applied. This can be used to
24+
for example import Kotlin extension functions needed by the
25+
replacement string. (You should not use this for normal imports;
26+
instead, the replacement string should use fully qualified names
27+
everywhere along with the `shortenNames` property on the fix, and
28+
then lint will rewrite and import all symbols that can be done
29+
without conflicts.)
30+
2231
**7.2**
2332

2433
* There is now a way to register “options” for detectors. These are

docs/api-guide/quickfixes.md.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,21 @@
129129
with simple names because there is a conflicting import of the same
130130
name from a different package.
131131

132+
Normally, you should write your replacement source code using fully
133+
qualified names, and then apply `shortenNames` to the quickfix to
134+
tell lint to replace fully qualified names with imports; don't try
135+
to write your quickfix to also add the import statements on its
136+
own. There's a possibility that a given name cannot be imported
137+
because it's already importing the same name for a different
138+
namespace. When using fully qualified names, lint will specifically
139+
handle this.
140+
141+
In some cases you cannot use fully qualified names in the code
142+
snippet; this is the case with Kotlin extension functions for
143+
example. For that scenario, the replacement quickfix has an
144+
`imports` property you can use to specify methods (and classes and
145+
fields) to import at the same time.
146+
132147
* `fix().annotate`: Annotating an element. This will add (or optionally
133148
replace) an annotation on a source element such as a method. It will
134149
also handle import management.

docs/checks/BadConfigurationProvider.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
Platform
1818
: Android
1919
Vendor
20-
: Android Open Source Project (androidx.work.lint.workmanager)
20+
: Android Open Source Project
2121
Identifier
22-
: androidx.work.lint.workmanager
22+
: androidx.work
2323
Feedback
24-
: https://issuetracker.google.com/issues/new?component=192731
24+
: https://issuetracker.google.com/issues/new?component=409906
2525
Affects
2626
: Kotlin and Java files
2727
Editing

docs/checks/BadPeriodicWorkRequestEnqueue.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
Platform
1616
: Android
1717
Vendor
18-
: Android Open Source Project (androidx.work.lint.workmanager)
18+
: Android Open Source Project
1919
Identifier
20-
: androidx.work.lint.workmanager
20+
: androidx.work
2121
Feedback
22-
: https://issuetracker.google.com/issues/new?component=192731
22+
: https://issuetracker.google.com/issues/new?component=409906
2323
Affects
2424
: Kotlin and Java files
2525
Editing

docs/checks/EnsureInitializerMetadata.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
Platform
1818
: Android
1919
Vendor
20-
: Android Open Source Project (androidx.startup.lint.startupruntime)
20+
: Android Open Source Project
2121
Identifier
22-
: androidx.startup.lint.startupruntime
22+
: androidx.startup
2323
Feedback
24-
: https://issuetracker.google.com/issues/new?component=192731
24+
: https://issuetracker.google.com/issues/new?component=823348
2525
Affects
2626
: Kotlin and Java files and manifest files
2727
Editing

docs/checks/EnsureInitializerNoArgConstr.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
Platform
1818
: Android
1919
Vendor
20-
: Android Open Source Project (androidx.startup.lint.startupruntime)
20+
: Android Open Source Project
2121
Identifier
22-
: androidx.startup.lint.startupruntime
22+
: androidx.startup
2323
Feedback
24-
: https://issuetracker.google.com/issues/new?component=192731
24+
: https://issuetracker.google.com/issues/new?component=823348
2525
Affects
2626
: Kotlin and Java files
2727
Editing

docs/checks/FragmentGradleConfiguration.md.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
Platform
1616
: Android
1717
Vendor
18-
: Android Open Source Project (androidx.fragment.testing.lint.fragmenttesting)
18+
: Android Open Source Project
1919
Identifier
20-
: androidx.fragment.testing.lint.fragmenttesting
20+
: androidx.fragment.testing
2121
Feedback
22-
: https://issuetracker.google.com/issues/new?component=192731
22+
: https://issuetracker.google.com/issues/new?component=460964
2323
Affects
2424
: Gradle build files
2525
Editing
@@ -68,7 +68,7 @@
6868
The above example was automatically extracted from the first unit test
6969
found for this lint check, `GradleConfigurationDetector.expectFail`.
7070
To report a problem with this extracted sample, visit
71-
https://issuetracker.google.com/issues/new?component=192731.
71+
https://issuetracker.google.com/issues/new?component=460964.
7272

7373
(##) Suppressing
7474

docs/checks/IdleBatteryChargingConstraints.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
Platform
1616
: Android
1717
Vendor
18-
: Android Open Source Project (androidx.work.lint.workmanager)
18+
: Android Open Source Project
1919
Identifier
20-
: androidx.work.lint.workmanager
20+
: androidx.work
2121
Feedback
22-
: https://issuetracker.google.com/issues/new?component=192731
22+
: https://issuetracker.google.com/issues/new?component=409906
2323
Affects
2424
: Kotlin and Java files
2525
Editing

docs/checks/InvalidPeriodicWorkRequestInterval.md.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
Platform
1818
: Android
1919
Vendor
20-
: Android Open Source Project (androidx.work.lint.workmanager)
20+
: Android Open Source Project
2121
Identifier
22-
: androidx.work.lint.workmanager
22+
: androidx.work
2323
Feedback
24-
: https://issuetracker.google.com/issues/new?component=192731
24+
: https://issuetracker.google.com/issues/new?component=409906
2525
Affects
2626
: Kotlin and Java files
2727
Editing

0 commit comments

Comments
 (0)