Skip to content

Commit

Permalink
Update all non-major dependencies (except core Kotlin) (#1279)
Browse files Browse the repository at this point in the history
* 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 <peter.trifanov@mail.ru>
  • Loading branch information
renovate[bot] and petertrr committed Jun 1, 2022
1 parent 2e185d6 commit d7810d6
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 156 deletions.
142 changes: 5 additions & 137 deletions detekt-config.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -512,7 +381,6 @@ potential-bugs:
LateinitUsage:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludeAnnotatedProperties: []
ignoreOnClassesPattern: ''
MapGetWithNotNullAssertionOperator:
active: false
Expand Down Expand Up @@ -594,7 +462,7 @@ style:
ignoreOverridableFunction: true
ignoreActualFunction: true
excludedFunctions: 'describeContents'
excludeAnnotatedFunction: ['dagger.Provides']
ignoreAnnotated: ['dagger.Provides']
LibraryCodeMustSpecifyReturnType:
active: true
excludes: ['**']
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -709,7 +577,6 @@ style:
active: false
UseDataClass:
active: false
excludeAnnotatedClasses: []
allowVars: false
UseEmptyCounterpart:
active: true
Expand All @@ -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']
excludeImports: ['org.cqfn.diktat.ruleset.utils.*', 'java.util.*', 'kotlinx.android.synthetic.*', 'kotlinx.serialization']
Expand Up @@ -17,7 +17,7 @@ class DummyWarning(configRules: List<RulesConfig>) : DiktatRule(
Warnings.FILE_NAME_MATCH_CLASS
)
) {
@Suppress("UNUSED")
@Suppress("UNUSED", "VarCouldBeVal")
private lateinit var filePath: String

@Suppress("EmptyFunctionBlock")
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -219,7 +219,7 @@ class LocalVariablesRule(configRules: List<RulesConfig>) : 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",
Expand Down
Expand Up @@ -36,7 +36,7 @@ class KotlinParser {
(transaction as PomTransactionBase).run()
}

@Suppress("UNCHECKED_CAST")
@Suppress("UNCHECKED_CAST", "SpreadOperator")
override fun <T : PomModelAspect> getModelAspect(aspect: Class<T>): T? {
if (aspect == TreeAspect::class.java) {
val constructor = ReflectionFactory.getReflectionFactory().newConstructorForSerialization(
Expand Down
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions pom.xml
Expand Up @@ -44,17 +44,17 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.6.21</kotlin.version>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<kotlinx.serialization.version>1.3.2</kotlinx.serialization.version>
<kotlinx.serialization.version>1.3.3</kotlinx.serialization.version>
<ktlint.version>0.45.2</ktlint.version>
<junit.version>5.8.2</junit.version>
<guava.version>31.0.1-jre</guava.version>
<guava.version>31.1-jre</guava.version>
<slf4j.version>1.7.36</slf4j.version>
<commons-cli.version>1.5.0</commons-cli.version>
<diktat-check.version>1.1.0</diktat-check.version>
<kotlinpoet.version>1.10.0</kotlinpoet.version>
<detekt.version>1.19.1</detekt.version>
<dokka.version>1.6.10</dokka.version>
<jacoco.version>0.8.7</jacoco.version>
<kotlinpoet.version>1.11.0</kotlinpoet.version>
<detekt.version>1.20.0</detekt.version>
<dokka.version>1.6.21</dokka.version>
<jacoco.version>0.8.8</jacoco.version>
<maven-plugin-tools.version>3.6.4</maven-plugin-tools.version>
<jbool.version>1.23</jbool.version>
<log4j.version>2.17.2</log4j.version>
Expand Down Expand Up @@ -148,7 +148,7 @@
<dependency>
<groupId>com.charleskorn.kaml</groupId>
<artifactId>kaml-jvm</artifactId>
<version>0.43.0</version>
<version>0.44.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -198,7 +198,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.22.0</version>
<version>3.23.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand All @@ -222,7 +222,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -254,7 +254,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -264,12 +264,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M6</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.10.0</version>
<version>2.11.0</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
Expand Down Expand Up @@ -316,7 +316,7 @@
<plugin>
<groupId>com.rudikershaw.gitbuildhook</groupId>
<artifactId>git-build-hook-maven-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<configuration>
<installHooks>
<!-- The location of a git hook to install into the default hooks directory. -->
Expand Down Expand Up @@ -456,7 +456,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
7 changes: 7 additions & 0 deletions renovate.json
Expand Up @@ -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": [
Expand Down

0 comments on commit d7810d6

Please sign in to comment.