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 dependency com.pinterest.ktlint:ktlint-cli to v1.3.0 #298

Merged
merged 1 commit into from
Jun 10, 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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> =
listOf(UAnnotation::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> =
listOf(UAnnotation::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UClass::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UAnnotation::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UAnnotation::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> =
listOf(UAnnotation::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> =
listOf(UAnnotation::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UClass::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UClass::class.java, UMethod::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UClass::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> =
listOf(UAnnotation::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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|" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UClass::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Class<out UElement>> = listOf(UClass::class.java)

override fun createUastHandler(context: JavaContext): UElementHandler =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading