Этап 1: detekt (статанализ + ktlint-форматирование) с baseline
CI / verify (push) Has been cancelled
CI / release (push) Has been cancelled

- detekt 1.23.8 применён ко всем НАШИМ модулям (vendor-форк исключён),
  +formatting-ruleset (обёртка ktlint). Совместим с Kotlin 2.3 (проверено).
- config/detekt/detekt.yml — настройки под наш код (LongMethod 120, MaxLine 140,
  MagicNumber off — dp/цвета отдельно, FunctionNaming off — @Composable Заглавные).
- detekt-baseline.xml по модулям: ~403 текущих замечаний зафиксированы →
  detekt зелёный, дальше ловит только НОВЫЕ. detekt в CI (ci.yml verify).

Проверено: detektBaseline + detekt BUILD SUCCESSFUL.
This commit is contained in:
b-dev-mobile
2026-07-07 23:36:40 +00:00
parent ab8fa70e51
commit ac438269c5
17 changed files with 549 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" ?>
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>CyclomaticComplexMethod:TalkFormatting.kt$fun buildChatItems( messages: List&lt;TalkMessage&gt;, lastReadMessageId: Long, selfActorId: String, collapseSystemMessages: Boolean, ): List&lt;TalkChatItem&gt;</ID>
<ID>CyclomaticComplexMethod:TalkScreen.kt$@Composable fun TalkScreen( session: AuthSession, modifier: Modifier = Modifier, openRoomToken: String? = null, scrollToMessageId: Long? = null, chatsListRequest: Int = 0, pushSyncRequest: Int = 0, pushRoomToken: String? = null, onOpenRoomConsumed: () -&gt; Unit = {}, onRoomOpenStateChange: (Boolean) -&gt; Unit = {}, onOpenCalendar: () -&gt; Unit = {}, onUnauthorized: () -&gt; Unit = {}, )</ID>
<ID>CyclomaticComplexMethod:TalkScreen.kt$@Composable private fun ChatContent( session: AuthSession, state: TalkUiState, draft: String, onDraftChange: (String) -&gt; Unit, onSend: () -&gt; Unit, onAttach: () -&gt; Unit, onVoiceToggle: () -&gt; Unit, voiceRecording: Boolean, onRetry: () -&gt; Unit, onStartCall: () -&gt; Unit, onBackClick: () -&gt; Unit, onOpenRoomInfo: () -&gt; Unit, onScheduleMeeting: () -&gt; Unit, onToggleSystemMessages: () -&gt; Unit, onReply: (TalkMessage) -&gt; Unit, onReaction: (TalkMessage, String) -&gt; Unit, onDeleteMessage: (TalkMessage) -&gt; Unit, onEditMessage: (TalkMessage, String) -&gt; Unit, onMentionQuery: (String?) -&gt; Unit, onMentionSelected: (TalkMention) -&gt; Unit, onClearReply: () -&gt; Unit, onClearHighlight: () -&gt; Unit, )</ID>
<ID>ImportOrdering:TalkComponents.kt$import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextFieldDefaults import androidx.compose.material3.Text import androidx.compose.material3.rememberModalBottomSheetState import androidx.compose.foundation.border import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.offset import androidx.compose.foundation.lazy.LazyRow import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.IconButton import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext import coil.compose.SubcomposeAsyncImage import coil.request.ImageRequest import okhttp3.Credentials import ru.forbion.f7cloud.core.auth.AuthSession import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.shadow import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer import coil.compose.AsyncImage import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.foundation.layout.widthIn import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.window.Popup import androidx.compose.ui.window.PopupProperties import ru.forbion.f7cloud.core.designsystem.F7Colors import ru.forbion.f7cloud.core.designsystem.F7PrimaryButton import ru.forbion.f7cloud.core.designsystem.F7TextButton import java.text.DateFormat import java.util.Calendar import java.util.Date import kotlin.math.abs</ID>
<ID>ImportOrdering:TalkScreen.kt$import android.Manifest import android.content.Context import android.content.pm.PackageManager import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.foundation.clickable import androidx.compose.foundation.gestures.awaitEachGesture import androidx.compose.foundation.gestures.awaitFirstDown import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.ui.draw.clip import androidx.compose.ui.input.pointer.PointerEventPass import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.material3.AlertDialog import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import kotlinx.coroutines.launch import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import androidx.core.content.ContextCompat import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.viewmodel.compose.viewModel import coil.compose.AsyncImage import ru.forbion.f7cloud.core.auth.AuthSession import ru.forbion.f7cloud.core.designsystem.F7Colors import ru.forbion.f7cloud.core.designsystem.F7ModuleScreen import ru.forbion.f7cloud.core.designsystem.F7OverlayDismissHandler import ru.forbion.f7cloud.core.designsystem.F7TextButton import ru.forbion.f7cloud.feature.talknative.TalkNativeCallContext import ru.forbion.f7cloud.feature.talknative.TalkNativeCallLauncher</ID>
<ID>ImportOrdering:TalkViewModel.kt$import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch import kotlinx.coroutines.isActive import ru.forbion.f7cloud.core.auth.AuthSession import ru.forbion.f7cloud.core.designsystem.AppForegroundTracker import ru.forbion.f7cloud.core.network.UnauthorizedException</ID>
<ID>InstanceOfCheckForException:TalkViewModel.kt$TalkViewModel$t is UnauthorizedException</ID>
<ID>LargeClass:TalkViewModel.kt$TalkViewModel : ViewModel</ID>
<ID>LongMethod:TalkComponents.kt$@Composable fun TalkComposer( session: AuthSession, value: String, onValueChange: (String) -&gt; Unit, onSend: () -&gt; Unit, onAttach: (() -&gt; Unit)? = null, onVoiceToggle: (() -&gt; Unit)? = null, voiceRecording: Boolean = false, mentionCandidates: List&lt;TalkMention&gt; = emptyList(), onMentionQuery: ((String?) -&gt; Unit)? = null, onMentionSelected: ((TalkMention) -&gt; Unit)? = null, sending: Boolean, uploading: Boolean = false, modifier: Modifier = Modifier, )</ID>
<ID>LongMethod:TalkComponents.kt$@Composable fun TalkRoomRow( room: TalkRoom, session: AuthSession, modifier: Modifier = Modifier, onClick: () -&gt; Unit, onToggleFavorite: () -&gt; Unit = {}, onMarkUnread: () -&gt; Unit = {}, )</ID>
<ID>LongMethod:TalkComponents.kt$@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) @Composable fun TalkCreateRoomSheet( visible: Boolean, session: AuthSession, mode: CreateRoomMode, roomName: String, userSearchQuery: String, userSearchResults: List&lt;TalkUserCandidate&gt;, selectedUsers: List&lt;TalkUserCandidate&gt;, userSearchLoading: Boolean, creating: Boolean, onDismiss: () -&gt; Unit, onModeChange: (CreateRoomMode) -&gt; Unit, onRoomNameChange: (String) -&gt; Unit, onUserSearchChange: (String) -&gt; Unit, onUserToggle: (TalkUserCandidate) -&gt; Unit, onCreate: () -&gt; Unit, )</ID>
<ID>LongMethod:TalkScreen.kt$@Composable fun TalkScreen( session: AuthSession, modifier: Modifier = Modifier, openRoomToken: String? = null, scrollToMessageId: Long? = null, chatsListRequest: Int = 0, pushSyncRequest: Int = 0, pushRoomToken: String? = null, onOpenRoomConsumed: () -&gt; Unit = {}, onRoomOpenStateChange: (Boolean) -&gt; Unit = {}, onOpenCalendar: () -&gt; Unit = {}, onUnauthorized: () -&gt; Unit = {}, )</ID>
<ID>LongMethod:TalkScreen.kt$@Composable private fun ChatContent( session: AuthSession, state: TalkUiState, draft: String, onDraftChange: (String) -&gt; Unit, onSend: () -&gt; Unit, onAttach: () -&gt; Unit, onVoiceToggle: () -&gt; Unit, voiceRecording: Boolean, onRetry: () -&gt; Unit, onStartCall: () -&gt; Unit, onBackClick: () -&gt; Unit, onOpenRoomInfo: () -&gt; Unit, onScheduleMeeting: () -&gt; Unit, onToggleSystemMessages: () -&gt; Unit, onReply: (TalkMessage) -&gt; Unit, onReaction: (TalkMessage, String) -&gt; Unit, onDeleteMessage: (TalkMessage) -&gt; Unit, onEditMessage: (TalkMessage, String) -&gt; Unit, onMentionQuery: (String?) -&gt; Unit, onMentionSelected: (TalkMention) -&gt; Unit, onClearReply: () -&gt; Unit, onClearHighlight: () -&gt; Unit, )</ID>
<ID>LoopWithTooManyJumpStatements:TalkRepository.kt$TalkRepository$for</ID>
<ID>LoopWithTooManyJumpStatements:TalkViewModel.kt$TalkViewModel$while</ID>
<ID>MatchingDeclarationName:TalkFilters.kt$TalkRoomFilter</ID>
<ID>MatchingDeclarationName:TalkFormatting.kt$TalkChatItem</ID>
<ID>MaximumLineLength:TalkCallActivity.kt$TalkCallActivity$ </ID>
<ID>MultiLineIfElse:TalkComponents.kt$Modifier</ID>
<ID>MultiLineIfElse:TalkComponents.kt$Modifier.graphicsLayer { rotationZ = 180f }</ID>
<ID>NestedBlockDepth:TalkViewModel.kt$TalkViewModel$private fun resolveDisplayName(context: android.content.Context, uri: android.net.Uri, mimeType: String): String</ID>
<ID>NoUnusedImports:TalkAttachmentUploader.kt$ru.forbion.f7cloud.feature.talk.TalkAttachmentUploader.kt</ID>
<ID>NoUnusedImports:TalkOfflineRepository.kt$ru.forbion.f7cloud.feature.talk.TalkOfflineRepository.kt</ID>
<ID>NoUnusedImports:TalkRepository.kt$ru.forbion.f7cloud.feature.talk.TalkRepository.kt</ID>
<ID>NoUnusedImports:TalkScreen.kt$ru.forbion.f7cloud.feature.talk.TalkScreen.kt</ID>
<ID>NoUnusedImports:TalkShareActivity.kt$ru.forbion.f7cloud.feature.talk.TalkShareActivity.kt</ID>
<ID>UnusedParameter:TalkRoomInfoSheet.kt$session: AuthSession</ID>
<ID>Wrapping:TalkComponents.kt$;</ID>
<ID>Wrapping:TalkViewModel.kt$TalkUiState$(</ID>
</CurrentIssues>
</SmellBaseline>