Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maintenance] detekt config #21

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading