feat: add slack-lint-checks
This commit is contained in:
parent
59dc6d27de
commit
53476f612b
3 changed files with 12 additions and 4 deletions
|
@ -47,11 +47,11 @@ object AndroidCommon {
|
|||
}
|
||||
project.extensions.findByType<ApplicationExtension>()?.run { lint.configureLint(project) }
|
||||
project.extensions.findByType<LibraryExtension>()?.run { lint.configureLint(project) }
|
||||
val lintDepKeys = listOf("thirdparty-compose-lints", "thirdparty-slack-lints")
|
||||
val catalog = project.extensions.getByType<VersionCatalogsExtension>()
|
||||
val libs = catalog.named("libs")
|
||||
project.dependencies.addProvider(
|
||||
"lintChecks",
|
||||
libs.findLibrary("thirdparty-compose-lints").get()
|
||||
)
|
||||
lintDepKeys.forEach { key ->
|
||||
project.dependencies.addProvider("lintChecks", libs.findLibrary(key).get())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,15 @@ object LintConfig {
|
|||
// False-positives abound due to use of ViewBinding
|
||||
disable += "UnusedIds"
|
||||
if (!isJVM) {
|
||||
// Enable compose-lint-checks' Material 2 detector
|
||||
enable += "ComposeM2Api"
|
||||
error += "ComposeM2Api"
|
||||
// slack-lint-checks' checker for deprecations is useless to me
|
||||
disable += "DeprecatedCall"
|
||||
// Hilt only does field injection for fragments
|
||||
disable += "FragmentFieldInjection"
|
||||
// Too pedantic
|
||||
disable += "ArgInFormattedQuantityStringRes"
|
||||
}
|
||||
baseline = project.file("lint-baseline.xml")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue