Refactor: split content order API; near-default detekt thresholds
This commit is contained in:
@@ -9,31 +9,35 @@ config:
|
||||
warningsAsErrors: false
|
||||
|
||||
complexity:
|
||||
# Пороги выставлены под реальный масштаб классов проекта. Дробление крупных
|
||||
# агрегатов (web ApiClient, AdminController, ContentService) — отдельная задача;
|
||||
# когда оно будет выполнено, пороги можно вернуть к значениям по умолчанию.
|
||||
# Крупные агрегаты уже раздроблены (web ApiClient — по доменам, AdminController —
|
||||
# на AdminSupport + 5 контроллеров, импорт материалов — в ContentImporter).
|
||||
# Оставшиеся послабления точечные и перечислены ниже; после дробления ContentService
|
||||
# и выноса хелперов из методов groupDetail/labDetail/editLab их можно снять.
|
||||
LongMethod:
|
||||
# groupDetail (82), labDetail (73), editLab (86) в админ-контроллерах.
|
||||
threshold: 90
|
||||
LongParameterList:
|
||||
# MVC-обработчики форм принимают набор @RequestParam — для них это нормально.
|
||||
functionThreshold: 8
|
||||
constructorThreshold: 8
|
||||
ignoreDefaultParameters: true
|
||||
# MVC-обработчики форм принимают набор @RequestParam — для них параметров «много» нормально.
|
||||
ignoreAnnotated:
|
||||
- 'PostMapping'
|
||||
- 'GetMapping'
|
||||
TooManyFunctions:
|
||||
thresholdInFiles: 80
|
||||
thresholdInClasses: 80
|
||||
thresholdInInterfaces: 40
|
||||
thresholdInObjects: 40
|
||||
thresholdInEnums: 40
|
||||
# ContentService (26) — следующий кандидат на разделение.
|
||||
thresholdInFiles: 27
|
||||
thresholdInClasses: 27
|
||||
thresholdInInterfaces: 20
|
||||
thresholdInObjects: 20
|
||||
thresholdInEnums: 20
|
||||
LargeClass:
|
||||
threshold: 1400
|
||||
threshold: 600
|
||||
ComplexCondition:
|
||||
threshold: 4
|
||||
CyclomaticComplexMethod:
|
||||
threshold: 20
|
||||
# editLab (16) в AdminLabController.
|
||||
threshold: 17
|
||||
|
||||
style:
|
||||
MagicNumber:
|
||||
|
||||
Reference in New Issue
Block a user