From d7810d6c70ba3a8e4cd0c5f47bdd51a91e5936e2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 08:30:12 +0000 Subject: [PATCH] Update all non-major dependencies (except core Kotlin) (#1279) * Update all non-major dependencies (except core Kotlin) * Ignore broken versions of nexus-staging-maven-plugin * Fix compilation * Update detekt-config.yml * Fix detekt findings * Fix diktat findings Co-authored-by: Peter Trifanov --- detekt-config.yml | 142 +----------------- .../cqfn/diktat/ruleset/dummy/DummyWarning.kt | 2 +- .../diktat/ruleset/generation/Generation.kt | 2 +- .../identifiers/LocalVariablesRule.kt | 2 +- .../cqfn/diktat/ruleset/utils/KotlinParser.kt | 2 +- .../framework/processing/TestCheckWarn.kt | 8 +- pom.xml | 28 ++-- renovate.json | 7 + 8 files changed, 37 insertions(+), 156 deletions(-) diff --git a/detekt-config.yml b/detekt-config.yml index 6be27bd630..031a75e8cf 100644 --- a/detekt-config.yml +++ b/detekt-config.yml @@ -241,137 +241,6 @@ exceptions: - Throwable - RuntimeException -formatting: - active: true - android: false - autoCorrect: true - AnnotationOnSeparateLine: - active: false - autoCorrect: true - AnnotationSpacing: - active: true - autoCorrect: true - ArgumentListWrapping: - active: true - autoCorrect: true - ChainWrapping: - active: true - autoCorrect: true - CommentSpacing: - active: true - autoCorrect: true - EnumEntryNameCase: - active: false - autoCorrect: true - Filename: - active: true - FinalNewline: - active: true - autoCorrect: true - insertFinalNewLine: true - ImportOrdering: - active: false - autoCorrect: true - layout: 'idea' - Indentation: - active: false - autoCorrect: true - indentSize: 4 - continuationIndentSize: 4 - MaximumLineLength: - active: true - maxLineLength: 180 - ModifierOrdering: - active: true - autoCorrect: true - MultiLineIfElse: - active: true - autoCorrect: true - NoBlankLineBeforeRbrace: - active: true - autoCorrect: true - NoConsecutiveBlankLines: - active: true - autoCorrect: true - NoEmptyClassBody: - active: true - autoCorrect: true - NoEmptyFirstLineInMethodBlock: - active: false - autoCorrect: true - NoLineBreakAfterElse: - active: true - autoCorrect: true - NoLineBreakBeforeAssignment: - active: true - autoCorrect: true - NoMultipleSpaces: - active: true - autoCorrect: true - NoSemicolons: - active: true - autoCorrect: true - NoTrailingSpaces: - active: true - autoCorrect: true - NoUnitReturn: - active: true - autoCorrect: true - NoUnusedImports: - active: true - autoCorrect: true - NoWildcardImports: - active: true - PackageName: - active: true - autoCorrect: true - ParameterListWrapping: - active: true - autoCorrect: true - indentSize: 4 - SpacingAroundAngleBrackets: - active: true - autoCorrect: true - SpacingAroundColon: - active: true - autoCorrect: true - SpacingAroundComma: - active: true - autoCorrect: true - SpacingAroundCurly: - active: true - autoCorrect: true - SpacingAroundDot: - active: true - autoCorrect: true - SpacingAroundDoubleColon: - active: false - autoCorrect: true - SpacingAroundKeyword: - active: true - autoCorrect: true - SpacingAroundOperators: - active: true - autoCorrect: true - SpacingAroundParens: - active: true - autoCorrect: true - SpacingAroundRangeOperator: - active: true - autoCorrect: true - SpacingAroundUnaryOperator: - active: true - autoCorrect: true - SpacingBetweenDeclarationsWithAnnotations: - active: false - autoCorrect: true - SpacingBetweenDeclarationsWithComments: - active: false - autoCorrect: true - StringTemplate: - active: true - autoCorrect: true - naming: active: true ClassNaming: @@ -512,7 +381,6 @@ potential-bugs: LateinitUsage: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - excludeAnnotatedProperties: [] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: active: false @@ -594,7 +462,7 @@ style: ignoreOverridableFunction: true ignoreActualFunction: true excludedFunctions: 'describeContents' - excludeAnnotatedFunction: ['dagger.Provides'] + ignoreAnnotated: ['dagger.Provides'] LibraryCodeMustSpecifyReturnType: active: true excludes: ['**'] @@ -676,10 +544,10 @@ style: active: false UnderscoresInNumericLiterals: active: false - acceptableDecimalLength: 5 + acceptableLength: 5 UnnecessaryAbstractClass: active: true - excludeAnnotatedClasses: ['dagger.Module'] + ignoreAnnotated: ['dagger.Module'] UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: @@ -709,7 +577,6 @@ style: active: false UseDataClass: active: false - excludeAnnotatedClasses: [] allowVars: false UseEmptyCounterpart: active: true @@ -731,7 +598,8 @@ style: active: true VarCouldBeVal: active: true + ignoreAnnotated: ['org.apache.maven.plugins.annotations.Parameter'] WildcardImport: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - excludeImports: ['org.cqfn.diktat.ruleset.utils.*', 'java.util.*', 'kotlinx.android.synthetic.*', 'kotlinx.serialization'] \ No newline at end of file + excludeImports: ['org.cqfn.diktat.ruleset.utils.*', 'java.util.*', 'kotlinx.android.synthetic.*', 'kotlinx.serialization'] diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/dummy/DummyWarning.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/dummy/DummyWarning.kt index d1383a5446..93c26348e9 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/dummy/DummyWarning.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/dummy/DummyWarning.kt @@ -17,7 +17,7 @@ class DummyWarning(configRules: List) : DiktatRule( Warnings.FILE_NAME_MATCH_CLASS ) ) { - @Suppress("UNUSED") + @Suppress("UNUSED", "VarCouldBeVal") private lateinit var filePath: String @Suppress("EmptyFunctionBlock") diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/generation/Generation.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/generation/Generation.kt index 1648a7a66b..a922613087 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/generation/Generation.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/generation/Generation.kt @@ -56,7 +56,7 @@ private fun generateWarningNames() { .builder("generated", "WarningNames") .addType(fileBody) .indent(" ") - .addComment(autoGenerationComment) + .addFileComment(autoGenerationComment) .build() kotlinFile.writeTo(Paths.get("diktat-rules/src/main/kotlin")) // fixme: need to add it to pom diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt index 79deb89351..71c2b2e9ff 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt @@ -219,7 +219,7 @@ class LocalVariablesRule(configRules: List) : DiktatRule( companion object { const val NAME_ID = "abc-local-variables" - private var functionInitializers = listOf( + private val functionInitializers = listOf( "emptyList", "emptySet", "emptyMap", "emptyArray", "emptySequence", "listOf", "setOf", "mapOf", "arrayOf", "arrayListOf", "mutableListOf", "mutableSetOf", "mutableMapOf", diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt index e71655b9c2..fd881767c1 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt @@ -36,7 +36,7 @@ class KotlinParser { (transaction as PomTransactionBase).run() } - @Suppress("UNCHECKED_CAST") + @Suppress("UNCHECKED_CAST", "SpreadOperator") override fun getModelAspect(aspect: Class): T? { if (aspect == TreeAspect::class.java) { val constructor = ReflectionFactory.getReflectionFactory().newConstructorForSerialization( diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt b/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt index 76a31d50a3..bc3fe6aabe 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt +++ b/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt @@ -9,7 +9,13 @@ import org.slf4j.LoggerFactory */ class TestCheckWarn : TestCompare() { @Suppress("MISSING_KDOC_CLASS_ELEMENTS") override val log: Logger = LoggerFactory.getLogger(TestCheckWarn::class.java) - @Suppress("UnusedPrivateMember", "UNUSED") private var testConfig: TestConfig? = null + + @Suppress( + "UnusedPrivateMember", + "UNUSED", + "VarCouldBeVal" + ) + private var testConfig: TestConfig? = null /** * Get tests execution result diff --git a/pom.xml b/pom.xml index 7ff179d234..4db848fbbf 100644 --- a/pom.xml +++ b/pom.xml @@ -44,17 +44,17 @@ UTF-8 1.6.21 true - 1.3.2 + 1.3.3 0.45.2 5.8.2 - 31.0.1-jre + 31.1-jre 1.7.36 1.5.0 1.1.0 - 1.10.0 - 1.19.1 - 1.6.10 - 0.8.7 + 1.11.0 + 1.20.0 + 1.6.21 + 0.8.8 3.6.4 1.23 2.17.2 @@ -148,7 +148,7 @@ com.charleskorn.kaml kaml-jvm - 0.43.0 + 0.44.0 com.google.guava @@ -198,7 +198,7 @@ org.assertj assertj-core - 3.22.0 + 3.23.1 org.mockito @@ -222,7 +222,7 @@ org.apache.maven.plugins maven-clean-plugin - 3.1.0 + 3.2.0 org.apache.maven.plugins @@ -254,7 +254,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M6 org.apache.maven.plugins @@ -264,12 +264,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M5 + 3.0.0-M6 org.codehaus.mojo versions-maven-plugin - 2.10.0 + 2.11.0 false @@ -316,7 +316,7 @@ com.rudikershaw.gitbuildhook git-build-hook-maven-plugin - 3.1.0 + 3.2.0 @@ -456,7 +456,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.0 + 3.2.1 attach-sources diff --git a/renovate.json b/renovate.json index a0742c244b..daad2e2cab 100644 --- a/renovate.json +++ b/renovate.json @@ -41,6 +41,13 @@ "groupName": "Ktlint", "groupSlug": "ktlint" }, + { + "managers": ["maven"], + "matchPackageNames": [ + "org.sonatype.plugins:nexus-staging-maven-plugin" + ], + "allowedVersions": "<= 1.6.8 || > 1.6.13" + }, { "managers": ["gradle"], "matchPackagePatterns": [