Skip to content

Commit

Permalink
[Maintenance] detekt config (#21)
Browse files Browse the repository at this point in the history
- rules added and reordered
  • Loading branch information
GrzegorzBobryk authored Aug 19, 2024
1 parent 3b46746 commit fa73daf
Showing 1 changed file with 75 additions and 32 deletions.
107 changes: 75 additions & 32 deletions config/detekt.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
coroutines:
GlobalCoroutineUsage:
active: true
RedundantSuspendModifier:
active: true
SuspendFunWithCoroutineScopeReceiver:
active: true
SuspendFunWithFlowReturnType:
active: true
exceptions:
ObjectExtendsThrowable:
active: true
formatting:
# https://detekt.dev/docs/rules/formatting/#maximumlinelength
# docks are saying to keep MaxLineLength or MaximumLineLength but it is not working this way.
Expand All @@ -10,52 +22,109 @@ formatting:
ArgumentListWrapping:
active: true
maxLineLength: 130
TrailingCommaOnCallSite:
EnumEntryNameCase:
active: true
TrailingCommaOnDeclarationSite:
EnumWrapping:
active: true
IfElseBracing:
active: true
ParameterListSpacing:
active: true
PropertyName:
active: true
TrailingCommaOnCallSite:
active: true
TrailingCommaOnDeclarationSite:
active: true
TryCatchFinallySpacing:
active: true
TypeArgumentListSpacing:
active: true
TypeParameterListSpacing:
active: true
naming:
BooleanPropertyNaming:
active: true
allowedPattern: '^(is|has|are|should|can)'
ForbiddenClassName:
active: true
forbiddenName:
- Helper
NonBooleanPropertyPrefixedWithIs:
active: true
performance:
CouldBeSequence:
active: true
potential-bugs:
CastToNullableType:
active: true
DontDowncastCollectionTypes:
active: true
ElseCaseInsteadOfExhaustiveWhen:
active: true
MissingPackageDeclaration:
active: true
NullableToStringCall:
active: true
NullCheckOnMutableProperty:
active: true
PropertyUsedBeforeDeclaration:
active: true
UnconditionalJumpStatementInLoop:
active: true
UnnecessaryNotNullCheck:
active: true
style:
MaxLineLength:
active: true
maxLineLength: 130
excludeRawStrings: true
AlsoCouldBeApply:
active: true
MandatoryBracesIfStatements:
BracesOnIfStatements:
active: true
singleLine: 'consistent'
multiLine: 'always'
BracesOnWhenStatements:
active: true
consistent: true
singleLine: 'necessary'
multiLine: 'necessary'
CanBeNonNullable:
active: true
ClassOrdering:
active: true
CollapsibleIfStatements:
active: true
DoubleNegativeLambda:
active: true
EqualsOnSignatureLine:
active: true
ExplicitCollectionElementAccessMethod:
active: true
ExpressionBodySyntax:
active: true
ForbiddenAnnotation:
active: true
MandatoryBracesLoops:
active: true
NewLineAtEndOfFile:
active: true
NoTabs:
active: true
NullableBooleanCheck:
active: true
OptionalUnit:
active: true
RedundantVisibilityModifierRule:
active: true
SpacingBetweenPackageAndImports:
active: true
TrailingWhitespace:
active: true
UnderscoresInNumericLiterals:
active: true
UnnecessaryAnnotationUseSiteTarget:
active: true
UnnecessaryBackticks:
active: true
UnnecessaryBracesAroundTrailingLambda:
Expand All @@ -70,33 +139,7 @@ style:
active: true
UseIfEmptyOrIfBlank:
active: true
UseSumOfInsteadOfFlatMapSize:
active: true
coroutines:
GlobalCoroutineUsage:
active: true
RedundantSuspendModifier:
active: true
SuspendFunWithCoroutineScopeReceiver:
active: true
SuspendFunWithFlowReturnType:
UseIfInsteadOfWhen:
active: true
exceptions:
ObjectExtendsThrowable:
active: true
performance:
CouldBeSequence:
active: true
potential-bugs:
CastToNullableType:
active: true
ElseCaseInsteadOfExhaustiveWhen:
active: true
MissingPackageDeclaration:
active: true
NullCheckOnMutableProperty:
active: true
PropertyUsedBeforeDeclaration:
active: true
UnnecessaryNotNullCheck:
UseSumOfInsteadOfFlatMapSize:
active: true

0 comments on commit fa73daf

Please sign in to comment.