Files
LMS/config/detekt/detekt.yml

77 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Конфигурация detekt для LMS. Значения подобраны под текущий стиль кода:
# базовые правила включены (buildUponDefaultConfig = true), шумные отключены или ослаблены.
build:
maxIssues: 0
weights: {}
config:
validation: true
warningsAsErrors: false
complexity:
# Все правила сложности — на значениях по умолчанию: крупные агрегаты раздроблены
# (web ApiClient — по доменам, AdminController — AdminSupport + 5 контроллеров,
# импорт — ContentImporter, авторинг/порядок и оценки — отдельные сервисы,
# submissions — отдельный контроллер). Единственное ослабление — LongParameterList
# для MVC-форм (см. ниже): у обработчиков формы @RequestParam естественно много.
LongMethod:
threshold: 60
LongParameterList:
# MVC-обработчики форм принимают набор @RequestParam — параметров объективно много.
functionThreshold: 8
constructorThreshold: 8
ignoreDefaultParameters: true
ignoreAnnotated:
- 'PostMapping'
- 'GetMapping'
TooManyFunctions:
thresholdInFiles: 20
thresholdInClasses: 20
thresholdInInterfaces: 20
thresholdInObjects: 20
thresholdInEnums: 20
LargeClass:
threshold: 600
ComplexCondition:
threshold: 4
CyclomaticComplexMethod:
threshold: 15
style:
MagicNumber:
active: false
MaxLineLength:
active: false
ReturnCount:
max: 4
WildcardImport:
active: true
UnusedPrivateMember:
active: true
LoopWithTooManyJumpStatements:
maxJumpCount: 2
# MVC-контроллеры возвращают имя шаблона — это не «магическая константа».
FunctionOnlyReturningConstant:
ignoreAnnotated:
- 'GetMapping'
- 'PostMapping'
performance:
# runApplication<App>(*args) — идиоматичная точка входа Spring Boot.
SpreadOperator:
active: false
naming:
FunctionNaming:
ignoreAnnotated:
- 'Test'
MatchingDeclarationName:
active: false
# Enum-значения хранятся в БД и API строками в lowerCamelCase.
EnumNaming:
active: false
empty-blocks:
EmptyCatchBlock:
allowedExceptionNameRegex: 'ignored|expected|_'