Skip to content

Commit

Permalink
Add android lint baseline file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Nov 19, 2024
1 parent 8bf69f1 commit 82c9fe7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
14 changes: 5 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,16 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

lint {
baseline = file("lint-baseline.xml")
}

lintOptions {
textOutput "stdout"
checkAllWarnings true
warningsAsErrors true
disable "UnusedResources" // Unused will be removed on release
disable "IconExpectedSize" // Using the material icons provided from Google
disable "GoogleAppIndexingApiWarning" // We might want to index our app later
disable "InvalidPackage" // Butterknife, Okio and Realm
disable "ResourceType" // Annotation binding
disable "GradleDependency"
disable "NewerVersionAvailable"
disable "DuplicatePlatformClasses" // xpp3 added by azure-identity
disable "LambdaLast"
}

sourceSets {
main {
java.srcDirs = ['../src/main/java']
Expand Down
22 changes: 22 additions & 0 deletions android/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.7.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.7.2)" variant="all" version="8.7.2">

<issue
id="InvalidPackage"
message="Invalid package reference in com.azure:azure-xml; not included in Android: `javax.xml.stream`. Referenced from `com.azure.xml.XmlReader`.">
<location
file="$GRADLE_USER_HOME/caches/modules-2/files-2.1/com.azure/azure-xml/1.1.0/8218a00c07f9f66d5dc7ae2ba613da6890867497/azure-xml-1.1.0.jar"/>
</issue>

<issue
id="LambdaLast"
message="Functional interface parameters (such as parameter 1, &quot;tokenCredential&quot;, in com.microsoft.graph.core.requests.GraphClientFactory.create) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions"
errorLine1=" public static OkHttpClient.Builder create(@Nonnull final TokenCredential tokenCredential, @Nonnull final RequestOption[] requestOptions) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="${:*debug*MAIN*sourceProvider*0*javaDir*0}/com/microsoft/graph/core/requests/GraphClientFactory.java"
line="73"
column="95"/>
</issue>

</issues>

0 comments on commit 82c9fe7

Please sign in to comment.