Skip to content

Commit

Permalink
Fix partial lint detectors not running in android_binary target (#149)
Browse files Browse the repository at this point in the history
Fixes #149
  • Loading branch information
arunkumar9t2 committed Mar 8, 2024
1 parent 1e751cf commit e4251d4
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 5 deletions.
77 changes: 73 additions & 4 deletions tests/android/binary/lint_baseline.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 8.0.2" client="" dependencies="true" name="" type="baseline" variant="all" version="8.0.2">
<issues format="6" by="lint 8.4.0-alpha09" type="baseline" client="" dependencies="true" name="" variant="all" version="8.4.0-alpha09">

<issue
id="LongLogTag"
message="The logging tag can be at most 23 characters, was 39 (SomeReallyLongTagForLintToDetectAndWarn)">
message="The logging tag can be at most 23 characters, was 39 (SomeReallyLongTagForLintToDetectAndWarn)"
errorLine1=" android.util.Log.d(&quot;SomeReallyLongTagForLintToDetectAndWarn&quot;, &quot;Log message&quot;)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="tests/android/binary/src/main/java/com/grab/test/TestActivity.kt"
line="13"/>
file="../../../../../../../tests/android/binary/src/main/java/com/grab/test/TestActivity.kt"
line="13"
column="29"/>
</issue>

<issue
id="MissingVersion"
message="Should set `android:versionCode` to specify the application version"
errorLine1="&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
errorLine2=" ~~~~~~~~">
<location
file="../../../../../../../tests/android/binary/src/main/AndroidManifest.xml"
line="1"
column="2"/>
</issue>

<issue
id="MissingVersion"
message="Should set `android:versionName` to specify the application version"
errorLine1="&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
errorLine2=" ~~~~~~~~">
<location
file="../../../../../../../tests/android/binary/src/main/AndroidManifest.xml"
line="1"
column="2"/>
</issue>

<issue
id="UnusedResources"
message="The resource `R.layout.layout_test` appears to be unused"
errorLine1="&lt;layout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2="^">
<location
file="../../../../../../../tests/android/binary/src/main/res/layout/layout_test.xml"
line="2"
column="1"/>
</issue>

<issue
id="UnusedResources"
message="The resource `R.layout.layout_test` appears to be unused"
errorLine1="&lt;layout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
errorLine2="^">
<location
file="../../../../../../../tests/android/library/src/main/res/layout/layout_test.xml"
line="2"
column="1"/>
</issue>

<issue
id="UnusedResources"
message="The resource `R.string.un_used_resource` appears to be unused"
errorLine1=" &lt;string name=&quot;un_used_resource&quot;>Unused resource&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../../../../../../tests/android/library/src/main/res/values/strings.xml"
line="2"
column="13"/>
</issue>

<issue
id="MissingApplicationIcon"
message="Should explicitly set `android:icon`, there is no default"
errorLine1=" &lt;application android:label=&quot;@string/app_name&quot;>"
errorLine2=" ~~~~~~~~~~~">
<location
file="../../../../../../../tests/android/binary/src/main/AndroidManifest.xml"
line="4"
column="6"/>
</issue>

</issues>
2 changes: 1 addition & 1 deletion tools/lint/src/main/java/com/grab/lint/LintBaseCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class LintBaseCommand : CliktCommand() {
protected val library: Boolean by option(
"-l",
"--library",
).flag(default = true)
).flag(default = false)

protected val srcs by option(
"-s",
Expand Down

0 comments on commit e4251d4

Please sign in to comment.