Skip to content

Commit

Permalink
Udpate diktat (#255)
Browse files Browse the repository at this point in the history
* Update diktat

* Remove old workaround
  • Loading branch information
illarionov authored Jan 22, 2024
1 parent 15990d5 commit 133954b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ lint/tmp/

# Mirakle
mirakle_local.properties

.android/
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import ru.pixnews.feature.calendar.model.CalendarScreenStateLoaded
import ru.pixnews.feature.calendar.model.InitialLoad
import ru.pixnews.foundation.featuretoggles.FeatureManager

@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER")
@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER", "KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT")
@ContributesViewModel
internal class CalendarViewModel(
featureManager: FeatureManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private fun FeatureTogglesComposablePreviewPopulated(

@Preview
@Composable
private fun FeatureTogglesDropdownMenu() {
private fun PreviewFeatureTogglesDropdownMenu() {
val variants = FeatureTogglePreviewFixtures.homeScreenGameCardModel.variants
PixnewsTheme {
Card(
Expand Down
10 changes: 2 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android-tools-common = "31.4.0-alpha04"
anvil = "2.4.9"
bmversions = "0.50.0"
detekt = "1.23.4"
diktat = "1.2.5"
diktat = "2.0.0"
detekt-compose-rules = "0.3.10"
dagger = "2.50"
kotlin = "1.9.22"
Expand Down Expand Up @@ -268,7 +268,7 @@ kotlin-jvm-plugin = { module = "org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jv
kotlinx-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
ksp-plugin = { group = "com.google.devtools.ksp", name = "symbol-processing-gradle-plugin", version.ref = "ksp" }
detekt-plugin = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-plugin", version.ref = "detekt" }
diktat-plugin = { group = "org.cqfn.diktat", name = "diktat-gradle-plugin", version.ref = "diktat" }
diktat-plugin = { group = "com.saveourtool.diktat", name = "diktat-gradle-plugin", version.ref = "diktat" }
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
detekt-compose-rules = { group = "io.nlopez.compose.rules", name = "detekt", version.ref = "detekt-compose-rules" }
firebase-crashlitycs-plugin = { group = "com.google.firebase", name = "firebase-crashlytics-gradle", version.ref = "firebase-crashlytics-plugin" }
Expand Down Expand Up @@ -298,17 +298,11 @@ anvil = { id = "com.squareup.anvil", version.ref = "anvil" }
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
android-test = { id = "com.android.test", version.ref = "agp" }
androidx-room = { id = "androidx.room", version.ref = "androidx-room" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics-plugin" }
fbase-options-gradle-plugin = { id = "ru.pixnews.gradle.fbase", version.ref = "fbase-gradle-plugin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
diktat = { id = "org.cqfn.diktat.diktat-gradle-plugin", version.ref = "diktat" }
kermit = { id = "co.touchlab.kermit", version.ref = "kermit" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "bmversions" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
paparazzi = { id = "app.cash.paparazzi", version.ref = "paparazzi" }
prefiller = { id = "io.github.simonschiller.prefiller", version.ref = "prefiller" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
wire = { id = "com.squareup.wire", version.ref = "wire" }
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ val detektCheck = tasks.register("detektCheck", Detekt::class) {
}
}

// https://github.com/gradle/gradle/issues/22468
if (project.name != "gradle-kotlin-dsl-accessors") {
dependencies {
detektPlugins(versionCatalog.findLibrary("detekt.formatting").get())
detektPlugins(versionCatalog.findLibrary("detekt.compose.rules").get())
}
dependencies {
detektPlugins(versionCatalog.findLibrary("detekt.formatting").get())
detektPlugins(versionCatalog.findLibrary("detekt.compose.rules").get())
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ru.pixnews.gradle.lint.excludeNonLintedDirectories
* Convention plugin that configures Diktat
*/
plugins {
id("org.cqfn.diktat.diktat-gradle-plugin")
id("com.saveourtool.diktat")
}

diktat {
Expand All @@ -20,10 +20,17 @@ diktat {
include("**/*.gradle.kts")
excludeNonLintedDirectories()
}
githubActions = false
reporters {
plain()
sarif()
}
debug = false
}

tasks.withType<org.cqfn.diktat.plugin.gradle.DiktatJavaExecTaskBase>().configureEach {
tasks.withType<com.saveourtool.diktat.plugin.gradle.tasks.DiktatTaskBase>().configureEach {
notCompatibleWithConfigurationCache("invocation of 'Task.project' at execution time is unsupported")
}

tasks.named("mergeDiktatReports").configure {
enabled = false
}
5 changes: 5 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@
<pgp value="ADBC987D1A7B91DB6B0AAA81995EFBF4A3D20BEB"/>
</artifact>
</component>
<component group="com.saveourtool.diktat" name="diktat-gradle-plugin" version="2.0.0">
<artifact name="diktat-gradle-plugin-2.0.0.jar">
<pgp value="B879179229681AD9E8D23A0812DC99973C2318FD"/>
</artifact>
</component>
<component group="com.squareup" name="javapoet" version="1.13.0">
<artifact name="javapoet-1.13.0.jar">
<pgp value="1D0A8B5E77C678A7C724445ABF984B4145EA13F7"/>
Expand Down

0 comments on commit 133954b

Please sign in to comment.