Skip to content

Commit

Permalink
Set lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubuid committed Jul 16, 2024
1 parent d062897 commit 15c0af7
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci_android_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Fetch Properties File
env:
SECRETS_PROPERTIES: ${{ secrets.SECRETS_PROPERTIES }}
run: echo $SECRETS_PROPERTIES | base64 --decode > secrets.properties

- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand Down
6 changes: 6 additions & 0 deletions core/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ android {
}
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions core/modal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro")
}
}
lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
7 changes: 7 additions & 0 deletions product/walletconnectmodal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro")
}
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions product/web3modal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro")
}
}
lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions product/web3wallet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro", "${projectDir}/web3wallet-rules.pro")
}
}
lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
7 changes: 7 additions & 0 deletions protocol/auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ android {
targetCompatibility = jvmVersion
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}


kotlinOptions {
jvmTarget = jvmVersion.toString()
}
Expand Down
6 changes: 6 additions & 0 deletions protocol/chat/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro")
}
}
lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions protocol/notify/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro")
}
}
lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions protocol/sign/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ android {
}
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package com.walletconnect.sign.common.validator

import android.annotation.SuppressLint
import com.walletconnect.android.internal.common.model.Namespace
import com.walletconnect.android.internal.common.model.RelayProtocolOptions
import com.walletconnect.android.internal.common.model.SymmetricKey
Expand Down Expand Up @@ -211,7 +212,8 @@ internal object SignValidator {
return true
}

private fun allEventsWithChains(namespaces: Map<String, Namespace>): Map<String, List<String>> {
@SuppressLint("SuspiciousIndentation")
private fun allEventsWithChains(namespaces: Map<String, Namespace>): Map<String, List<String>> {
val eventsByChains = mutableMapOf<String, MutableList<String>>()
namespaces
.filter { (namespaceKey, namespace) -> isNamespaceRegexCompliant(namespaceKey) && namespace.chains != null }
Expand Down
6 changes: 6 additions & 0 deletions sample/dapp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ android {
buildConfigField("String", "BOM_VERSION", "\"${BOM_VERSION ?: ""}\"")
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions sample/modal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ android {
buildConfigField("String", "BOM_VERSION", "\"${BOM_VERSION}\"")
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down
6 changes: 6 additions & 0 deletions sample/wallet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ android {
buildConfigField("String", "BOM_VERSION", "\"${BOM_VERSION}\"")
}

lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}

compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
Expand Down

0 comments on commit 15c0af7

Please sign in to comment.