mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-04-28 18:40:19 -04:00
Update kotlin linting settings (#846)
This commit is contained in:
@@ -131,6 +131,8 @@ android {
|
||||
xmlReport true
|
||||
htmlReport true
|
||||
lintConfig file("lint.xml")
|
||||
// Focus only on app/src and exclude expo modules
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +226,20 @@ ktlint {
|
||||
task lintFixAll {
|
||||
description = "Run all auto-fixers (ktlint and Android lint)"
|
||||
group = "formatting"
|
||||
dependsOn ktlintFormat, lintFix
|
||||
dependsOn 'ktlintFormat'
|
||||
}
|
||||
|
||||
task lintAll {
|
||||
description = "Run all linting checks (ktlint and Android lint)"
|
||||
group = "formatting"
|
||||
dependsOn 'ktlintCheck'
|
||||
}
|
||||
|
||||
// Fix for expo-dev-menu lint model generation
|
||||
afterEvaluate {
|
||||
tasks.withType(com.android.build.gradle.internal.lint.LintModelWriterTask).configureEach {
|
||||
dependsOn(':expo-dev-menu:copyAssets')
|
||||
}
|
||||
}
|
||||
|
||||
// Add a task dependency to make ktlint run before build
|
||||
|
||||
@@ -42,16 +42,3 @@ allprojects {
|
||||
maven { url 'https://www.jitpack.io' }
|
||||
}
|
||||
}
|
||||
|
||||
// Configure ktlint
|
||||
ktlint {
|
||||
android = true
|
||||
verbose = true
|
||||
outputToConsole = true
|
||||
ignoreFailures = false
|
||||
enableExperimentalRules = true
|
||||
filter {
|
||||
exclude("**/generated/**")
|
||||
include("**/kotlin/**")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,12 +50,7 @@ Linting is ran automatically during normal Android app build. You can however al
|
||||
|
||||
### Kotlin
|
||||
```bash
|
||||
./gradlew ktlintCheck
|
||||
```
|
||||
|
||||
### Java
|
||||
```bash
|
||||
./gradlew lint
|
||||
./gradlew lintAll
|
||||
```
|
||||
|
||||
### Auto fix linting issues
|
||||
|
||||
Reference in New Issue
Block a user