From 4d235c0a1454aa30512e7e42d90c689676b939f5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:26:09 -0400 Subject: [PATCH] Update dependency com.pinterest.ktlint:ktlint-cli to v1.3.0 (#298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | | ------------------------------------------------------------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [com.pinterest.ktlint:ktlint-cli](https://togithub.com/pinterest/ktlint) | `1.2.1` -> `1.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.pinterest.ktlint:ktlint-cli/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.pinterest.ktlint:ktlint-cli/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.pinterest.ktlint:ktlint-cli/1.2.1/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.pinterest.ktlint:ktlint-cli/1.2.1/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | *** ### Release Notes
pinterest/ktlint (com.pinterest.ktlint:ktlint-cli) ### [`v1.3.0`](https://togithub.com/pinterest/ktlint/blob/HEAD/CHANGELOG.md#130---2024-06-04) [Compare Source](https://togithub.com/pinterest/ktlint/compare/1.2.1...1.3.0) ##### 🆕 Features - Support partial formatting - [#​2631](https://togithub.com/pinterest/ktlint/pull/2631), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Suppress `property-name` rule for `ObjectPropertyName` or `PrivatePropertyName` - [#​2643](https://togithub.com/pinterest/ktlint/pull/2643), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Let API Consumer decide whether a LintError has to be autocorrected, or not - [#​2671](https://togithub.com/pinterest/ktlint/pull/2671), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Promote experimental rules to non-experimental - [#​2674](https://togithub.com/pinterest/ktlint/pull/2674), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - [binary-expression-wrapping](https://pinterest.github.io/ktlint/latest/rules/standard/#backing-property-naming) - [chain-method-continuation](https://pinterest.github.io/ktlint/latest/rules/standard/#chain-method-continuation) - [class-signature](https://pinterest.github.io/ktlint/latest/rules/standard/#class-signature) - [condition-wrapping](https://pinterest.github.io/ktlint/latest/rules/standard/#condition-wrapping) - [function-expression-body](https://pinterest.github.io/ktlint/latest/rules/standard/#function-expression-body) - [function-literal](https://pinterest.github.io/ktlint/latest/rules/standard/#function-literal) - [function-type-modifier-spacing](https://pinterest.github.io/ktlint/latest/rules/standard/#function-type-modifier-spacing) - [multiline-loop](https://pinterest.github.io/ktlint/latest/rules/standard/#multiline-loop) ##### 🔧 Fixes - Do not wrap operation reference after multiline string template - [#​2591](https://togithub.com/pinterest/ktlint/pull/2591), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Ignore max line length in case the line contains only a string template followed by a comma - [#​2598](https://togithub.com/pinterest/ktlint/pull/2598), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Ignore nested reference expressions in `chain-method-continuation` - [#​2606](https://togithub.com/pinterest/ktlint/pull/2606), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Prevent exception in `binary-expression-wrapping` rule - [#​2607](https://togithub.com/pinterest/ktlint/pull/2607), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Do not merge opening quotes of multiline string template with (single line) function signature - [#​2609](https://togithub.com/pinterest/ktlint/pull/2609), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix replacement of redundant curly braces - [#​2617](https://togithub.com/pinterest/ktlint/pull/2617), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Set and reset Locale to pass test for non-english contributor. - [#​2622](https://togithub.com/pinterest/ktlint/pull/2622), by [@​Jaehwa-Noh](https://togithub.com/Jaehwa-Noh) - Fix unwanted whitespace between super class constructor and its argument list - [#​2630](https://togithub.com/pinterest/ktlint/pull/2630), by [@​tKe](https://togithub.com/tKe) - Fix typo's - [#​2641](https://togithub.com/pinterest/ktlint/pull/2641), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Handle trailing space on preceding line in call to `lineLengthWithoutNewlinePrefix` - [#​2644](https://togithub.com/pinterest/ktlint/pull/2644), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix KDoc for RuleSetProviderV3 - [#​2645](https://togithub.com/pinterest/ktlint/pull/2645), by [@​gumimin](https://togithub.com/gumimin) - Fix not checking for spacing around binary operators inside unary expression - [#​2653](https://togithub.com/pinterest/ktlint/pull/2653), by [@​cflee](https://togithub.com/cflee) - Fix `blank line before declarations` rule code example - [#​2657](https://togithub.com/pinterest/ktlint/pull/2657), by [@​k-taro56](https://togithub.com/k-taro56) - Fixed \[{ }] notation for issue [#​2675](https://togithub.com/pinterest/ktlint/issues/2675) - [#​2677](https://togithub.com/pinterest/ktlint/pull/2677), by [@​Jolanrensen](https://togithub.com/Jolanrensen) - Simplify default properties loading - [#​2679](https://togithub.com/pinterest/ktlint/pull/2679), by [@​Goooler](https://togithub.com/Goooler) ##### 📦 Dependencies - Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.20 - [#​2590](https://togithub.com/pinterest/ktlint/pull/2590), by [@​renovate](https://togithub.com/renovate)\[bot] - Update softprops/action-gh-release action to v2 - [#​2600](https://togithub.com/pinterest/ktlint/pull/2600), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency io.github.detekt.sarif4k:sarif4k to v0.6.0 - [#​2605](https://togithub.com/pinterest/ktlint/pull/2605), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency gradle to v8.7 - [#​2616](https://togithub.com/pinterest/ktlint/pull/2616), by [@​renovate](https://togithub.com/renovate)\[bot] - Migrate to develocity plugin - [#​2625](https://togithub.com/pinterest/ktlint/pull/2625), by [@​Goooler](https://togithub.com/Goooler) - Update dependency org.slf4j:slf4j-simple to v2.0.13 - [#​2632](https://togithub.com/pinterest/ktlint/pull/2632), by [@​renovate](https://togithub.com/renovate)\[bot] - Update gradle/wrapper-validation-action action to v3 - [#​2633](https://togithub.com/pinterest/ktlint/pull/2633), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency io.github.oshai:kotlin-logging-jvm to v6.0.9 - [#​2634](https://togithub.com/pinterest/ktlint/pull/2634), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency com.github.ajalt.clikt:clikt to v4.4.0 - [#​2647](https://togithub.com/pinterest/ktlint/pull/2647), by [@​renovate](https://togithub.com/renovate)\[bot] - Update kotlin monorepo to v1.9.24 - [#​2649](https://togithub.com/pinterest/ktlint/pull/2649), by [@​renovate](https://togithub.com/renovate)\[bot] - Update plugin com.gradle.develocity to v3.17.4 - [#​2660](https://togithub.com/pinterest/ktlint/pull/2660), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency dev.drewhamilton.poko:poko-gradle-plugin to v0.15.3 - [#​2662](https://togithub.com/pinterest/ktlint/pull/2662), by [@​renovate](https://togithub.com/renovate)\[bot] - Update actions/checkout digest to [`a5ac7e5`](https://togithub.com/pinterest/ktlint/commit/a5ac7e5) - [#​2664](https://togithub.com/pinterest/ktlint/pull/2664), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency org.assertj:assertj-core to v3.26.0 - [#​2669](https://togithub.com/pinterest/ktlint/pull/2669), by [@​renovate](https://togithub.com/renovate)\[bot]
*** ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. *** - [ ] If you want to rebase/retry this PR, check this box *** This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/WhosNickDoglio/dagger-rules). - `main` - \#298 :point\_left: Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- .../detectors/ContributesBindingMustHaveSuperDetector.kt | 4 +++- .../detectors/FavorContributesBindingOverBindsDetector.kt | 4 +++- .../anvil/detectors/MissingContributesBindingDetector.kt | 4 +++- .../anvil/detectors/MissingContributesToDetector.kt | 4 +++- .../whosnickdoglio/anvil/detectors/NoAnvilInJavaDetector.kt | 4 +++- .../dagger/detectors/ComponentMustBeAbstractDetector.kt | 4 +++- .../ConstructorInjectionOverFieldInjectionDetector.kt | 4 +++- .../dagger/detectors/CorrectBindsUsageDetector.kt | 4 +++- .../dagger/detectors/MissingModuleAnnotationDetector.kt | 4 +++- .../whosnickdoglio/dagger/detectors/MultipleScopesDetector.kt | 4 +++- .../dagger/detectors/ScopedWithoutInjectAnnotationDetector.kt | 4 +++- .../whosnickdoglio/dagger/detectors/StaticProvidesDetector.kt | 4 +++- .../hilt/detectors/EntryPointMustBeAnInterfaceDetector.kt | 4 +++- .../hilt/detectors/MissingAndroidEntryPointDetector.kt | 4 +++- .../hilt/detectors/MissingHiltAndroidAppAnnotationDetector.kt | 4 +++- .../hilt/detectors/MissingHiltViewModelAnnotationDetector.kt | 4 +++- .../whosnickdoglio/hilt/detectors/MissingInstallInDetector.kt | 4 +++- 18 files changed, 52 insertions(+), 18 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index aebd414b..a5b05e73 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ agp = "8.4.1" desugar = "2.0.4" kotlin = "2.0.0" -ktlint = "1.2.1" +ktlint = "1.3.0" lint = "31.4.1" detekt = "1.23.6" kover = "0.8.0" diff --git a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/ContributesBindingMustHaveSuperDetector.kt b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/ContributesBindingMustHaveSuperDetector.kt index ec13b3ba..2ded80e2 100644 --- a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/ContributesBindingMustHaveSuperDetector.kt +++ b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/ContributesBindingMustHaveSuperDetector.kt @@ -32,7 +32,9 @@ import org.jetbrains.uast.UElement * working with a Dagger module as well as preventing the use of binding annotations with a class * with no super type. */ -internal class ContributesBindingMustHaveSuperDetector : Detector(), SourceCodeScanner { +internal class ContributesBindingMustHaveSuperDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) diff --git a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/FavorContributesBindingOverBindsDetector.kt b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/FavorContributesBindingOverBindsDetector.kt index 7d53d35e..1550f00a 100644 --- a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/FavorContributesBindingOverBindsDetector.kt +++ b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/FavorContributesBindingOverBindsDetector.kt @@ -27,7 +27,9 @@ import org.jetbrains.uast.UMethod * `@ContributesBinding` or `@ContributesMultibinding` annotations instead of using a Dagger * `@Module` to bind the implementation to an interface. */ -internal class FavorContributesBindingOverBindsDetector : Detector(), SourceCodeScanner { +internal class FavorContributesBindingOverBindsDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) diff --git a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesBindingDetector.kt b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesBindingDetector.kt index 13137e0f..90c15dda 100644 --- a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesBindingDetector.kt +++ b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesBindingDetector.kt @@ -26,7 +26,9 @@ import org.jetbrains.uast.UElement * `@ContributesBinding` or `@ContributesMultibinding` annotations for classes that use Dagger and * implement an interface or abstract class. */ -internal class MissingContributesBindingDetector : Detector(), SourceCodeScanner { +internal class MissingContributesBindingDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UClass::class.java) override fun createUastHandler(context: JavaContext): UElementHandler? { diff --git a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesToDetector.kt b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesToDetector.kt index ff159149..24045773 100644 --- a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesToDetector.kt +++ b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/MissingContributesToDetector.kt @@ -23,7 +23,9 @@ import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement // TODO make this configurable for Anvil scopes in quick fix -internal class MissingContributesToDetector : Detector(), SourceCodeScanner { +internal class MissingContributesToDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) override fun createUastHandler(context: JavaContext): UElementHandler? { diff --git a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/NoAnvilInJavaDetector.kt b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/NoAnvilInJavaDetector.kt index 0bc99139..4a63f246 100644 --- a/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/NoAnvilInJavaDetector.kt +++ b/lint/anvil/src/main/java/dev/whosnickdoglio/anvil/detectors/NoAnvilInJavaDetector.kt @@ -26,7 +26,9 @@ import dev.whosnickdoglio.anvil.MERGE_SUBCOMPONENT import org.jetbrains.uast.UAnnotation import org.jetbrains.uast.UElement -internal class NoAnvilInJavaDetector : Detector(), SourceCodeScanner { +internal class NoAnvilInJavaDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) override fun createUastHandler(context: JavaContext): UElementHandler? { diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ComponentMustBeAbstractDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ComponentMustBeAbstractDetector.kt index b3c82a3c..b6f40abb 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ComponentMustBeAbstractDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ComponentMustBeAbstractDetector.kt @@ -21,7 +21,9 @@ import org.jetbrains.uast.UAnnotation import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement -internal class ComponentMustBeAbstractDetector : Detector(), SourceCodeScanner { +internal class ComponentMustBeAbstractDetector : + Detector(), + SourceCodeScanner { private val oldClassPattern = "(object|enum\\s+class|annotation\\s+class|sealed\\s+class|data\\s+class|enum|class)" .toRegex() diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ConstructorInjectionOverFieldInjectionDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ConstructorInjectionOverFieldInjectionDetector.kt index 537ab29c..9af402ef 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ConstructorInjectionOverFieldInjectionDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ConstructorInjectionOverFieldInjectionDetector.kt @@ -22,7 +22,9 @@ import org.jetbrains.uast.UElement import org.jetbrains.uast.UField import org.jetbrains.uast.getContainingUClass -internal class ConstructorInjectionOverFieldInjectionDetector : Detector(), SourceCodeScanner { +internal class ConstructorInjectionOverFieldInjectionDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/CorrectBindsUsageDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/CorrectBindsUsageDetector.kt index 39f4710b..3a42c506 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/CorrectBindsUsageDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/CorrectBindsUsageDetector.kt @@ -24,7 +24,9 @@ import org.jetbrains.uast.UMethod * A Kotlin and Java [Detector] for Dagger that warns if the parameter of a `@Binds` method is not a * subclass of the method return type. */ -internal class CorrectBindsUsageDetector : Detector(), SourceCodeScanner { +internal class CorrectBindsUsageDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MissingModuleAnnotationDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MissingModuleAnnotationDetector.kt index 91177c04..b2983e9a 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MissingModuleAnnotationDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MissingModuleAnnotationDetector.kt @@ -23,7 +23,9 @@ import dev.whosnickdoglio.lint.shared.PROVIDES import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement -internal class MissingModuleAnnotationDetector : Detector(), SourceCodeScanner { +internal class MissingModuleAnnotationDetector : + Detector(), + SourceCodeScanner { private val daggerAnnotations = listOf(BINDS, PROVIDES, MULTIBINDS) override fun getApplicableUastTypes(): List> = listOf(UClass::class.java) diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MultipleScopesDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MultipleScopesDetector.kt index b16cf579..bb232d41 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MultipleScopesDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/MultipleScopesDetector.kt @@ -29,7 +29,9 @@ import org.jetbrains.uast.resolveToUElement * A Kotlin and Java [Detector] for Dagger that warns if there is an attempt to add an object to the * DI graph with multiple scopes. */ -internal class MultipleScopesDetector : Detector(), SourceCodeScanner { +internal class MultipleScopesDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UClass::class.java, UMethod::class.java) override fun createUastHandler(context: JavaContext): UElementHandler = diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ScopedWithoutInjectAnnotationDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ScopedWithoutInjectAnnotationDetector.kt index 72c292fd..ce4117d3 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ScopedWithoutInjectAnnotationDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/ScopedWithoutInjectAnnotationDetector.kt @@ -26,7 +26,9 @@ import org.jetbrains.uast.resolveToUElement * A Lint rule that warns if a class is annotated with any scope annotation but does not have a * `@Inject` annotation on any constructor that it will not be added to the Dagger graph. */ -internal class ScopedWithoutInjectAnnotationDetector : Detector(), SourceCodeScanner { +internal class ScopedWithoutInjectAnnotationDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UClass::class.java) override fun createUastHandler(context: JavaContext): UElementHandler = diff --git a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/StaticProvidesDetector.kt b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/StaticProvidesDetector.kt index 67bde3fe..7bcc6db1 100644 --- a/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/StaticProvidesDetector.kt +++ b/lint/dagger/src/main/java/dev/whosnickdoglio/dagger/detectors/StaticProvidesDetector.kt @@ -24,7 +24,9 @@ import org.jetbrains.uast.UElement import org.jetbrains.uast.UMethod import org.jetbrains.uast.getContainingUClass -internal class StaticProvidesDetector : Detector(), SourceCodeScanner { +internal class StaticProvidesDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UAnnotation::class.java) diff --git a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/EntryPointMustBeAnInterfaceDetector.kt b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/EntryPointMustBeAnInterfaceDetector.kt index 9b8aa5ce..c4ae8d65 100644 --- a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/EntryPointMustBeAnInterfaceDetector.kt +++ b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/EntryPointMustBeAnInterfaceDetector.kt @@ -21,7 +21,9 @@ import org.jetbrains.uast.UAnnotation import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement -internal class EntryPointMustBeAnInterfaceDetector : Detector(), SourceCodeScanner { +internal class EntryPointMustBeAnInterfaceDetector : + Detector(), + SourceCodeScanner { private val oldClassPattern = ( "(object|abstract\\s+class|enum\\s+class|annotation\\s+class|" + diff --git a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingAndroidEntryPointDetector.kt b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingAndroidEntryPointDetector.kt index c41ea220..d581f656 100644 --- a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingAndroidEntryPointDetector.kt +++ b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingAndroidEntryPointDetector.kt @@ -20,7 +20,9 @@ import dev.whosnickdoglio.lint.shared.INJECT import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement -internal class MissingAndroidEntryPointDetector : Detector(), SourceCodeScanner { +internal class MissingAndroidEntryPointDetector : + Detector(), + SourceCodeScanner { private val androidEntryPointSupers = setOf( "android.app.Activity", diff --git a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltAndroidAppAnnotationDetector.kt b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltAndroidAppAnnotationDetector.kt index aa86f9b8..1652ec87 100644 --- a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltAndroidAppAnnotationDetector.kt +++ b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltAndroidAppAnnotationDetector.kt @@ -19,7 +19,9 @@ import dev.whosnickdoglio.hilt.HILT_ANDROID_APP import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement -internal class MissingHiltAndroidAppAnnotationDetector : Detector(), SourceCodeScanner { +internal class MissingHiltAndroidAppAnnotationDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UClass::class.java) override fun createUastHandler(context: JavaContext): UElementHandler = diff --git a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltViewModelAnnotationDetector.kt b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltViewModelAnnotationDetector.kt index ed3aef5a..9c6bcbc0 100644 --- a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltViewModelAnnotationDetector.kt +++ b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingHiltViewModelAnnotationDetector.kt @@ -25,7 +25,9 @@ import org.jetbrains.uast.UElement * Android components. For Hilt to work as expected the `@AndroidEntryPoint`, `@HiltViewModel` and * `@HiltAndroidApp`. */ -internal class MissingHiltViewModelAnnotationDetector : Detector(), SourceCodeScanner { +internal class MissingHiltViewModelAnnotationDetector : + Detector(), + SourceCodeScanner { override fun getApplicableUastTypes(): List> = listOf(UClass::class.java) override fun createUastHandler(context: JavaContext): UElementHandler = diff --git a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingInstallInDetector.kt b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingInstallInDetector.kt index eef1953c..9d419ae9 100644 --- a/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingInstallInDetector.kt +++ b/lint/hilt/src/main/java/dev/whosnickdoglio/hilt/detectors/MissingInstallInDetector.kt @@ -24,7 +24,9 @@ import org.jetbrains.uast.UAnnotation import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement -internal class MissingInstallInDetector : Detector(), SourceCodeScanner { +internal class MissingInstallInDetector : + Detector(), + SourceCodeScanner { private val defaultHiltComponents = setOf( "dagger.hilt.components.SingletonComponent",