Skip to content

Commit c7f4b47

Browse files
authored
Merge pull request #55 from tnorbye/snapshot7
Update lint to latest versions of AGP.
2 parents 7c5ca62 + 95a20e4 commit c7f4b47

27 files changed

+2719
-1142
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ Scanning app: ...
113113
Wrote HTML report to file:///demo/android-custom-lint-rules/app/build/reports/lint-results-debug.html
114114
Wrote SARIF report to file:///demo/android-custom-lint-rules/app/build/reports/lint-results-debug.sarif
115115
116-
/demo/android-custom-lint-rules/app/src/main/java/com/android/example/Test.kt:8: Warning: This code mentions lint: Congratulations [ShortUniqueId]
116+
/demo/android-custom-lint-rules/app/src/main/java/com/android/example/Test.kt:8: Warning: This code mentions lint: Congratulations [SampleId]
117117
val s = "lint"
118118
~~~~
119119
120-
Explanation for issues of type "ShortUniqueId":
120+
Explanation for issues of type "SampleId":
121121
This check highlights string literals in code which mentions the word lint.
122122
Blah blah blah.
123123

app/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 30
7+
compileSdkVersion 31
88

99
defaultConfig {
1010
applicationId "com.android.example.lint_usage"
1111
minSdkVersion 21
12-
targetSdkVersion 30
12+
targetSdkVersion 31
1313
versionCode 1
1414
versionName "1.0"
1515
}
@@ -22,6 +22,7 @@ android {
2222
jvmTarget = '1.8'
2323
}
2424
lintOptions {
25+
checkDependencies true
2526
textReport true
2627

2728
// Produce report for CI:

build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
buildscript {
22
ext {
3-
kotlinVersion = '1.4.31'
3+
kotlinVersion = '1.5.30'
4+
// Current lint target: 7.0.2
5+
gradlePluginVersion = '7.0.2'
6+
lintVersion = '30.0.2'
47

5-
// Current lint target: Studio 4.2 / AGP 7
6-
//gradlePluginVersion = '4.2.0-beta05'
7-
//lintVersion = '27.2.0-beta05'
8-
9-
// Upcoming lint target: Arctic Fox / AGP 7
10-
gradlePluginVersion = '7.0.0-alpha10'
11-
lintVersion = '30.0.0-alpha10' // if gradle plugin was 4.1.2, you'd use 27.1.2 here
8+
// Upcoming lint target: Bumble Bee / AGP 7.1
9+
gradlePluginVersion = '7.1.0-alpha11'
10+
lintVersion = '30.1.0-alpha11'
1211
}
1312

1413
repositories {

checks/src/main/java/com/example/lint/checks/SampleCodeDetector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class SampleCodeDetector : Detector(), UastScanner {
6868
@JvmField
6969
val ISSUE: Issue = Issue.create(
7070
// ID: used in @SuppressLint warnings etc
71-
id = "ShortUniqueId",
71+
id = "SampleId",
7272
// Title -- shown in the IDE's preference dialog, as category headers in the
7373
// Analysis results window, etc
7474
briefDescription = "Lint Mentions",

checks/src/test/java/com/example/lint/checks/SampleCodeDetectorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SampleCodeDetectorTest {
3939
.run()
4040
.expect(
4141
"""
42-
src/test/pkg/TestClass1.java:5: Warning: This code mentions lint: Congratulations [ShortUniqueId]
42+
src/test/pkg/TestClass1.java:5: Warning: This code mentions lint: Congratulations [SampleId]
4343
private static String s2 = "Let's say it: lint";
4444
~~~~~~~~~~~~~~~~~~~~
4545
0 errors, 1 warnings

docs/README.md.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- [Publishing a Lint check](api-guide/publishing.md.html)
3939
- [Unit Testing](api-guide/unit-testing.md.html)
4040
- [Test Modes](api-guide/test-modes.md.html)
41+
- [Annotations](api-guide/annotations.md.html)
4142
- [Adding Quick Fixes](api-guide/quickfixes.md.html)
4243
- [Terminology](api-guide/terminology.md.html)
4344
- [Partial analysis](api-guide/partial-analysis.md.html)
@@ -46,10 +47,13 @@
4647
itself, in the `internal` folder:
4748
- [Guidelines](internal/guidelines.md.html)
4849
- [Generating Issue Documentation](internal/document-checks.md.html)
50+
- [Testing dev builds](internal/verify.md.html)
4951

5052
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5153

5254
Documentation History:
55+
* September 2021: Added documentation for [annotation
56+
handling](annotations.md.html)
5357
* July 2021: Added documentation for
5458
[test modes](api-guide/test-modes.md.html)
5559
* June 2021: Added documentation for the

docs/api-guide.html

Lines changed: 1648 additions & 915 deletions
Large diffs are not rendered by default.

docs/api-guide.md.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
(insert api-guide/quickfixes.md.html here)
1515
(insert api-guide/partial-analysis.md.html here)
1616
(insert api-guide/dataflow-analyzer.md.html here)
17+
(insert api-guide/annotations.md.html here)
1718
(insert api-guide/faq.md.html here)
1819

1920
# Appendix: Recent Changes

0 commit comments

Comments
 (0)