Skip to content

Commit

Permalink
feat: add dependency for detekt-formatting and add available fields t…
Browse files Browse the repository at this point in the history
…o detekt.yml file
  • Loading branch information
jesmrec authored and JuancaG05 committed Dec 2, 2024
1 parent b010fda commit 70db403
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 1 deletion.
196 changes: 195 additions & 1 deletion config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,202 @@ exceptions:
- 'RuntimeException'
- 'Throwable'

formatting:
active: false
AnnotationOnSeparateLine:
active: true
indentSize: 4
AnnotationSpacing:
active: true
ArgumentListWrapping:
active: true
indentSize: 4
maxLineLength: 120
BlockCommentInitialStarAlignment:
active: true
ChainWrapping:
active: true
indentSize: 4
ClassName:
active: false
CommentSpacing:
active: true
CommentWrapping:
active: true
indentSize: 4
ContentReceiverMapping:
active: false
maxLineLength: 120
indentSize: 4
DiscouragedCommentLocation:
active: false
EnumEntryNameCase:
active: true
EnumWrapping:
active: false
intentSize: 4
Filename:
active: true
FinalNewline:
active: true
insertFinalNewLine: true
FunKeywordSpacing:
active: true
FunctionName:
active: false
FunctionReturnTypeSpacing:
active: true
maxLineLength: 120
FunctionSignature:
active: false
forceMultilineWhenParameterCountGreaterOrEqualThan: 2147483647
functionBodyExpressionWrapping: 'default'
maxLineLength: 120
indentSize: 4
FunctionStartOfBodySpacing:
active: true
FunctionTypeReferenceSpacing:
active: true
IfElseBracing:
active: false
IfElseWrapping:
active: false
indentSize: 4
ImportOrdering:
active: true
layout: '*,java.**,javax.**,kotlin.**,^'
Indentation:
active: true
indentSize: 4
KdocWrapping:
active: true
indentSize: 4
MaximumLineLength:
active: true
maxLineLength: 120
ignoreBackTickedIdentifier: false
ModifierListSpacing:
active: true
MultiLineIfElse:
active: true
indentSize: 4
MultilineExpressionWrapping:
active: false
indentSize: 4
NoBlankLineBeforeRbrace:
active: true
NoBlankLineInList:
active: false
NoBlankLinesInChainedMethodCalls:
active: true
NoConsecutiveBlankLines:
active: true
NoConsecutiveComments:
active: false
NoEmptyClassBody:
active: true
NoEmptyFirstLineInClassBody:
active: false
indentSize: 4
NoEmptyFirstLineInMethodBlock:
active: true
NoLineBreakAfterElse:
active: true
NoLineBreakBeforeAssignment:
active: true
NoMultipleSpaces:
active: true
NoSemicolons:
active: true
NoSingleLineBlockComment:
active: false
indentSize: 4
NoTrailingSpaces:
active: true
NoUnitReturn:
active: true
NoUnusedImports:
active: true
NoWildcardImports:
active: true
packagesToUseImportOnDemandProperty: 'java.util.*,kotlinx.android.synthetic.**'
NullableTypeSpacing:
active: true
PackageName:
active: true
ParameterListSpacing:
active: false
ParameterListWrapping:
active: true
maxLineLength: 120
indentSize: 4
ParameterWrapping:
active: true
indentSize: 4
MaxLineLength: 120
PropertyName:
active: false
PropertyWrapping:
active: true
indentSize: 4
maxLineLength: 120
SpacingAroundAngleBrackets:
active: true
SpacingAroundColon:
active: true
SpacingAroundComma:
active: true
SpacingAroundCurly:
active: true
SpacingAroundDot:
active: true
SpacingAroundDoubleColon:
active: true
SpacingAroundKeyword:
active: true
SpacingAroundOperators:
active: true
SpacingAroundParens:
active: true
SpacingAroundRangeOperator:
active: true
SpacingAroundUnaryOperator:
active: true
SpacingBetweenDeclarationsWithAnnotations:
active: true
SpacingBetweenDeclarationsWithComments:
active: true
SpacingBetweenFunctionNameAndOpeningParenthesis:
active: true
StringTemplate:
active: true
StringTemplateIndent:
active: false
indentSize: 4
TrailingCommaOnCallSite:
active: false
useTrailingCommaOnCallSite: true
TrailingCommaOnDeclarationSite:
active: false
useTrailingCommaOnDeclarationSite: true
TryCatchFinallySpacing:
active: false
indentSize: 4
TypeArgumentListSpacing:
active: false
indentSize: 4
TypeParameterListSpacing:
active: false
indentSize: 4
UnnecessaryParenthesesBeforeTrailingLambda:
active: true
Wrapping:
active: true
indentSize: 4
maxLineLength: 120

libraries:
active: true
active: false
ForbiddenPublicDataClass:
active: true
ignorePackages: ['*.internal', '*.internal.*']
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ androidx-test-runner = { group = "androidx.test", name = "runner", version.ref =
androidx-test-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "androidxTestUiAutomator" }
androidx-work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "androidxWork" }
coil = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
detekt-libraries = { module = "io.gitlab.arturbosch.detekt:detekt-rules-libraries", version.ref = "detekt" }
dexopener = { group = "com.github.tmurakami", name = "dexopener", version.ref = "dexopener" }
disklrucache = { group = "com.jakewharton", name = "disklrucache", version.ref = "disklrucache" }
Expand Down
1 change: 1 addition & 0 deletions owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ dependencies {
debugImplementation libs.stetho

// Detekt
detektPlugins libs.detekt.formatting
detektPlugins libs.detekt.libraries
}

Expand Down
1 change: 1 addition & 0 deletions owncloudComLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies {
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'

// Detekt
detektPlugins libs.detekt.formatting
detektPlugins libs.detekt.libraries
}

Expand Down
1 change: 1 addition & 0 deletions owncloudData/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ dependencies {
androidTestImplementation(libs.mockk.android) { exclude module: "objenesis" }

// Detekt
detektPlugins libs.detekt.formatting
detektPlugins libs.detekt.libraries
}
1 change: 1 addition & 0 deletions owncloudDomain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ dependencies {
testImplementation libs.mockk

// Detekt
detektPlugins libs.detekt.formatting
detektPlugins libs.detekt.libraries
}
1 change: 1 addition & 0 deletions owncloudTestUtil/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ dependencies {
implementation libs.androidx.lifecycle.livedata.ktx

// Detekt
detektPlugins libs.detekt.formatting
detektPlugins libs.detekt.libraries
}

0 comments on commit 70db403

Please sign in to comment.