Skip to content

Commit

Permalink
Update lint to v31.5.0-beta01 (#271)
Browse files Browse the repository at this point in the history
* Update lint to v31.5.0-beta01

* Update tests

* Spotless

* Update baseline

---------

Co-authored-by: Zac Sweers <[email protected]>
  • Loading branch information
slack-oss-bot and ZacSweers authored May 13, 2024
1 parent 7e5423e commit 11a0c08
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 36 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jdk = "21"
# lint checks must target JDK 17, but the runtime should remain 11
lintJvmTarget = "17"
runtimeJvmTarget = "11"
lint = "31.5.0-alpha07"
lint = "31.5.0-beta01"

[plugins]
buildConfig = { id = "com.github.gmazzo.buildconfig", version = "5.3.5" }
Expand Down
28 changes: 14 additions & 14 deletions slack-lint-checks/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.4.0-alpha13" type="baseline" client="gradle" dependencies="false" name="AGP (8.4.0-alpha13)" variant="all" version="8.4.0-alpha13">
<issues format="6" by="lint 8.5.0-beta01" type="baseline" client="gradle" dependencies="false" name="AGP (8.5.0-beta01)" variant="all" version="8.5.0-beta01">

<issue
id="LintDocExample"
Expand Down Expand Up @@ -52,7 +52,7 @@
errorLine2=" ^">
<location
file="src/test/java/slack/lint/MoshiUsageDetectorTest.kt"
line="2067"
line="2076"
column="3"/>
</issue>

Expand Down Expand Up @@ -129,7 +129,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/slack/lint/eithernet/DoNotExposeEitherNetInRepositoriesDetector.kt"
line="85"
line="86"
column="58"/>
</issue>

Expand All @@ -140,7 +140,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/slack/lint/eithernet/DoNotExposeEitherNetInRepositoriesDetector.kt"
line="85"
line="86"
column="24"/>
</issue>

Expand All @@ -151,7 +151,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/slack/lint/eithernet/DoNotExposeEitherNetInRepositoriesDetector.kt"
line="107"
line="108"
column="29"/>
</issue>

Expand All @@ -162,7 +162,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/slack/lint/eithernet/DoNotExposeEitherNetInRepositoriesDetector.kt"
line="109"
line="110"
column="12"/>
</issue>

Expand Down Expand Up @@ -547,7 +547,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="85"
line="90"
column="16"/>
</issue>

Expand All @@ -558,7 +558,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="135"
line="140"
column="16"/>
</issue>

Expand All @@ -569,7 +569,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="205"
line="210"
column="16"/>
</issue>

Expand All @@ -580,7 +580,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="266"
line="271"
column="16"/>
</issue>

Expand All @@ -591,7 +591,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="322"
line="327"
column="16"/>
</issue>

Expand All @@ -602,7 +602,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="372"
line="377"
column="16"/>
</issue>

Expand All @@ -613,7 +613,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="457"
line="462"
column="16"/>
</issue>

Expand All @@ -624,7 +624,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt"
line="507"
line="512"
column="16"/>
</issue>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ class ArgInFormattedQuantityStringResDetectorTest : BaseSlackLintTest() {
)
.run()
.expect(
("src/com/slack/lint/Foo.kt:7: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]\n" +
" val s = res.getQuantityString(0, 3, 3, \"asdf\")\n" +
" ~\n" +
"src/com/slack/lint/Foo.kt:7: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]\n" +
" val s = res.getQuantityString(0, 3, 3, \"asdf\")\n" +
" ~~~~\n" +
"0 errors, 2 warnings\n")
"""
src/com/slack/lint/Foo.kt:7: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]
val s = res.getQuantityString(0, 3, 3, "asdf")
~
src/com/slack/lint/Foo.kt:7: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]
val s = res.getQuantityString(0, 3, 3, "asdf")
~~~~~~
0 errors, 2 warnings
"""
.trimIndent()
)
}

Expand Down Expand Up @@ -195,10 +198,13 @@ class ArgInFormattedQuantityStringResDetectorTest : BaseSlackLintTest() {
)
.run()
.expect(
"src/com/slack/lint/Foo.kt:8: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]\n" +
" val s = res.getQuantityString(0, 3, getFormattedCount(), \"asdf\")\n" +
" ~~~~\n" +
"0 errors, 1 warnings\n"
"""
src/com/slack/lint/Foo.kt:8: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]
val s = res.getQuantityString(0, 3, getFormattedCount(), "asdf")
~~~~~~
0 errors, 1 warnings
"""
.trimIndent()
)
}

Expand Down Expand Up @@ -229,10 +235,13 @@ class ArgInFormattedQuantityStringResDetectorTest : BaseSlackLintTest() {
)
.run()
.expect(
"src/com/slack/lint/Foo.kt:7: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]\n" +
" val s = res.getQuantityString(0, 3, LocalizationUtils.getFormattedCount(), \"asdf\")\n" +
" ~~~~\n" +
"0 errors, 1 warnings\n"
"""
src/com/slack/lint/Foo.kt:7: Warning: This may require a localized count modifier. If so, use LocalizationUtils.getFormattedCount(). Consult #plz-localization if you are unsure. [ArgInFormattedQuantityStringRes]
val s = res.getQuantityString(0, 3, LocalizationUtils.getFormattedCount(), "asdf")
~~~~~~
0 errors, 1 warnings
"""
.trimIndent()
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ class MoshiEnumUsageDetectorTest : BaseSlackLintTest() {
"""
src/slack/model/TestEnum.kt:9: Error: Don't use blank names in @Json. [MoshiUsageBlankJsonName]
@Json(name = " ") TEST
~
~~~
1 errors, 0 warnings
"""
.trimIndent()
Expand Down Expand Up @@ -943,7 +943,7 @@ class MoshiEnumUsageDetectorTest : BaseSlackLintTest() {
"""
src/slack/model/Example.kt:9: Warning: Json.name with the same value as the property/enum member name is redundant. [MoshiUsageRedundantJsonName]
@Json(name = "VALUE") VALUE
~~~~~
~~~~~~~
0 errors, 1 warnings
"""
.trimIndent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class MoshiUsageDetectorTest : BaseSlackLintTest() {
"""
src/slack/model/BaseType.kt:5: Error: Moshi-sealed requires a type label specified after the 'sealed:' prefix. [MoshiUsageBlankTypeLabel]
@JsonClass(generateAdapter = true, generator = "sealed:")
~~~~~~~
~~~~~~~~~
1 errors, 0 warnings
"""
.trimIndent()
Expand Down Expand Up @@ -512,7 +512,7 @@ class MoshiUsageDetectorTest : BaseSlackLintTest() {
"""
src/slack/model/Example.kt:5: Error: Don't use blank JsonClass.generator values. [MoshiUsageBlankGenerator]
@JsonClass(generateAdapter = true, generator = " ")
~
~~~
1 errors, 0 warnings
"""
.trimIndent()
Expand Down Expand Up @@ -772,7 +772,7 @@ class MoshiUsageDetectorTest : BaseSlackLintTest() {
"""
src/slack/model/Example.kt:7: Error: Don't use blank names in @Json. [MoshiUsageBlankJsonName]
data class Example(@Json(name = " ") val value: String)
~
~~~
1 errors, 0 warnings
"""
.trimIndent()
Expand Down Expand Up @@ -1936,7 +1936,7 @@ class MoshiUsageDetectorTest : BaseSlackLintTest() {
"""
src/slack/model/Example.kt:7: Warning: Json.name with the same value as the property/enum member name is redundant. [MoshiUsageRedundantJsonName]
data class Example(@Json(name = "value") val value: String)
~~~~~
~~~~~~~
0 errors, 1 warnings
"""
.trimIndent()
Expand Down

0 comments on commit 11a0c08

Please sign in to comment.