diff --git a/build.gradle.kts b/build.gradle.kts index f83db1c1..9d66f347 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,10 @@ sdkModules.forEach { tasks.dokkaHtmlMultiModule.configure { moduleVersion = "bom-${project(":bom").property("version")}" includes.setFrom("README.md") - pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to - """{"footerMessage": "© ${LocalDate.now().year} TIDAL"}""" - )) + pluginsMapConfiguration.set( + mapOf( + "org.jetbrains.dokka.base.DokkaBase" to + """{"footerMessage": "© ${LocalDate.now().year} TIDAL"}""", + ), + ) } diff --git a/static-analysis/config/detekt-rules.yml b/static-analysis/config/detekt-rules.yml index 1a98b7a1..c5d858d7 100644 --- a/static-analysis/config/detekt-rules.yml +++ b/static-analysis/config/detekt-rules.yml @@ -18,7 +18,8 @@ exceptions: naming: FunctionNaming: ignoreAnnotated: ['Composable'] - + ConstructorParameterNaming: + excludes: ['**/catalog/**'] performance: SpreadOperator: active: false @@ -26,9 +27,20 @@ performance: style: MaxLineLength: maxLineLength: 100 - excludes: ['**/test/**', '**/androidTest/**'] + excludes: ['**/test/**', '**/androidTest/**', '**/catalog/**'] UnusedPrivateMember: ignoreAnnotated: [ 'Preview' ] + ThrowsCount: + excludes: ['**/catalog/**'] + MagicNumber: + excludes: ['**/test/**', + '**/androidTest/**','**/catalog/**'] + ForbiddenComment: + excludes: ['**/catalog/**'] + ReturnCount: + excludes: ['**/catalog/**'] + UseCheckOrError: + excludes: ['**/catalog/**'] complexity: LargeClass: @@ -36,4 +48,11 @@ complexity: LongParameterList: excludes: ['**Module.kt', '**Service.kt', '**Repository.kt', '**/test/**', '**/androidTest/**'] TooManyFunctions: - excludes: ['**Module.kt', '**Service.kt', '**Repository.kt', '**/test/**', '**/androidTest/**'] + excludes: ['**Module.kt', '**Service.kt', '**Repository.kt', '**/test/**', + '**/androidTest/**', '**/catalog/**'] + CyclomaticComplexMethod: + excludes: ['**/catalog/**'] + LongMethod: + excludes: ['**/catalog/**'] + NestedBlockDepth: + excludes: [ '**/catalog/**' ] diff --git a/static-analysis/run-ktlint.sh b/static-analysis/run-ktlint.sh index ea8472e9..707ec1e3 100755 --- a/static-analysis/run-ktlint.sh +++ b/static-analysis/run-ktlint.sh @@ -65,15 +65,16 @@ fi # Specify which files to analyze files_argument="" for i in "${input[@]}"; do - files_argument="$files_argument\"./$i\" " + files_argument="$files_argument\"./$i\" !**catalog/**" done if [ "$files_argument" == "" ]; then - files_argument="**/*.kt **/*.kts !**/build/**" + files_argument="**/*.kt **/*.kts !**/build/** !catalog/**" fi echo echo "Running ktlint..." command="$command $files_argument --experimental --reporter plain --baseline=$CONFIG_DIR/ktlint-baseline.xml" + eval "$command" echo "Done."