Build: enable ktlint+detekt, format sources, add core unit tests
This commit is contained in:
50
config/detekt/detekt.yml
Normal file
50
config/detekt/detekt.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
# Конфигурация detekt для LMS. Значения подобраны под текущий стиль кода:
|
||||
# базовые правила включены (buildUponDefaultConfig = true), шумные отключены или ослаблены.
|
||||
build:
|
||||
maxIssues: 0
|
||||
weights: {}
|
||||
|
||||
config:
|
||||
validation: true
|
||||
warningsAsErrors: false
|
||||
|
||||
complexity:
|
||||
LongMethod:
|
||||
threshold: 60
|
||||
LongParameterList:
|
||||
functionThreshold: 6
|
||||
constructorThreshold: 7
|
||||
ignoreDefaultParameters: true
|
||||
TooManyFunctions:
|
||||
thresholdInFiles: 20
|
||||
thresholdInClasses: 20
|
||||
thresholdInInterfaces: 20
|
||||
thresholdInObjects: 20
|
||||
thresholdInEnums: 20
|
||||
ComplexCondition:
|
||||
threshold: 4
|
||||
|
||||
style:
|
||||
MagicNumber:
|
||||
active: false
|
||||
MaxLineLength:
|
||||
active: false
|
||||
ReturnCount:
|
||||
max: 4
|
||||
WildcardImport:
|
||||
active: true
|
||||
UnusedPrivateMember:
|
||||
active: true
|
||||
LoopWithTooManyJumpStatements:
|
||||
maxJumpCount: 2
|
||||
|
||||
naming:
|
||||
FunctionNaming:
|
||||
ignoreAnnotated:
|
||||
- 'Test'
|
||||
MatchingDeclarationName:
|
||||
active: false
|
||||
|
||||
empty-blocks:
|
||||
EmptyCatchBlock:
|
||||
allowedExceptionNameRegex: 'ignored|expected|_'
|
||||
Reference in New Issue
Block a user