# Конфигурация detekt для LMS. Значения подобраны под текущий стиль кода: # базовые правила включены (buildUponDefaultConfig = true), шумные отключены или ослаблены. build: maxIssues: 0 weights: {} config: validation: true warningsAsErrors: false complexity: # Пороги выставлены под реальный масштаб классов проекта. Дробление крупных # агрегатов (web ApiClient, AdminController, ContentService) — отдельная задача; # когда оно будет выполнено, пороги можно вернуть к значениям по умолчанию. LongMethod: threshold: 90 LongParameterList: functionThreshold: 8 constructorThreshold: 8 ignoreDefaultParameters: true # MVC-обработчики форм принимают набор @RequestParam — для них параметров «много» нормально. ignoreAnnotated: - 'PostMapping' - 'GetMapping' TooManyFunctions: thresholdInFiles: 80 thresholdInClasses: 80 thresholdInInterfaces: 40 thresholdInObjects: 40 thresholdInEnums: 40 LargeClass: threshold: 1400 ComplexCondition: threshold: 4 CyclomaticComplexMethod: threshold: 20 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(*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|_'