You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
151 lines
3.5 KiB
151 lines
3.5 KiB
# Default rules: https://github.com/detekt/detekt/blob/main/detekt-core/src/main/resources/default-detekt-config.yml |
|
|
|
style: |
|
MaxLineLength: |
|
# Default is 120 |
|
maxLineLength: 160 |
|
MagicNumber: |
|
active: false |
|
ReturnCount: |
|
active: false |
|
UnnecessaryAbstractClass: |
|
active: false |
|
FunctionOnlyReturningConstant: |
|
active: false |
|
UnusedPrivateMember: |
|
# TODO Enable it |
|
active: false |
|
ThrowsCount: |
|
active: false |
|
LoopWithTooManyJumpStatements: |
|
active: false |
|
SerialVersionUIDInSerializableClass: |
|
active: false |
|
ProtectedMemberInFinalClass: |
|
active: false |
|
UseCheckOrError: |
|
active: false |
|
|
|
empty-blocks: |
|
EmptyFunctionBlock: |
|
active: false |
|
EmptySecondaryConstructor: |
|
active: false |
|
|
|
potential-bugs: |
|
ImplicitDefaultLocale: |
|
active: false |
|
|
|
exceptions: |
|
TooGenericExceptionCaught: |
|
active: false |
|
SwallowedException: |
|
active: false |
|
ThrowingExceptionsWithoutMessageOrCause: |
|
active: false |
|
TooGenericExceptionThrown: |
|
active: false |
|
InstanceOfCheckForException: |
|
active: false |
|
|
|
complexity: |
|
TooManyFunctions: |
|
active: false |
|
LongMethod: |
|
active: false |
|
LongParameterList: |
|
active: false |
|
CyclomaticComplexMethod: |
|
active: false |
|
NestedBlockDepth: |
|
active: false |
|
ComplexCondition: |
|
active: false |
|
LargeClass: |
|
active: false |
|
|
|
naming: |
|
VariableNaming: |
|
# TODO Enable it |
|
active: false |
|
TopLevelPropertyNaming: |
|
# TODO Enable it |
|
active: false |
|
FunctionNaming: |
|
active: true |
|
ignoreAnnotated: ['Composable'] |
|
|
|
performance: |
|
SpreadOperator: |
|
active: false |
|
|
|
# Note: all rules for `comments` are disabled by default, but I put them here to be aware of their existence |
|
comments: |
|
AbsentOrWrongFileLicense: |
|
active: true |
|
licenseTemplateFile: 'license.template' |
|
licenseTemplateIsRegex: true |
|
CommentOverPrivateFunction: |
|
active: false |
|
CommentOverPrivateProperty: |
|
active: false |
|
DeprecatedBlockTag: |
|
active: true |
|
EndOfSentenceFormat: |
|
active: true |
|
OutdatedDocumentation: |
|
active: true |
|
allowParamOnConstructorProperties: true |
|
UndocumentedPublicClass: |
|
active: false |
|
UndocumentedPublicFunction: |
|
active: false |
|
UndocumentedPublicProperty: |
|
active: false |
|
|
|
TwitterCompose: |
|
CompositionLocalAllowlist: |
|
active: true |
|
# You can optionally define a list of CompositionLocals that are allowed here |
|
# allowedCompositionLocals: LocalSomething,LocalSomethingElse |
|
CompositionLocalNaming: |
|
active: true |
|
ContentEmitterReturningValues: |
|
active: true |
|
# You can optionally add your own composables here |
|
# contentEmitters: MyComposable,MyOtherComposable |
|
ModifierComposable: |
|
active: true |
|
ModifierMissing: |
|
active: true |
|
ModifierReused: |
|
active: true |
|
ModifierWithoutDefault: |
|
active: true |
|
MultipleEmitters: |
|
active: true |
|
# You can optionally add your own composables here |
|
# contentEmitters: MyComposable,MyOtherComposable |
|
MutableParams: |
|
active: true |
|
ComposableNaming: |
|
active: true |
|
# You can optionally disable the checks in this rule for regex matches against the composable name (e.g. molecule presenters) |
|
# allowedComposableFunctionNames: .*Presenter,.*MoleculePresenter |
|
ComposableParamOrder: |
|
active: true |
|
PreviewNaming: |
|
active: true |
|
PreviewPublic: |
|
active: true |
|
# You can optionally disable that only previews with @PreviewParameter are flagged |
|
previewPublicOnlyIfParams: false |
|
RememberMissing: |
|
active: true |
|
UnstableCollections: |
|
active: true |
|
ViewModelForwarding: |
|
## TODO Set to true later |
|
active: false |
|
ViewModelInjection: |
|
active: true
|
|
|