Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Lint 31.4.0 alphas + improve repo infra #227

Merged
merged 10 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ org.gradle.configureondemand=true
org.gradle.caching=true
org.gradle.configuration-cache=true

android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,\
android.experimental.lint.missingBaselineIsEmptyBaseline
android.experimental.lint.missingBaselineIsEmptyBaseline=true
Comment on lines +24 to +26
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂


# Versioning bits
GROUP=com.slack.lint
POM_URL=https://github.com/slackhq/slack-lints/
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ jdk = "21"
# lint checks must target JDK 17, but the runtime should remain 11
lintJvmTarget = "17"
runtimeJvmTarget = "11"
lint = "31.3.0-rc01"
lint = "31.4.0-alpha07"

[plugins]
buildConfig = { id = "com.github.gmazzo.buildconfig", version = "5.3.5" }
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.5" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.10" }
lint = { id = "com.android.lint", version = "8.2.2" }
lint = { id = "com.android.lint", version = "8.4.0-alpha07" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version = "1.9.22-1.0.17" }
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.27.0" }
Expand Down
2 changes: 2 additions & 0 deletions slack-lint-checks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ val shade: Configuration = configurations.maybeCreate("compileShaded")

configurations.getByName("compileOnly").extendsFrom(shade)

tasks.test { maxParallelForks = Runtime.getRuntime().availableProcessors() * 2 }

dependencies {
compileOnly(libs.bundles.lintApi)
ksp(libs.autoService.ksp)
Expand Down
310 changes: 34 additions & 276 deletions slack-lint-checks/lint-baseline.xml

Large diffs are not rendered by default.

104 changes: 0 additions & 104 deletions slack-lint-checks/src/main/java/slack/lint/InjectWithUsageDetector.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class MoshiUsageDetector : Detector(), SourceCodeScanner {
// and we choose to ignore it in that case.
// This can sometimes come back as the default empty String and sometimes as null if not
// defined
val generatorExpression = jsonClassAnnotation.findAttributeValue("generator")
val generatorExpression = jsonClassAnnotation.findDeclaredAttributeValue("generator")
val generator = generatorExpression?.evaluate() as? String
if (generator != null) {
if (generator.isBlank()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class SlackIssueRegistry : IssueRegistry() {
add(ErrorProneDoNotMockDetector.ISSUE)
addAll(MoshiUsageDetector.issues())
addAll(FragmentDaggerFieldInjectionDetector.issues)
addAll(InjectWithUsageDetector.ISSUES)
addAll(RedactedUsageDetector.ISSUES)
add(InjectInJavaDetector.ISSUE)
add(RetrofitUsageDetector.ISSUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class RetrofitUsageDetector : Detector(), SourceCodeScanner {
}

val hasPath =
(httpAnnotation.findAttributeValue("value")?.evaluate() as? String)?.isNotBlank() ?: false
(httpAnnotation.findDeclaredAttributeValue("value")?.evaluate() as? String)?.isNotBlank()
?: false

var hasBodyParam = false
var hasFieldParams = false
Expand Down

This file was deleted.

Loading