From 3cc6aabe11c4689bbcc680025d679dff66d0f8f1 Mon Sep 17 00:00:00 2001 From: Vlad Loukiantchenko Date: Wed, 6 Jul 2022 11:16:06 -0400 Subject: [PATCH] Migration to Kotlin 1.7 and other latest dependencies --- buildSrc/src/main/kotlin/CoreVersions.kt | 16 +- capsa-core/build.gradle.kts | 4 +- capsa-perfrunner/build.gradle.kts | 4 +- detekt.yml | 464 +++++++++++++---------- settings.gradle.kts | 10 +- 5 files changed, 283 insertions(+), 215 deletions(-) diff --git a/buildSrc/src/main/kotlin/CoreVersions.kt b/buildSrc/src/main/kotlin/CoreVersions.kt index 628bbfb..b9b91aa 100644 --- a/buildSrc/src/main/kotlin/CoreVersions.kt +++ b/buildSrc/src/main/kotlin/CoreVersions.kt @@ -2,14 +2,18 @@ object CoreVersion { const val ASSERTK_JVM = "0.25" - const val GUAVA = "31.0.1-jre" + const val GUAVA = "31.1-jre" const val JAVA_HAMCREST = "2.0.0.0" + const val JAVA_JWT = "4.0.0" const val JAXB_API = "2.3.1" - const val JAXB_IMPL = "3.0.2" - const val JMETER = "5.4.3" + const val JAXB_IMPL = "4.0.0" + const val JMETER = "5.5" const val JMETER_JPGC_CASUTG = "2.10" - const val OPENAPI = "1.6.3" + const val OPENAPI = "1.6.9" const val REACTOR_BOM = "Californium-RELEASE" - const val WIREMOCK_JRE8 = "2.32.0" - const val SPRING_MAIL = "5.5.12" + const val SPRING_CLOUD_FW = "3.2.6" + const val SPRING_MAIL = "5.5.13" + const val WIREMOCK_JRE8 = "2.33.2" + const val SWG_VLD_WIREMOCK = "2.28.2" + const val COMMONS_IO = "2.11.0" } \ No newline at end of file diff --git a/capsa-core/build.gradle.kts b/capsa-core/build.gradle.kts index 6b4b96c..220fb9d 100644 --- a/capsa-core/build.gradle.kts +++ b/capsa-core/build.gradle.kts @@ -1,9 +1,9 @@ dependencies { - implementation("com.atlassian.oai:swagger-request-validator-wiremock:2.18.1") + implementation("com.atlassian.oai:swagger-request-validator-wiremock:${CoreVersion.SWG_VLD_WIREMOCK}") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation("org.springdoc:springdoc-openapi-ui") - implementation("com.auth0:java-jwt:3.15.0") + implementation("com.auth0:java-jwt:${CoreVersion.JAVA_JWT}") testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/capsa-perfrunner/build.gradle.kts b/capsa-perfrunner/build.gradle.kts index a4ab5e3..bae6956 100644 --- a/capsa-perfrunner/build.gradle.kts +++ b/capsa-perfrunner/build.gradle.kts @@ -4,10 +4,10 @@ dependencies { implementation("org.junit.platform:junit-platform-launcher") implementation("org.springframework.boot:spring-boot-starter-test") implementation("org.springframework.ws:spring-ws-core") - implementation("org.springframework.cloud:spring-cloud-function-web:3.1.5") + implementation("org.springframework.cloud:spring-cloud-function-web:${CoreVersion.SPRING_CLOUD_FW}") implementation("org.apache.jmeter:ApacheJMeter_http") implementation("kg.apc:jmeter-plugins-casutg") - implementation("commons-io:commons-io:2.11.0") + implementation("commons-io:commons-io:${CoreVersion.COMMONS_IO}") implementation("com.willowtreeapps.assertk:assertk-jvm") implementation(project(":capsa-it")) } diff --git a/detekt.yml b/detekt.yml index 90c394e..9d779b5 100644 --- a/detekt.yml +++ b/detekt.yml @@ -9,6 +9,7 @@ build: config: validation: true + warningsAsErrors: false # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' excludes: '' @@ -16,11 +17,18 @@ processors: active: true exclude: - 'DetektProgressListener' + # - 'KtFileCountProcessor' + # - 'PackageCountProcessor' + # - 'ClassCountProcessor' # - 'FunctionCountProcessor' # - 'PropertyCountProcessor' - # - 'ClassCountProcessor' - # - 'PackageCountProcessor' - # - 'KtFileCountProcessor' + # - 'ProjectComplexityProcessor' + # - 'ProjectCognitiveComplexityProcessor' + # - 'ProjectLLOCProcessor' + # - 'ProjectCLOCProcessor' + # - 'ProjectLOCProcessor' + # - 'ProjectSLOCProcessor' + # - 'LicenseHeaderLoaderExtension' console-reports: active: true @@ -28,32 +36,54 @@ console-reports: - 'ProjectStatisticsReport' - 'ComplexityReport' - 'NotificationReport' - # - 'FindingsReport' + - 'FindingsReport' - 'FileBasedFindingsReport' + # - 'LiteFindingsReport' + +output-reports: + active: true + exclude: + # - 'TxtOutputReport' + # - 'XmlOutputReport' + # - 'HtmlOutputReport' + # - 'MdOutputReport' comments: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] AbsentOrWrongFileLicense: active: false licenseTemplateFile: 'license.template' + licenseTemplateIsRegex: false CommentOverPrivateFunction: active: false CommentOverPrivateProperty: active: false + DeprecatedBlockTag: + active: false EndOfSentenceFormat: active: false endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' + KDocReferencesNonPublicProperty: + active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] + OutdatedDocumentation: + active: false + matchTypeParameters: true + matchDeclarationsOrder: true + allowParamOnConstructorProperties: false UndocumentedPublicClass: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] searchInNestedClass: true searchInInnerClass: true searchInInnerObject: true searchInInnerInterface: true UndocumentedPublicFunction: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UndocumentedPublicProperty: active: false + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] complexity: active: true @@ -71,7 +101,16 @@ complexity: ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false - nestingFunctions: [ run, let, apply, with, also, use, forEach, isNotNull, ifNull ] + nestingFunctions: + - 'also' + - 'apply' + - 'forEach' + - 'isNotNull' + - 'ifNull' + - 'let' + - 'run' + - 'use' + - 'with' LabeledExpression: active: false ignoredLabels: [ ] @@ -87,13 +126,28 @@ complexity: constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true - ignoreAnnotated: [ ] + ignoreAnnotatedParameter: [ ] MethodOverloading: active: false threshold: 6 + NamedArguments: + active: false + threshold: 3 + ignoreArgumentsMatchingNames: false NestedBlockDepth: active: true threshold: 4 + NestedScopeFunctions: + active: false + threshold: 1 + functions: + - 'kotlin.apply' + - 'kotlin.run' + - 'kotlin.with' + - 'kotlin.let' + - 'kotlin.also' + ReplaceSafeCallChainWithRun: + active: false StringLiteralDuplication: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] @@ -117,8 +171,20 @@ coroutines: active: true GlobalCoroutineUsage: active: false + InjectDispatcher: + active: true + dispatcherNames: + - 'IO' + - 'Default' + - 'Unconfined' RedundantSuspendModifier: + active: true + SleepInsteadOfDelay: + active: true + SuspendFunWithCoroutineScopeReceiver: active: false + SuspendFunWithFlowReturnType: + active: true empty-blocks: active: true @@ -158,259 +224,150 @@ empty-blocks: exceptions: active: true ExceptionRaisedInUnexpectedLocation: - active: false - methodNames: [ toString, hashCode, equals, finalize ] + active: true + methodNames: + - 'equals' + - 'finalize' + - 'hashCode' + - 'toString' InstanceOfCheckForException: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] NotImplementedDeclaration: active: false - PrintStackTrace: + ObjectExtendsThrowable: active: false + PrintStackTrace: + active: true RethrowCaughtException: - active: false + active: true ReturnFromFinally: - active: false + active: true ignoreLabeled: false SwallowedException: - active: false + active: true ignoredExceptionTypes: - - InterruptedException - - NumberFormatException - - ParseException - - MalformedURLException + - 'InterruptedException' + - 'MalformedURLException' + - 'NumberFormatException' + - 'ParseException' allowedExceptionNameRegex: '_|(ignore|expected).*' ThrowingExceptionFromFinally: - active: false + active: true ThrowingExceptionInMain: active: false ThrowingExceptionsWithoutMessageOrCause: - active: false + active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] exceptions: - - IllegalArgumentException - - IllegalStateException - - IOException + - 'ArrayIndexOutOfBoundsException' + - 'Exception' + - 'IllegalArgumentException' + - 'IllegalMonitorStateException' + - 'IllegalStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' ThrowingNewInstanceOfSameException: - active: false + active: true TooGenericExceptionCaught: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] exceptionNames: - - ArrayIndexOutOfBoundsException - - Error - - Exception - - IllegalMonitorStateException - - NullPointerException - - IndexOutOfBoundsException - - RuntimeException - - Throwable + - 'ArrayIndexOutOfBoundsException' + - 'Error' + - 'Exception' + - 'IllegalMonitorStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' allowedExceptionNameRegex: '_|(ignore|expected).*' TooGenericExceptionThrown: active: true exceptionNames: - - Error - - Exception - - Throwable - - RuntimeException - -formatting: - active: true - android: false - autoCorrect: true - AnnotationOnSeparateLine: - active: false - 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: 120 - 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 - 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 - SpacingBetweenDeclarationsWithAnnotations: - active: false - autoCorrect: true - SpacingBetweenDeclarationsWithComments: - active: false - autoCorrect: true - StringTemplate: - active: true - autoCorrect: true + - 'Error' + - 'Exception' + - 'RuntimeException' + - 'Throwable' naming: active: true + BooleanPropertyNaming: + active: false + allowedPattern: '^(is|has|are)' + ignoreOverridden: true ClassNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] classPattern: '[A-Z][a-zA-Z0-9]*' ConstructorParameterNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] parameterPattern: '[a-z][A-Za-z0-9]*' privateParameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true EnumNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' ForbiddenClassName: active: false - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] forbiddenName: [ ] FunctionMaxLength: active: false - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumFunctionNameLength: 30 FunctionMinLength: active: false - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] minimumFunctionNameLength: 3 FunctionNaming: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)' + functionPattern: '[a-z][a-zA-Z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true - ignoreAnnotated: [ 'Composable' ] FunctionParameterNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] parameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' ignoreOverridden: true InvalidPackageDeclaration: - active: false + active: true rootPackage: '' + requireRootInDeclaration: false + LambdaParameterNaming: + active: false + parameterPattern: '[a-z][A-Za-z0-9]*|_' MatchingDeclarationName: active: true mustBeFirst: true MemberNameEqualsClassName: active: true ignoreOverridden: true + NoNameShadowing: + active: true + NonBooleanPropertyPrefixedWithIs: + active: false ObjectPropertyNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] constantPattern: '[A-Za-z][_A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' PackageNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] constantPattern: '[A-Z][_A-Z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: active: false - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumVariableNameLength: 64 VariableMinLength: active: false - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] minimumVariableNameLength: 1 VariableNaming: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] variablePattern: '[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' @@ -420,6 +377,9 @@ performance: active: true ArrayPrimitive: active: true + CouldBeSequence: + active: false + threshold: 3 ForEachOnRange: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] @@ -431,24 +391,52 @@ performance: potential-bugs: active: true + AvoidReferentialEquality: + active: true + forbiddenTypePatterns: + - 'kotlin.String' + CastToNullableType: + active: false Deprecation: active: false + DontDowncastCollectionTypes: + active: false + DoubleMutabilityForCollection: + active: true + mutableTypes: + - 'kotlin.collections.MutableList' + - 'kotlin.collections.MutableMap' + - 'kotlin.collections.MutableSet' + - 'java.util.ArrayList' + - 'java.util.LinkedHashSet' + - 'java.util.HashSet' + - 'java.util.LinkedHashMap' + - 'java.util.HashMap' DuplicateCaseInWhenExpression: active: true + ElseCaseInsteadOfExhaustiveWhen: + active: false EqualsAlwaysReturnsTrueOrFalse: active: true EqualsWithHashCodeExist: active: true + ExitOutsideMain: + active: false ExplicitGarbageCollectionCall: active: true HasPlatformType: - active: false + active: true IgnoredReturnValue: - active: false + active: true restrictToAnnotatedMethods: true - returnValueAnnotations: [ '*.CheckReturnValue', '*.CheckResult' ] + returnValueAnnotations: + - '*.CheckResult' + - '*.CheckReturnValue' + ignoreReturnValueAnnotations: + - '*.CanIgnoreReturnValue' + ignoreFunctionCall: [ ] ImplicitDefaultLocale: - active: false + active: true ImplicitUnitReturnType: active: false allowExplicitReturnType: true @@ -461,33 +449,52 @@ potential-bugs: LateinitUsage: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - excludeAnnotatedProperties: [ ] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: + active: true + MissingPackageDeclaration: active: false + excludes: [ '**/*.kts' ] MissingWhenCase: active: true + allowElseExpression: true + NullCheckOnMutableProperty: + active: false + NullableToStringCall: + active: false RedundantElseInWhen: active: true UnconditionalJumpStatementInLoop: active: false UnnecessaryNotNullOperator: - active: false + active: true UnnecessarySafeCall: - active: false + active: true + UnreachableCatchBlock: + active: true UnreachableCode: active: true UnsafeCallOnNullableType: active: true + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] UnsafeCast: - active: false + active: true + UnusedUnaryOperator: + active: true UselessPostfixExpression: - active: false + active: true WrongEqualsTypeParameter: active: true style: active: true + CanBeNonNullable: + active: false + CascadingCallWrapping: + active: false + includeElvis: true + ClassOrdering: + active: false CollapsibleIfStatements: active: false DataClassContainsFunctions: @@ -495,6 +502,9 @@ style: conversionFunctionPrefix: 'to' DataClassShouldBeImmutable: active: false + DestructuringDeclarationWithTooManyEntries: + active: true + maxDestructuringEntries: 3 EqualsNullCall: active: true EqualsOnSignatureLine: @@ -502,42 +512,62 @@ style: ExplicitCollectionElementAccessMethod: active: false ExplicitItLambdaParameter: - active: false + active: true ExpressionBodySyntax: active: false includeLineWrapping: false ForbiddenComment: active: true - values: [ 'TODO:', 'FIXME:', 'STOPSHIP:' ] + values: + - 'FIXME:' + - 'STOPSHIP:' + - 'TODO:' allowedPatterns: '' + customMessage: '' ForbiddenImport: active: false imports: [ ] forbiddenPatterns: '' ForbiddenMethodCall: active: false - methods: [ 'kotlin.io.println', 'kotlin.io.print' ] + methods: + - 'kotlin.io.print' + - 'kotlin.io.println' ForbiddenPublicDataClass: + active: true + excludes: [ '**' ] + ignorePackages: + - '*.internal' + - '*.internal.*' + ForbiddenSuppress: active: false - ignorePackages: [ '*.internal', '*.internal.*' ] + rules: [ ] ForbiddenVoid: - active: false + active: true ignoreOverridden: false ignoreUsageInGenerics: false FunctionOnlyReturningConstant: active: true ignoreOverridableFunction: true - excludedFunctions: 'describeContents' - excludeAnnotatedFunction: [ 'dagger.Provides' ] + ignoreActualFunction: true + excludedFunctions: '' LibraryCodeMustSpecifyReturnType: active: true + excludes: [ '**' ] + LibraryEntitiesShouldNotBePublic: + active: true + excludes: [ '**' ] LoopWithTooManyJumpStatements: active: true maxJumpCount: 1 MagicNumber: active: true - excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - ignoreNumbers: [ '-1', '0', '1', '2' ] + excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts' ] + ignoreNumbers: + - '-1' + - '0' + - '1' + - '2' ignoreHashCodeFunction: true ignorePropertyDeclaration: false ignoreLocalVariableDeclaration: false @@ -547,10 +577,14 @@ style: ignoreNamedArgument: true ignoreEnums: false ignoreRanges: false + ignoreExtensionFunctions: true MandatoryBracesIfStatements: active: false MandatoryBracesLoops: active: false + MaxChainedCallsOnSameLine: + active: false + maxChainedCalls: 5 MaxLineLength: active: true maxLineLength: 120 @@ -561,12 +595,18 @@ style: active: true ModifierOrder: active: true - NestedClassesVisibility: + MultilineLambdaItParameter: active: false + NestedClassesVisibility: + active: true NewLineAtEndOfFile: active: true NoTabs: active: false + NullableBooleanCheck: + active: false + ObjectLiteralToLambda: + active: true OptionalAbstractKeyword: active: true OptionalUnit: @@ -579,6 +619,8 @@ style: active: true RedundantExplicitType: active: false + RedundantHigherOrderMapUsage: + active: true RedundantVisibilityModifierRule: active: false ReturnCount: @@ -591,26 +633,33 @@ style: SafeCast: active: true SerialVersionUIDInSerializableClass: - active: false + active: true SpacingBetweenPackageAndImports: active: false ThrowsCount: active: true max: 2 + excludeGuardClauses: false TrailingWhitespace: active: false UnderscoresInNumericLiterals: active: false - acceptableDecimalLength: 5 + acceptableLength: 4 + allowNonStandardGrouping: false UnnecessaryAbstractClass: active: true - excludeAnnotatedClasses: [ 'dagger.Module' ] UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: + active: true + UnnecessaryBackticks: active: false + UnnecessaryFilter: + active: true UnnecessaryInheritance: active: true + UnnecessaryInnerClass: + active: false UnnecessaryLet: active: false UnnecessaryParentheses: @@ -622,27 +671,42 @@ style: UnusedPrivateClass: active: true UnusedPrivateMember: - active: false + active: true allowedNames: '(_|ignored|expected|serialVersionUID)' + UseAnyOrNoneInsteadOfFind: + active: true UseArrayLiteralsInAnnotations: - active: false + active: true + UseCheckNotNull: + active: true UseCheckOrError: - active: false + active: true UseDataClass: active: false - excludeAnnotatedClasses: [ ] allowVars: false + UseEmptyCounterpart: + active: false + UseIfEmptyOrIfBlank: + active: false UseIfInsteadOfWhen: active: false + UseIsNullOrEmpty: + active: true + UseOrEmpty: + active: true UseRequire: - active: false + active: true + UseRequireNotNull: + active: true UselessCallOnNotNull: active: true UtilityClassWithPublicConstructor: active: true VarCouldBeVal: - active: false + active: true + ignoreLateinitVar: false WildcardImport: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - excludeImports: [ 'java.util.*', 'kotlinx.android.synthetic.*' ] \ No newline at end of file + excludeImports: + - 'java.util.*' \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 07b959b..1b831fc 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,10 +1,10 @@ pluginManagement { val gradlePluginVersion = object { - val SPRING_BOOT_GRADLE_VERSION = "2.6.2" - val SPRING_DEPENDENCY_MANAGEMENT_VERSION = "1.0.11.RELEASE" - val KOTLIN_GRADLE_VERSION = "1.6.10" - val DETEKT_VERSION = "1.19.0" - val GRADLE_ENTERPRISE_VERSION = "3.8" + val SPRING_BOOT_GRADLE_VERSION = "2.7.0" + val SPRING_DEPENDENCY_MANAGEMENT_VERSION = "1.0.12.RELEASE" + val KOTLIN_GRADLE_VERSION = "1.7.0" + val DETEKT_VERSION = "1.21.0-RC2" + val GRADLE_ENTERPRISE_VERSION = "3.8.1" val MOOWORK_VERSION = "1.3.1" } plugins {