Files
file-manager/config/detekt/baseline.xml
T
SoftwareApp 17078bf613 A copy into a picked folder says where it went, and Show takes you there
The last acceptance criterion M16 had left open. After Copy to..., the snackbar reads 'Copied to AADst' with a Show button; after a move to a picked folder it keeps the undoable message instead, because the sources are gone and Show would lead nowhere.

Two things needed care rather than a string. The action button was hard-wired to undo() - the label was a parameter beside it, which let the two disagree - so UiMessage now carries a MessageAction, and the label follows from it: Undo for an undo, Show for a jump. And a message cannot name a folder from the path alone: a volume root has no name of its own, and internal storage's is 0. The message carries the picked PickerFolder, and the screen resolves its label the way breadcrumbs do - so copying into the root reads 'Copied to Internal storage', which is the case a plain path.name would have got wrong.

Four tests: the message names the destination and offers Show; Show opens it; a paste into the folder on screen still names nothing and offers nothing (its destination is the screen); a move to a picked folder offers Undo. All four driven through the view model, and both snackbar variants checked on the phone, including the volume-root one.

detekt's SpreadOperator baseline entries moved with the expression, so the message building is now a small helper with a deliberate suppression and a reason, and the baseline was regenerated: three obsolete entries removed, none added.
2026-10-17 23:19:07 +02:00

80 lines
14 KiB
XML

<?xml version="1.0" ?>
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>ComplexCondition:BrowserContent.kt$wide &amp;&amp; state.isRootView &amp;&amp; state.searchRoot == null &amp;&amp; state.focus == null</ID>
<ID>ComplexCondition:BrowserScreen.kt$state.path != null &amp;&amp; !state.isSelecting &amp;&amp; !state.loading &amp;&amp; !state.needsTreeGrant</ID>
<ID>CyclomaticComplexMethod:ArchiveEngine.kt$ArchiveEngine$private suspend fun readSevenZip( channel: SeekableByteChannel, destination: StoragePath, state: ArchiveState, )</ID>
<ID>CyclomaticComplexMethod:ArchiveEngine.kt$ArchiveEngine$private suspend fun withEntry( archive: StoragePath, name: String, sink: suspend (InputStream) -&gt; Unit, ): Boolean</ID>
<ID>CyclomaticComplexMethod:ArchiveFormats.kt$ArchiveFormats$fun formatOf(fileName: String): ArchiveFormat</ID>
<ID>CyclomaticComplexMethod:BrowserContent.kt$@Composable fun BrowserContent( state: BrowserUiState, contentPadding: PaddingValues, crumbLabel: (StoragePath) -&gt; String, onOpenEntry: (FileEntry) -&gt; Unit, onFocusEntry: (FileEntry) -&gt; Unit, onFocusRoot: (RootItem) -&gt; Unit, onToggleSelection: (StoragePath) -&gt; Unit, onOpenRoot: (StoragePath) -&gt; Unit, onNavigate: (StoragePath) -&gt; Unit, onOpenCategory: (FileCategory) -&gt; Unit, onOpenBookmark: (StoragePath) -&gt; Unit, onRemoveBookmark: (StoragePath) -&gt; Unit, onGrantAllFiles: () -&gt; Unit, onPickFolder: () -&gt; Unit, onRebuildIndex: () -&gt; Unit, /** Hoisted by the screen so the scroll position outlives a viewer taking over. */ listState: LazyListState = rememberLazyListState(), gridState: LazyGridState = rememberLazyGridState(), )</ID>
<ID>CyclomaticComplexMethod:BrowserContent.kt$@Composable private fun DirectoryView( state: BrowserUiState, crumbLabel: (StoragePath) -&gt; String, wide: Boolean, listState: LazyListState, gridState: LazyGridState, onOpenEntry: (FileEntry) -&gt; Unit, onFocusEntry: (FileEntry) -&gt; Unit, onToggleSelection: (StoragePath) -&gt; Unit, onNavigate: (StoragePath) -&gt; Unit, onGrantAllFiles: () -&gt; Unit, onRebuildIndex: () -&gt; Unit, modifier: Modifier = Modifier, )</ID>
<ID>CyclomaticComplexMethod:BrowserScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun BrowserScreen( incoming: IncomingRequest? = null, onDeliver: (FileEntry) -&gt; Unit = {}, onDone: () -&gt; Unit = {}, viewModel: BrowserViewModel = viewModel(factory = BrowserViewModel.Factory), )</ID>
<ID>CyclomaticComplexMethod:BrowserViewModel.kt$BrowserViewModel$fun open(entry: FileEntry)</ID>
<ID>CyclomaticComplexMethod:BrowserViewModel.kt$BrowserViewModel$fun previewArchiveEntry(entry: ArchiveEntry)</ID>
<ID>CyclomaticComplexMethod:FileOperations.kt$FileOperations$private suspend fun transfer( from: StoragePath, to: StoragePath, move: Boolean, state: OperationState, )</ID>
<ID>CyclomaticComplexMethod:SearchIndexer.kt$SearchIndexer$suspend fun refresh( volume: StoragePath, showHidden: Boolean, onProgress: (Int) -&gt; Unit = {}, ): Int</ID>
<ID>LargeClass:BrowserViewModel.kt$BrowserViewModel : ViewModel</ID>
<ID>LargeClass:BrowserViewModelTest.kt$BrowserViewModelTest</ID>
<ID>LongMethod:BrowserContent.kt$@Composable fun BrowserContent( state: BrowserUiState, contentPadding: PaddingValues, crumbLabel: (StoragePath) -&gt; String, onOpenEntry: (FileEntry) -&gt; Unit, onFocusEntry: (FileEntry) -&gt; Unit, onFocusRoot: (RootItem) -&gt; Unit, onToggleSelection: (StoragePath) -&gt; Unit, onOpenRoot: (StoragePath) -&gt; Unit, onNavigate: (StoragePath) -&gt; Unit, onOpenCategory: (FileCategory) -&gt; Unit, onOpenBookmark: (StoragePath) -&gt; Unit, onRemoveBookmark: (StoragePath) -&gt; Unit, onGrantAllFiles: () -&gt; Unit, onPickFolder: () -&gt; Unit, onRebuildIndex: () -&gt; Unit, /** Hoisted by the screen so the scroll position outlives a viewer taking over. */ listState: LazyListState = rememberLazyListState(), gridState: LazyGridState = rememberLazyGridState(), )</ID>
<ID>LongMethod:BrowserScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun BrowserScreen( incoming: IncomingRequest? = null, onDeliver: (FileEntry) -&gt; Unit = {}, onDone: () -&gt; Unit = {}, viewModel: BrowserViewModel = viewModel(factory = BrowserViewModel.Factory), )</ID>
<ID>LongMethod:BrowserTopBar.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun BrowserTopBar( title: String, canNavigateUp: Boolean, /** Whether this view is a folder, and so can be starred at all. */ canBookmark: Boolean, bookmarked: Boolean, query: String, searchOpen: Boolean, searchScope: SearchScope, /** Whether the scope is the user's to choose at all; see the note beside the toggle. */ scopeChoosable: Boolean, canPaste: Boolean, onUp: () -&gt; Unit, onQuery: (String) -&gt; Unit, onSearchOpen: (Boolean) -&gt; Unit, onSearchScope: () -&gt; Unit, onSort: () -&gt; Unit, onPaste: () -&gt; Unit, onToggleBookmark: () -&gt; Unit, onRefresh: () -&gt; Unit, onUsage: () -&gt; Unit, onDuplicates: () -&gt; Unit, onTrash: () -&gt; Unit, )</ID>
<ID>LongParameterList:BrowserContent.kt$( state: BrowserUiState, contentPadding: PaddingValues, crumbLabel: (StoragePath) -&gt; String, onOpenEntry: (FileEntry) -&gt; Unit, onFocusEntry: (FileEntry) -&gt; Unit, onFocusRoot: (RootItem) -&gt; Unit, onToggleSelection: (StoragePath) -&gt; Unit, onOpenRoot: (StoragePath) -&gt; Unit, onNavigate: (StoragePath) -&gt; Unit, onOpenCategory: (FileCategory) -&gt; Unit, onOpenBookmark: (StoragePath) -&gt; Unit, onRemoveBookmark: (StoragePath) -&gt; Unit, onGrantAllFiles: () -&gt; Unit, onPickFolder: () -&gt; Unit, onRebuildIndex: () -&gt; Unit, /** Hoisted by the screen so the scroll position outlives a viewer taking over. */ listState: LazyListState = rememberLazyListState(), gridState: LazyGridState = rememberLazyGridState(), )</ID>
<ID>LongParameterList:BrowserContent.kt$( state: BrowserUiState, crumbLabel: (StoragePath) -&gt; String, wide: Boolean, listState: LazyListState, gridState: LazyGridState, onOpenEntry: (FileEntry) -&gt; Unit, onFocusEntry: (FileEntry) -&gt; Unit, onToggleSelection: (StoragePath) -&gt; Unit, onNavigate: (StoragePath) -&gt; Unit, onGrantAllFiles: () -&gt; Unit, onRebuildIndex: () -&gt; Unit, modifier: Modifier = Modifier, )</ID>
<ID>LongParameterList:BrowserTopBar.kt$( title: String, canNavigateUp: Boolean, /** Whether this view is a folder, and so can be starred at all. */ canBookmark: Boolean, bookmarked: Boolean, query: String, searchOpen: Boolean, searchScope: SearchScope, /** Whether the scope is the user's to choose at all; see the note beside the toggle. */ scopeChoosable: Boolean, canPaste: Boolean, onUp: () -&gt; Unit, onQuery: (String) -&gt; Unit, onSearchOpen: (Boolean) -&gt; Unit, onSearchScope: () -&gt; Unit, onSort: () -&gt; Unit, onPaste: () -&gt; Unit, onToggleBookmark: () -&gt; Unit, onRefresh: () -&gt; Unit, onUsage: () -&gt; Unit, onDuplicates: () -&gt; Unit, onTrash: () -&gt; Unit, )</ID>
<ID>LoopWithTooManyJumpStatements:ArchiveEngine.kt$ArchiveEngine$while</ID>
<ID>LoopWithTooManyJumpStatements:BatchRename.kt$BatchRename$for</ID>
<ID>LoopWithTooManyJumpStatements:DuplicateFinder.kt$DuplicateFinder$while</ID>
<ID>LoopWithTooManyJumpStatements:SearchIndexer.kt$SearchIndexer$for</ID>
<ID>LoopWithTooManyJumpStatements:TransferPlanner.kt$TransferPlanner$for</ID>
<ID>LoopWithTooManyJumpStatements:Trash.kt$Trash$for</ID>
<ID>MaxLineLength:AllFilesSourceTest.kt$AllFilesSourceTest$roots = roots.map { FileEntry(StoragePath.of(it.absolutePath), isDirectory = true, sizeBytes = 0, lastModifiedMillis = 0) }</ID>
<ID>MaxLineLength:ArchiveEngineTest.kt$ArchiveEngineTest$assertEquals("hello gzip", ArchiveEngine(storage).readEntry(archive, entries.single())?.decodeToString())</ID>
<ID>MaxLineLength:ArchiveEngineTest.kt$ArchiveEngineTest$assertFalse("nothing was written — that is the point of a preview", storage.contains(out.child("b.txt")))</ID>
<ID>MaxLineLength:ArchiveEngineTest.kt$ArchiveEngineTest$val bytes = ArchiveEngine(storage).readEntry(zip, ArchiveEngine(storage).list(zip).single { it.name == "b.txt" })</ID>
<ID>MaxLineLength:BrowserViewModel.kt$BrowserViewModel$done.isNotEmpty() -&gt; messageUndoable(R.string.message_renamed_some, done.size, plan.moves.size)</ID>
<ID>MaxLineLength:BrowserViewModelTest.kt$BrowserViewModelTest$assertTrue("a folder that is there is not marked missing", model.state.value.bookmarks.single().exists)</ID>
<ID>MaxLineLength:FileOperations.kt$FileOperations$)</ID>
<ID>MaxLineLength:FileOperationsTest.kt$FileOperationsTest$paths = listOf(src.child("f0.txt"), src.child("f1.txt"), src.child("f2.txt"), src.child("f3.txt"))</ID>
<ID>MaxLineLength:InMemoryStorageSource.kt$InMemoryStorageSource$entries[path] = FileEntry(path, isDirectory = false, sizeBytes = bytes.size.toLong(), lastModifiedMillis = 0L)</ID>
<ID>MaxLineLength:IncomingRequest.kt$IncomingRequest.Companion$receive(IntentCompat.getParcelableArrayListExtra(intent, Intent.EXTRA_STREAM, Uri::class.java).orEmpty())</ID>
<ID>MaxLineLength:IncomingRequest.kt$IncomingRequest.Companion$receive(listOfNotNull(IntentCompat.getParcelableExtra(intent, Intent.EXTRA_STREAM, Uri::class.java)))</ID>
<ID>MaxLineLength:MediaStoreDeleter.kt$MediaStoreDeleter$if (cursor.moveToFirst()) collection.buildUpon().appendPath(cursor.getLong(0).toString()).build() else null</ID>
<ID>MaxLineLength:SafSourceTest.kt$SafSourceTest$provider.add("primary:Download", doc("primary:Download/a.txt", "a.txt", size = 12, modified = 1_700_000_000_000))</ID>
<ID>MaxLineLength:SearchIndexerTest.kt$SearchIndexerTest$assertEquals(listOf(volume, volume.child("Documents")).sortedBy { it.value }, storage.namesCalls.sortedBy { it.value })</ID>
<ID>MaxLineLength:SearchIndexerTest.kt$SearchIndexerTest$assertEquals(listOf(volume.child("DCIM/new-photo.jpg")), storage.statCalls.filter { it.name == "new-photo.jpg" })</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.Archive, contentDescription = stringResource(R.string.browser_action_compress))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.Close, contentDescription = stringResource(R.string.browser_action_clear_selection))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.ContentCopy, contentDescription = stringResource(R.string.browser_action_copy))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.ContentCut, contentDescription = stringResource(R.string.browser_action_cut))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.Info, contentDescription = stringResource(R.string.browser_action_details))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.SelectAll, contentDescription = stringResource(R.string.browser_action_select_all))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.Share, contentDescription = stringResource(R.string.browser_action_share))</ID>
<ID>MaxLineLength:SelectionBar.kt$Icon(Icons.Filled.Unarchive, contentDescription = stringResource(R.string.browser_action_extract))</ID>
<ID>MaxLineLength:SqliteSearchIndex.kt$SqliteSearchIndex$.</ID>
<ID>MaxLineLength:SqliteSearchIndex.kt$SqliteSearchIndex.Companion$"ALTER TABLE $TABLE_VOLUMES ADD COLUMN $COLUMN_FULL_AT INTEGER NOT NULL DEFAULT 0"</ID>
<ID>MaxLineLength:SqliteSearchIndexTest.kt$SqliteSearchIndexTest$"(${SqliteSearchIndex.COLUMN_VOLUME}, ${SqliteSearchIndex.COLUMN_INDEXED_AT}) VALUES ('$volume', 1234)"</ID>
<ID>MaxLineLength:SqliteSearchIndexTest.kt$SqliteSearchIndexTest$db.rawQuery("SELECT ${SqliteSearchIndex.COLUMN_FULL_AT}, ${SqliteSearchIndex.COLUMN_HIDDEN_INCLUDED} FROM ${SqliteSearchIndex.TABLE_VOLUMES}", null)</ID>
<ID>MaxLineLength:SqliteSearchIndexTest.kt$SqliteSearchIndexTest$val failure = runCatching { SqliteSearchIndex.upgrade(db, SqliteSearchIndex.DATABASE_VERSION, SqliteSearchIndex.DATABASE_VERSION + 1) }</ID>
<ID>MaxLineLength:Trash.kt$Trash$onProgress(OperationProgress(OperationKind.MOVE, index + 1, batch.entries.size, entry.original))</ID>
<ID>NestedBlockDepth:ArchiveEngine.kt$ArchiveEngine$private suspend fun readArchive( archive: ArchiveInputStream&lt;*&gt;, destination: StoragePath, state: ArchiveState, )</ID>
<ID>NestedBlockDepth:ArchiveEngine.kt$ArchiveEngine$private suspend fun readSevenZip( channel: SeekableByteChannel, destination: StoragePath, state: ArchiveState, )</ID>
<ID>NestedBlockDepth:ArchiveEngine.kt$ArchiveEngine$private suspend fun withEntry( archive: StoragePath, name: String, sink: suspend (InputStream) -&gt; Unit, ): Boolean</ID>
<ID>NestedBlockDepth:ArchiveEngine.kt$ArchiveEngine$suspend fun createZip( entries: List&lt;StoragePath&gt;, destination: StoragePath, onProgress: (OperationProgress) -&gt; Unit = {}, ): OperationResult</ID>
<ID>NestedBlockDepth:ArchiveEngine.kt$ArchiveEngine$suspend fun extract( archive: StoragePath, destination: StoragePath, onProgress: (OperationProgress) -&gt; Unit = {}, ): OperationResult</ID>
<ID>NestedBlockDepth:ArchiveEngine.kt$ArchiveEngine$suspend fun list(archive: StoragePath): List&lt;ArchiveEntry&gt;</ID>
<ID>NestedBlockDepth:ArchiveEngineTest.kt$ArchiveEngineTest$private fun sevenZip(vararg entries: Pair&lt;String, String&gt;): ByteArray</ID>
<ID>RethrowCaughtException:BrowserViewModel.kt$BrowserViewModel$throw cancellation</ID>
<ID>ReturnCount:ArchiveEngine.kt$ArchiveEngine$private suspend fun withEntry( archive: StoragePath, name: String, sink: suspend (InputStream) -&gt; Unit, ): Boolean</ID>
<ID>ReturnCount:BrowserScreen.kt$@OptIn(ExperimentalMaterial3Api::class) @Composable fun BrowserScreen( incoming: IncomingRequest? = null, onDeliver: (FileEntry) -&gt; Unit = {}, onDone: () -&gt; Unit = {}, viewModel: BrowserViewModel = viewModel(factory = BrowserViewModel.Factory), )</ID>
<ID>TooGenericExceptionCaught:ArchiveEngine.kt$ArchiveEngine$failure: Exception</ID>
<ID>TooGenericExceptionCaught:BrowserViewModel.kt$BrowserViewModel$failure: Exception</ID>
<ID>TooGenericExceptionCaught:FileOperations.kt$FileOperations$failure: Exception</ID>
<ID>TooGenericExceptionCaught:Trash.kt$Trash$failure: Exception</ID>
<ID>TooManyFunctions:BrowserViewModel.kt$BrowserViewModel : ViewModel</ID>
<ID>TooManyFunctions:SearchIndex.kt$SearchIndex</ID>
<ID>TooManyFunctions:SearchIndex.kt$SearchIndex$None : SearchIndex</ID>
<ID>TooManyFunctions:StorageSource.kt$StorageSource</ID>
</CurrentIssues>
</SmellBaseline>