Public report of t8y2/dbx, published 27 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 27 October 2026, 02:29 UTC · Survey ID cd_751fef1178954cc19945ffc508623d03

t8y2/dbx

Measured 27 October 2026, 02:10 UTC, at code version 374d605

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 50out of 100 At risk Down 3 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A very large codebase: 1,540,228 lines of product code in 118 projects, tests not counted · Estimated rebuild effort: about 11.1 person-years · Weakest lens: Accessibility, 39

Findings by how serious they are

636 critical 6594 serious 297 minor

15 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 02:10 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

92of 92 dimensions measured by tools.
7481of 7527 findings point to an exact file and line, so you can open each one in the code. The other 46 concern the repository as a whole, such as missing documentation.
92dimensions across 8 lenses, read from 1,540,228 lines of product code in 118 projects.
Chapters

Executive summary

t8y2/dbx is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back in part because it has controls that only work with a mouse. It scores 50 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Accessibility, at 39, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 6 points. Fixing focus, motion and contrast comes next, worth about 3 points. Raising Accessibility to 65 would lift the score to about 60.

345 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Sixty-nine weaknesses in the code could be used by an attacker, and thirty-five controls can't be used without a mouse. Making the controls work with a keyboard, pinning each tool to an exact version and fixing the weaknesses the scanner points to would close these risks. Limiting each secret to its own step would fix the 29 secrets exposed to more of the pipeline than needed, and the 34 passwords or keys in the code and the 11 passwords or keys in the code's history need replacing, with the old ones switched off. The 25 form fields without a label need a label.

The product code is 1,540,228 lines, about €1,600,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 39 · counts for 45%Code Health 56 · counts for 25%Security and Compliance 59 · counts for 14%Production Readiness 62 · counts for 8%Architecture 67 · counts for 4%Maturity 76 · counts for 2%Performance 79 · counts for 1%Event Sourcing 100 · counts for 1%

If Accessibility rose from 39 to 65, the lowest score rated Strong, the score would rise from 50 to about 60.

Code composition: what the lines of code are
Product code 90%Tests 10%
New since the last survey: 1881 findings

These 1881 critical or serious findings weren't in the previous survey, on 13 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · queryStore.useQueryStore.fetchCapturedTabResultForExport (cyclomatic 186) apps/desktop/src/stores/queryStore.ts
  • Cyclomatic Complexity · dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cyclomatic 164) crates/dbx-sql-schema/src/schema_diff.rs
  • Cyclomatic Complexity · oracleTypeManagement.prepareOracleTypeManagement (cyclomatic 141) apps/desktop/src/lib/table/oracleTypeManagement.ts
  • Cyclomatic Complexity · dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan (cyclomatic 136) crates/dbx-sql-schema/src/native_job_changes/transitions.rs
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl (cyclomatic 104) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs
  • Cyclomatic Complexity · oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cyclomatic 99) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts
  • Cyclomatic Complexity · tableColumnDefinitionPaste.parseColumn (cyclomatic 99) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts
  • Cyclomatic Complexity · AppState::get_or_create_pool_for_session_inner_with_receipt (cyclomatic 98) REDACTED
  • Cyclomatic Complexity · nativeJobAdmin.buildNativeJobDefinitionEdit (cyclomatic 95) apps/desktop/src/lib/database/nativeJobAdmin.ts
  • Cyclomatic Complexity · oracleConstraints.executeOracleConstraintPlan (cyclomatic 90) apps/desktop/src/lib/database/oracleConstraints.ts
  • Cyclomatic Complexity · starrocksAlterOptions.starRocksAlterOptionsFromDdl (cyclomatic 90) apps/desktop/src/lib/table/starrocksAlterOptions.ts
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes (cyclomatic 84) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs
  • Cyclomatic Complexity · dbx::commands::connection::test_connection_with_info_impl (cyclomatic 81) src-tauri/src/commands/connection.rs
  • Cyclomatic Complexity · oracleForeignKeys.executeOracleForeignKeyPlan (cyclomatic 81) apps/desktop/src/lib/database/oracleForeignKeys.ts
  • Cyclomatic Complexity · routineBlockLayout.indentRoutineBlocks (cyclomatic 80) apps/desktop/src/lib/sql/routineBlockLayout.ts
  • Cyclomatic Complexity · oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cyclomatic 78) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts
  • Cyclomatic Complexity · Plan.read (cyclomatic 74) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java
  • Cyclomatic Complexity · dbx_core::schema::oracle_routines::plan::build_plan_with_tables (cyclomatic 73) crates/dbx-core/src/schema/oracle_routines/plan.rs
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_trigger::analyze (cyclomatic 72) crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs
  • Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportMemoryDataFile (cyclomatic 71) apps/desktop/src/composables/useDataGridExport.ts
  • Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cyclomatic 69) apps/desktop/src/composables/useDataGridExport.ts
  • Cyclomatic Complexity · oracleRoutineRename.executeOracleRoutineRename (cyclomatic 68) apps/desktop/src/lib/table/oracleRoutineRename.ts
  • Cyclomatic Complexity · PlDebugObjectConstructors.parse (cyclomatic 67) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained (cyclomatic 66) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cyclomatic Complexity · dbx::commands::connection::connect_db_inner (cyclomatic 66) src-tauri/src/commands/connection.rs
  • Cyclomatic Complexity · oracleTableRename.prepareOracleTableRename (cyclomatic 66) REDACTED
  • Cyclomatic Complexity · dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes (cyclomatic 65) crates/dbx-core/src/schema/oracle_ddl_indexes.rs
  • Cyclomatic Complexity · oceanbaseTableClone.buildOceanbaseTableClone (cyclomatic 65) apps/desktop/src/lib/database/oceanbaseTableClone.ts
  • Cyclomatic Complexity · Plan.render (cyclomatic 64) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java
  • Cyclomatic Complexity · oracleConstraints.readOracleConstraintSnapshot (cyclomatic 64) apps/desktop/src/lib/database/oracleConstraints.ts
  • Cyclomatic Complexity · plDebugComposite.compositeInputComplete (cyclomatic 64) apps/desktop/src/lib/debug/plDebugComposite.ts
  • Cyclomatic Complexity · oracleRoutineDeploy.validateOracleRoutineDeployment (cyclomatic 63) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts
  • Cyclomatic Complexity · oraclePackageSource.rewriteOraclePackageSource (cyclomatic 63) apps/desktop/src/lib/table/oraclePackageSource.ts
  • Cyclomatic Complexity · graphCompletion.getGraphCompletionContext (cyclomatic 62) apps/desktop/src/lib/graph/graphCompletion.ts
  • Cyclomatic Complexity · PlDebugTarget.resolve (cyclomatic 60) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java
  • Cyclomatic Complexity · mysqlRoutineVariables.collectMysqlRoutineVariables (cyclomatic 60) apps/desktop/src/lib/sql/mysqlRoutineVariables.ts
  • Cyclomatic Complexity · oracleTableRename.executeOracleTableRename (cyclomatic 60) REDACTED
  • Cyclomatic Complexity · dbx_core::schema::native_jobs::operations::dameng::run_steps (cyclomatic 59) crates/dbx-core/src/schema/native_jobs/operations/dameng.rs
  • Cyclomatic Complexity · dbx_sql_schema::native_jobs::references::native_job_reference_queries (cyclomatic 58) crates/dbx-sql-schema/src/native_jobs/references.rs
  • Cyclomatic Complexity · DbxJdbcPlugin.handle (cyclomatic 58) REDACTED
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl (cyclomatic 57) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cyclomatic 57) apps/desktop/src/lib/database/oracleForeignKeys.ts
  • Cyclomatic Complexity · oracleTypeManagement.executeOracleTypeManagement (cyclomatic 57) apps/desktop/src/lib/table/oracleTypeManagement.ts
  • Cyclomatic Complexity · plDebugStore.usePlDebugStore.publishSnapshot (cyclomatic 56) apps/desktop/src/stores/plDebugStore.ts
  • Cyclomatic Complexity · dbx_core::schema::native_jobs::operations::run_claimed (cyclomatic 55) crates/dbx-core/src/schema/native_jobs/operations.rs
  • Cyclomatic Complexity · dbx_core::schema::native_jobs::operations::scheduler::transition::run (cyclomatic 55) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs
  • Cyclomatic Complexity · dbx_core::data::transfer_runner::run_transfer (cyclomatic 54) crates/dbx-core/src/data/transfer_runner.rs
  • Cyclomatic Complexity · oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cyclomatic 54) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts
  • Cyclomatic Complexity · PlDebugTarget.scalarInput (cyclomatic 52) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java
  • Cyclomatic Complexity · run_proof.main (cyclomatic 52) scripts/ai-proxy-12277/run_proof.py
  • Cyclomatic Complexity · Loader.load (cyclomatic 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java
  • Cyclomatic Complexity · dbx_duckdb_driver::query::duckdb_logical_type_to_string (cyclomatic 50) agents/drivers/duckdb/src/query.rs
  • Cyclomatic Complexity · StarRocksAlter::build (cyclomatic 50) crates/dbx-sql-schema/src/table_structure_sql/alter_dialect.rs
  • Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cyclomatic 50) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts
  • Cyclomatic Complexity · oracleTriggerPlan.prepareOracleTriggerPlan (cyclomatic 50) apps/desktop/src/lib/database/oracleTriggerPlan.ts
  • Cyclomatic Complexity · sidebarTableNameCopy.qualifiedNameForSidebarNode (cyclomatic 49) apps/desktop/src/lib/sidebar/sidebarTableNameCopy.ts
  • Cyclomatic Complexity · tableColumnDefinitionPaste.parseTableColumnDefinitions (cyclomatic 49) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts
  • Cyclomatic Complexity · dbx_core::query::pl_debug::pl_debug_operate_submission_core (cyclomatic 48) crates/dbx-core/src/query/pl_debug.rs
  • Cyclomatic Complexity · dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery (cyclomatic 47) crates/dbx-core/src/schema/oracle_routines/plan/recovery/package_recovery.rs
  • Cyclomatic Complexity · triggerToggleSql.buildTriggerToggleSql (cyclomatic 47) apps/desktop/src/lib/database/triggerToggleSql.ts
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::starrocks_layout::build (cyclomatic 46) crates/dbx-sql-schema/src/table_structure_sql/starrocks_layout.rs
  • Cyclomatic Complexity · PlDebugSession.mutateBreakpoint (cyclomatic 46) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::validate_oracle_object_source (cyclomatic 45) crates/dbx-sql-core/src/object_source_sql.rs
  • Cyclomatic Complexity · dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan (cyclomatic 45) crates/dbx-sql-schema/src/native_job_changes/creation.rs
  • Cyclomatic Complexity · PlDebugCompositeInput.child (cyclomatic 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java
  • Cyclomatic Complexity · graphCompletionScope.graphCompletionScope (cyclomatic 45) apps/desktop/src/lib/graph/graphCompletionScope.ts
  • Cyclomatic Complexity · redisCommandPreview.quoteRedisBytes (cyclomatic 45) apps/desktop/src/lib/redis/redisCommandPreview.ts
  • Cyclomatic Complexity · PlDebugObjectConstructors.tokens (cyclomatic 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java
  • Cyclomatic Complexity · oracleTypeManagement.restoreOracleTypeManagementDraft (cyclomatic 44) apps/desktop/src/lib/table/oracleTypeManagement.ts
  • Cyclomatic Complexity · dbx_core::schema::oracle_type_evolution::table_guard (cyclomatic 43) crates/dbx-core/src/schema/oracle_type_evolution.rs
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::rewrite_oracle_routine_references (cyclomatic 43) crates/dbx-sql-core/src/object_source_sql.rs
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits (cyclomatic 43) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cyclomatic Complexity · mongoSql.tokenize (cyclomatic 43) apps/desktop/src/lib/mongo/mongoSql.ts
  • Cyclomatic Complexity · oracleRoutineRename.verifyBeforeDrop (cyclomatic 43) apps/desktop/src/lib/table/oracleRoutineRename.ts
  • Cyclomatic Complexity · queryStore.useQueryStore.exportQuerySqlDirect (cyclomatic 43) apps/desktop/src/stores/queryStore.ts
  • Cyclomatic Complexity · dbx_core::data::transfer::oracle_table_contract::types::from_ast (cyclomatic 42) crates/dbx-core/src/data/transfer/oracle_table_contract/types.rs
  • Cyclomatic Complexity · dbx_core::schema::native_jobs::operations::scheduler::transition::prepare (cyclomatic 42) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs
  • Cyclomatic Complexity · dbx_core::schema::oracle_type_details::read (cyclomatic 42) crates/dbx-core/src/schema/oracle_type_details.rs
  • Cyclomatic Complexity · PlDebugSession.runDebuggeeTarget (cyclomatic 42) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java
  • Cyclomatic Complexity · starrocksDdlDisplay.formatStarRocksDdlForDisplay (cyclomatic 42) apps/desktop/src/lib/sql/starrocksDdlDisplay.ts
  • Cyclomatic Complexity · queryStore.useQueryStore.captureQueryResultExportRequest (cyclomatic 42) apps/desktop/src/stores/queryStore.ts
  • Cyclomatic Complexity · dbx_core::schema::native_jobs::operations::observation::compare (cyclomatic 41) crates/dbx-core/src/schema/native_jobs/operations/observation.rs
  • Cyclomatic Complexity · dbx_sql_schema::native_job_changes::native_job_mutation_plan (cyclomatic 41) crates/dbx-sql-schema/src/native_job_changes.rs
  • Cyclomatic Complexity · PlDebugTemporalJson.temporal (cyclomatic 41) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java
  • Cyclomatic Complexity · oracleForeignKeys.parseOracleForeignKeyDdl (cyclomatic 41) apps/desktop/src/lib/database/oracleForeignKeys.ts
  • Cyclomatic Complexity · mongoSql.compileSelect (cyclomatic 41) apps/desktop/src/lib/mongo/mongoSql.ts
  • Cyclomatic Complexity · oracleRoutineDeploy.acceptOraclePackageTransferApproval (cyclomatic 41) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts
  • Cyclomatic Complexity · objectSourceTabSave.saveObjectSourceTab (cyclomatic 41) apps/desktop/src/lib/table/objectSourceTabSave.ts
  • Cyclomatic Complexity · plDebugStore.usePlDebugStore.recover (cyclomatic 41) apps/desktop/src/stores/plDebugStore.ts
  • Cyclomatic Complexity · dbx_core::data::transfer::transfer_mysql_schema_objects (cyclomatic 40) crates/dbx-core/src/data/transfer.rs
  • Cyclomatic Complexity · dbx_core::schema::oracle_routines::references::resolve_draft_with_tables (cyclomatic 40) crates/dbx-core/src/schema/oracle_routines/references.rs
  • Cyclomatic Complexity · dbx_sql_schema::native_job_changes::scheduler_attribute_steps (cyclomatic 40) crates/dbx-sql-schema/src/native_job_changes.rs
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change (cyclomatic 40) crates/dbx-sql-schema/src/table_structure_sql/existing_primary_key.rs
  • Cyclomatic Complexity · dbx_core::schema::oracle_ddl_indexes::prepare_schema_sync_oracle_ddl_core (cyclomatic 39) crates/dbx-core/src/schema/oracle_ddl_indexes.rs
  • Cyclomatic Complexity · dbx_core::schema::oracle_routines::collect_snapshot_with_options (cyclomatic 38) crates/dbx-core/src/schema/oracle_routines.rs
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges (cyclomatic 38) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes (cyclomatic 38) crates/dbx-sql-schema/src/table_structure_sql/oracle_foreign_keys.rs
  • Cyclomatic Complexity · PlDebugSession.setBreakpoints (cyclomatic 38) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java
  • Cyclomatic Complexity · printer.printRuleElement (cyclomatic 38) apps/desktop/src/lib/sql/layout/printer.ts
  • Cyclomatic Complexity · oracleViewRename.prepareOracleViewRename (cyclomatic 38) apps/desktop/src/lib/table/oracleViewRename.ts

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 3066 findings

These 3066 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner (cyclomatic 150) crates/dbx-sql-schema/src/schema_diff.rs
  • Cyclomatic Complexity · queryStore.useQueryStore.fetchTabResultForExport (cyclomatic 136) apps/desktop/src/stores/queryStore.ts
  • Cyclomatic Complexity · AppState::get_or_create_pool_for_session_inner (cyclomatic 97) REDACTED
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_with_partition_clause (cyclomatic 96) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs
  • Cyclomatic Complexity · dbx::commands::connection::test_connection_with_info_inner (cyclomatic 82) src-tauri/src/commands/connection.rs
  • Cyclomatic Complexity · dbx::commands::connection::connect_db (cyclomatic 69) src-tauri/src/commands/connection.rs
  • Cyclomatic Complexity · dbx_web::routes::transfer::start_transfer (cyclomatic 50) crates/dbx-web/src/routes/transfer.rs
  • Cyclomatic Complexity · dbx::commands::transfer::start_transfer (cyclomatic 43) src-tauri/src/commands/transfer.rs
  • Cyclomatic Complexity · queryStore.useQueryStore.buildQueryResultExportRequest (cyclomatic 27) apps/desktop/src/stores/queryStore.ts
  • Cyclomatic Complexity · dbx_sql_core::object_source_sql::build_executable_object_source_statements (cyclomatic 23) crates/dbx-sql-core/src/object_source_sql.rs
  • Cyclomatic Complexity · dbx_drivers::db::sqlite_worker::connect_sqlite_worker (cyclomatic 21) crates/dbx-drivers/src/db/sqlite_worker.rs
  • Cyclomatic Complexity · dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statement_with_formatters (cyclomatic 21) REDACTED
  • Cyclomatic Complexity · dbx_sql_core::query_execution_sql::build_explain_sql (cyclomatic 20) crates/dbx-sql-core/src/query_execution_sql.rs
  • Cyclomatic Complexity · useDataGridExport.useDataGridExport.sqlInsertExportData (cyclomatic 19) apps/desktop/src/composables/useDataGridExport.ts
  • Cyclomatic Complexity · connectionStore.useConnectionStore.tableMatchScore (cyclomatic 19) apps/desktop/src/stores/connectionStore.ts
  • Cyclomatic Complexity · dbx_core::query::document_ops::find_documents_core (cyclomatic 18) crates/dbx-core/src/query/document_ops.rs
  • Cyclomatic Complexity · PhysicalConnectionBudget.wrap (cyclomatic 18) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java
  • Cyclomatic Complexity · dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_columns (cyclomatic 17) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs
  • Cyclomatic Complexity · dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_mode (cyclomatic 17) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs
  • Cyclomatic Complexity · dataGridInsertPaste.readValueToken (cyclomatic 17) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts
  • Cyclomatic Complexity · executableStatementRangeCache.executableStartAfterLeadingDirective (cyclomatic 17) apps/desktop/src/lib/sql/executableStatementRangeCache.ts
  • Cyclomatic Complexity · AppState::connection_endpoint (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · dbx_web::routes::connection::run_temporary_connection_test (cyclomatic 16) crates/dbx-web/src/routes/connection.rs
  • Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportResultSheetsXlsxResult (cyclomatic 16) apps/desktop/src/composables/useDataGridExport.ts
  • Cyclomatic Complexity · queryEditorNativeSelection.createNativeSelectionPark.park (cyclomatic 16) apps/desktop/src/lib/editor/queryEditorNativeSelection.ts
  • Cyclomatic Complexity · connectionStore.useConnectionStore.refreshSidebarTableSearchIndex (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts
  • Cyclomatic Complexity · queryStore.useQueryStore.releasePluginConnectionsAfterClose (cyclomatic 16) apps/desktop/src/stores/queryStore.ts
  • Cognitive Complexity · dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner (cognitive 514) crates/dbx-sql-schema/src/schema_diff.rs
  • Cognitive Complexity · queryStore.useQueryStore.fetchTabResultForExport (cognitive 187) apps/desktop/src/stores/queryStore.ts
  • Cognitive Complexity · dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_with_partition_clause (cognitive 165) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs
  • Cognitive Complexity · AppState::get_or_create_pool_for_session_inner (cognitive 163) REDACTED
  • Cognitive Complexity · dbx::commands::connection::test_connection_with_info_inner (cognitive 97) src-tauri/src/commands/connection.rs
  • Cognitive Complexity · dbx::commands::transfer::start_transfer (cognitive 69) src-tauri/src/commands/transfer.rs
  • Cognitive Complexity · dbx::commands::connection::connect_db (cognitive 63) src-tauri/src/commands/connection.rs
  • Cognitive Complexity · dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_mode (cognitive 34) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs
  • Cognitive Complexity · dbx_web::routes::connection::run_temporary_connection_test (cognitive 29) crates/dbx-web/src/routes/connection.rs
  • Cognitive Complexity · dbx_sql_core::object_source_sql::build_executable_object_source_statements (cognitive 27) crates/dbx-sql-core/src/object_source_sql.rs
  • Cognitive Complexity · dbx_drivers::db::sqlite_worker::connect_sqlite_worker (cognitive 25) crates/dbx-drivers/src/db/sqlite_worker.rs
  • Cognitive Complexity · sqlNavigation.sqlObjectHoverDetail (cognitive 25) apps/desktop/src/lib/sql/sqlNavigation.ts
  • Cognitive Complexity · dataGridInsertPaste.readValueToken (cognitive 24) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts
  • Cognitive Complexity · dbx::commands::list_sql_files::scan_sql_files_with_directories (cognitive 23) src-tauri/src/commands/list_sql_files.rs
  • Cognitive Complexity · PhysicalConnectionBudget.wrap (cognitive 23) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java
  • Cognitive Complexity · dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statement_with_formatters (cognitive 22) REDACTED
  • Cognitive Complexity · queryStore.useQueryStore.buildQueryResultExportRequest (cognitive 22) apps/desktop/src/stores/queryStore.ts
  • Cognitive Complexity · SnippetSyncClient::put_snapshot (cognitive 21) crates/dbx-core/src/persistence/cloud_sync.rs
  • Cognitive Complexity · HanaDoBlock::is_complete (cognitive 21) crates/dbx-sql-core/src/sql.rs
  • Cognitive Complexity · dbx_web::routes::connection::sync_connection_configs (cognitive 20) crates/dbx-web/src/routes/connection.rs
  • Cognitive Complexity · connectionStore.useConnectionStore.tableMatchScore (cognitive 20) apps/desktop/src/stores/connectionStore.ts
  • Cognitive Complexity · dbx_core::query::document_ops::find_documents_core (cognitive 19) crates/dbx-core/src/query/document_ops.rs
  • Cognitive Complexity · AppState::connection_endpoint (cognitive 18) REDACTED
  • Cognitive Complexity · dbx_core::schema::get_table_comment_core_for_session (cognitive 18) crates/dbx-core/src/schema/mod.rs
  • Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.sqlErrorDecorationRange (cognitive 18) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts
  • Cognitive Complexity · useDataGridExport.useDataGridExport.sqlInsertExportData (cognitive 18) apps/desktop/src/composables/useDataGridExport.ts
  • Cognitive Complexity · dbx_drivers::db::ssh_tunnel::try_authenticate_with_agent (cognitive 17) crates/dbx-drivers/src/db/ssh_tunnel.rs
  • Cognitive Complexity · connectionStore.useConnectionStore.refreshSidebarTableSearchIndex (cognitive 17) apps/desktop/src/stores/connectionStore.ts
  • Cognitive Complexity · dbx_sql_data::data_grid_sql::push_mysql_delete_batches (cognitive 16) REDACTED
  • Cognitive Complexity · useDataGridExport.useDataGridExport.exportResultSheetsXlsxResult (cognitive 16) apps/desktop/src/composables/useDataGridExport.ts
  • Cognitive Complexity · sidebarSearchTree.filterLocallySearchedTables (cognitive 16) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts
  • God Classes · MethodTooLong: AppState.get_or_create_pool_for_session_inner REDACTED
  • God Classes · FunctionTooLong: dbx::commands::connection::test_connection_with_info_inner src-tauri/src/commands/connection.rs
  • God Classes · FunctionTooLong: dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner crates/dbx-sql-schema/src/schema_diff.rs
  • God Classes · FunctionTooLong: dbx::commands::transfer::start_transfer src-tauri/src/commands/transfer.rs
  • God Classes · FunctionTooLong: dbx_web::routes::transfer::start_transfer crates/dbx-web/src/routes/transfer.rs
  • God Classes · ClassTooLong: OceanBaseOracleAgent agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java
  • God Classes · FunctionTooLong: dbx::commands::connection::connect_db src-tauri/src/commands/connection.rs
  • God Classes · FunctionTooLong: queryStore.useQueryStore.fetchTabResultForExport apps/desktop/src/stores/queryStore.ts
  • God Classes · FunctionTooLong: dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_with_partition_clause crates/dbx-sql-schema/src/table_structure_sql/create_table.rs
  • God Classes · TooManyFunctions: dbx::commands::redis_cmd src-tauri/src/commands/redis_cmd.rs
  • God Classes · FunctionTooLong: dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statement_with_formatters REDACTED
  • God Classes · FileTooLong: routes/transfer.rs crates/dbx-web/src/routes/transfer.rs
  • God Classes · FunctionTooLong: useDataGridExport.useDataGridExport.exportQueryResultViaBackend apps/desktop/src/composables/useDataGridExport.ts
  • God Classes · MethodTooLong: KafkaAgent.getConsumerGroupSnapshot agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java
  • Code Duplication · Near-duplicate member family (4 members, 28 shared lines) crates/dbx-core/src/data/transfer.rs
  • Code Duplication · Near-duplicate member pair (38 shared lines) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java
  • Code Duplication · Near-duplicate member pair (28 shared lines) REDACTED
  • Code Duplication · Edited copy of a member (26 corresponding lines) crates/dbx-drivers/src/db/rqlite_driver.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (13 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) crates/dbx-driver-agent/src/agent_driver.rs
  • Code Duplication · Members sharing a duplicated core (25 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java
  • Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) crates/dbx-driver-elasticsearch/src/lib.rs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai.rs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-mcp/src/server.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-driver-sqlserver/src/sqlserver.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-mcp/src/server.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-sql-schema/src/schema_diff.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-web/src/routes/schema.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java
Rebuild cost: about €1,600,000 · Estimate
Cost to rebuild€540,000 to €2,700,000, for 8,921 to 28,301 hours of work, about 11.1 person-years for 6 to 21 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 50. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeVery large: 1,540,228 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 6 points · Medium effort · Keyboard semantics
2
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Raises the score by about 3 points · Medium effort · Visual & motion safety
3
Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Raises the score by about 2 points · Medium effort · A11y enforcement

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €1,600,000 to build again, about 11.1 person-years of work. Its weakest lens is Accessibility, at 39 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 1,445,354 lines over the last 90 days, which is about 5,861,713 lines a year. At that pace, the extra work comes to an estimated 786.2 to 4716.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch @dbx-app/cli cli @dbx-app/mcp-server mcp-server @dbx-app/plugin-cli plugin-cli dbx dbx dbx-core dbx-core dbx->dbx-core dbx-mcp dbx-mcp dbx->dbx-mcp dbx-platform dbx-platform dbx->dbx-platform dbx-drivers dbx-drivers dbx-core->dbx-drivers dbx-core->dbx-platform dbx-sql dbx-sql dbx-core->dbx-sql dbx-types dbx-types dbx-core->dbx-types dbx-driver-agent dbx-driver-agent dbx-driver-agent->dbx-platform dbx-sql-core dbx-sql-core dbx-driver-agent->dbx-sql-core dbx-driver-agent->dbx-types dbx-driver-mysql dbx-driver-mysql dbx-driver-support dbx-driver-support dbx-driver-mysql->dbx-driver-support dbx-driver-mysql->dbx-sql-core dbx-sql-dialect dbx-sql-dialect dbx-driver-mysql->dbx-sql-dialect dbx-driver-mysql->dbx-types dbx-driver-postgres dbx-driver-postgres dbx-driver-postgres->dbx-driver-support dbx-driver-postgres->dbx-sql-core dbx-driver-postgres->dbx-types dbx-driver-sqlserver dbx-driver-sqlserver dbx-driver-sqlserver->dbx-driver-support dbx-driver-sqlserver->dbx-sql-core dbx-sql-data dbx-sql-data dbx-driver-sqlserver->dbx-sql-data dbx-driver-sqlserver->dbx-types dbx-driver-support->dbx-platform dbx-driver-support->dbx-types dbx-drivers->dbx-driver-agent dbx-drivers->dbx-driver-mysql dbx-drivers->dbx-driver-postgres dbx-drivers->dbx-driver-sqlserver dbx-drivers->dbx-driver-support dbx-drivers->dbx-platform dbx-drivers->dbx-sql-core dbx-drivers->dbx-sql-data dbx-drivers->dbx-sql-dialect dbx-drivers->dbx-types dbx-mcp->dbx-core dbx-sql->dbx-sql-core dbx-sql->dbx-sql-data dbx-sql->dbx-sql-dialect dbx-sql-schema dbx-sql-schema dbx-sql->dbx-sql-schema dbx-sql->dbx-types dbx-sql-core->dbx-types dbx-sql-data->dbx-sql-core dbx-sql-data->dbx-sql-dialect dbx-sql-data->dbx-types dbx-sql-dialect->dbx-types dbx-sql-schema->dbx-sql-core dbx-sql-schema->dbx-sql-dialect dbx-sql-schema->dbx-types github.com/beltran/gosasl gosasl __more__ +98 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

1953 modules, with 3204 dependencies between them. 10 loops run through 93 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1913 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 apps.desktop.src.docs.types2 apps.desktop.src.types.generated.databaseTypes3 com.dbx.agent4 dbx_driver_agent.startup_cleanup5 dbx_duckdb_driver.wire6 dbx_types.native_jobs7 pageant.error8 rumqttc.mqttbytes9 apps.desktop.src.lib.backend.tauri10 dbx_driver_agent.agent_driver11 dbx_driver_postgres.text_encoding12 dbx_sql_schema.table_structure_sql.types13 dbx_types.models.connection14 rumqttc15 apps.desktop.src.lib.export16 apps.desktop.src.types.database17 dbx_ai_provider.ai18 dbx_types.types19 apps.desktop.src.components.editor20 apps.desktop.src.composables21 apps.desktop.src.lib.ai22 apps.desktop.src.lib.app23 apps.desktop.src.lib.backend24 apps.desktop.src.lib.connection25 apps.desktop.src.lib.dataGrid26 apps.desktop.src.lib.database27 apps.desktop.src.lib.sidebar28 apps.desktop.src.lib.sql29 apps.desktop.src.stores.settingsStore30 dbx_core.persistence.storage31 dbx_driver_mysql.mysql32 apps.desktop.src.lib.editor33 apps.desktop.src.lib.table34 apps.desktop.src.stores35 dbx_core.connection36 dbx_core.query37 dbx_web.state38 dbx.commands.query39 dbx_core.data.transfer40 dbx_web.routes.query
1 apps.desktop.src.docs.types
2 apps.desktop.src.types.generated.databaseTypes
3 com.dbx.agent
4 dbx_driver_agent.startup_cleanup
5 dbx_duckdb_driver.wire
6 dbx_types.native_jobs
7 pageant.error
8 rumqttc.mqttbytes
9 apps.desktop.src.lib.backend.tauri41
10 dbx_driver_agent.agent_driver61
11 dbx_driver_postgres.text_encoding1
12 dbx_sql_schema.table_structure_sql.types11
13 dbx_types.models.connection2
14 rumqttc1
15 apps.desktop.src.lib.export14
16 apps.desktop.src.types.database45
17 dbx_ai_provider.ai11
18 dbx_types.types72
19 apps.desktop.src.components.editor3
20 apps.desktop.src.composables22821
21 apps.desktop.src.lib.ai1225
22 apps.desktop.src.lib.app112
23 apps.desktop.src.lib.backend4223982
24 apps.desktop.src.lib.connection7328
25 apps.desktop.src.lib.dataGrid4157
26 apps.desktop.src.lib.database221145
27 apps.desktop.src.lib.sidebar7154
28 apps.desktop.src.lib.sql2347
29 apps.desktop.src.stores.settingsStore11
30 dbx_core.persistence.storage1178
31 dbx_driver_mysql.mysql82113
32 apps.desktop.src.lib.editor162
33 apps.desktop.src.lib.table6122491
34 apps.desktop.src.stores1262912
35 dbx_core.connection14611
36 dbx_core.query22521374
37 dbx_web.state31
38 dbx.commands.query15113
39 dbx_core.data.transfer4121
40 dbx_web.routes.query1814
Uses a module listed above itPart of a loopThe module itself
1 apps.desktop.src.docs.types2 apps.desktop.src.types.generated.databaseTypes3 com.dbx.agent4 dbx_driver_agent.startup_cleanup5 dbx_duckdb_driver.wire6 dbx_types.native_jobs7 pageant.error8 rumqttc.mqttbytes9 apps.desktop.src.lib.backend.tauri10 dbx_driver_agent.agent_driver11 dbx_driver_postgres.text_encoding12 dbx_sql_schema.table_structure_sql.types13 dbx_types.models.connection14 rumqttc15 apps.desktop.src.lib.export16 apps.desktop.src.types.database17 dbx_ai_provider.ai18 dbx_types.types19 apps.desktop.src.components.editor20 apps.desktop.src.composables21 apps.desktop.src.lib.ai22 apps.desktop.src.lib.app23 apps.desktop.src.lib.backend24 apps.desktop.src.lib.connection25 apps.desktop.src.lib.dataGrid26 apps.desktop.src.lib.database27 apps.desktop.src.lib.sidebar28 apps.desktop.src.lib.sql29 apps.desktop.src.stores.settingsStore30 dbx_core.persistence.storage31 dbx_driver_mysql.mysql32 apps.desktop.src.lib.editor33 apps.desktop.src.lib.table34 apps.desktop.src.stores35 dbx_core.connection36 dbx_core.query37 dbx_web.state38 dbx.commands.query39 dbx_core.data.transfer40 dbx_web.routes.queryapps.desktop.src.docs.types1apps.desktop.src.types.generated.databaseTypes2com.dbx.agent3dbx_driver_agent.startup_cleanup4dbx_duckdb_driver.wire5dbx_types.native_jobs6pageant.error7rumqttc.mqttbytes8apps.desktop.src.lib.backend.tauri9dbx_driver_agent.agent_driver10dbx_driver_postgres.text_encoding11dbx_sql_schema.table_structure_sql.types12dbx_types.models.connection13rumqttc14apps.desktop.src.lib.export15apps.desktop.src.types.database16dbx_ai_provider.ai17dbx_types.types18apps.desktop.src.components.editor19apps.desktop.src.composables20apps.desktop.src.lib.ai21apps.desktop.src.lib.app22apps.desktop.src.lib.backend23apps.desktop.src.lib.connection24apps.desktop.src.lib.dataGrid25apps.desktop.src.lib.database26apps.desktop.src.lib.sidebar27apps.desktop.src.lib.sql28apps.desktop.src.stores.settingsStore29dbx_core.persistence.storage30dbx_driver_mysql.mysql31apps.desktop.src.lib.editor32apps.desktop.src.lib.table33apps.desktop.src.stores34dbx_core.connection35dbx_core.query36dbx_web.state37dbx.commands.query38dbx_core.data.transfer39dbx_web.routes.query404161111211445117232282112251124223982732841572211457154234711117882113162612249112629121461122521374311511341211814+1913 more modules (most-connected shown)

At a glance — Code Health · 56% · Adequate · gated by D1, D2 ·

At a glance — Architecture · 67% · Adequate · gated by R9 ·

At a glance — Maturity · 76% · Strong ·

At a glance — Readiness · 62% · Adequate · gated by D13, P7 ·

At a glance — Security · 59% · Adequate · gated by D28, D29, D30 ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 39% · Weak · gated by AC4, AC6 ·

At a glance — Performance · 79% · Strong ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection574High / Critical
A03:2025 — Software Supply Chain Failures109High / Critical
A07:2025 — Authentication Failures46High / Critical
A02:2025 — Security Misconfiguration31High / Critical

Roadmap

First, ensure all interactive elements are fully keyboard-operable and that every form control and button has a proper programmatic label. Next, improve visual safety by maintaining visible focus styles, respecting reduced motion preferences, and correcting low-contrast colors. Finally, enforce these standards by adding text alternatives for media and integrating automated accessibility checks into the development toolchain and CI pipeline.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+5.5 ptsMediumKeyboard semantics
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+2.7 ptsMediumVisual & motion safety
Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+2.4 ptsMediumA11y enforcement
Resolve the 34 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (16), REDACTED (5), REDACTED.+1.0 ptsMediumREDACTED Scanning
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+1.8 ptsMediumForms & labels
Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with queryStore.useQueryStore.executeTabSql (cyclomatic 569), settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 278).+0.9 ptsMediumCyclomatic Complexity
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+1.4 ptsMediumText alternatives
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+1.2 ptsMediumLarge Files

File quality

Per-file score 0–10 — a quality signature. Of 1118 files carrying findings, judged against the Preview bar: 2% slop · 11% mixed · 87% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.8SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.3SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 636

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 6594

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 297

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 15

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 92 of 92 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 92 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6AX9ES1ES2M1M2M3M4P1P10P2P3P4P5P6P7PF1PF2PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 7481 of 7527 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17b1f-434e-740d-b305-1c1031a015a3.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 76.6% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage --coverage.reporter=lcovonly`, or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 22,269 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 541 test source file(s) (.rs, .go, .java, .rb) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — the JavaScript/TypeScript suite (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in the repository root (28696 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/mcp-server/ (2 tests); node:test via `pnpm install --frozen-lockfile --ignore-scripts` in packages/plugin-cli/ (4 tests); node:test via `npm ci --ignore-scripts` in plugins/sdk/dev-host/ (58 tests)) did not finish re-running within its budget: too large to re-run within its budget.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D31 IaC & Container Security — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Checkov ran but its report could not be read (checkov produced no output — not a clean result). Every misconfiguration only checkov reports — most of its Terraform, CloudFormation, Bicep and Ansible policies — is absent from this card, so its absence here is not evidence those resources are configured correctly.
  • D31 IaC & Container Security — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Deploy/Dockerfile.dockerignore carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 32 of 33 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `.github/scripts/suggest-similar-issues.mjs`, `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java`, `apps/desktop/src/components/editor/queryEditorCodeMirrorRuntime.ts`, `apps/desktop/src/components/editor/queryEditorSqlExtensions.ts`, `apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts`, … (+58 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC2 Forms & labels — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 911 further occurrence(s) are not listed individually; the score already reflects all 951.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 51 further occurrence(s) are not listed individually; the score already reflects all 91.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 397 further occurrence(s) are not listed individually; the score already reflects all 437.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (deploy/docker-compose.yml). compose up failed (exit 17 — an image could not be built) — failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1: failed to do request: Head "https://registry-1.docker.io/v2/docker/dockerfile/manifests/1": Forbidden; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Go, Java, PHP, Python, Rust, Svelte components, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Go, PHP, Python, Rust, Svelte components, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P2 Observability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 100 further occurrence(s) are not listed individually; the score already reflects all 140.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1577 further occurrence(s) are not listed individually; the score already reflects all 1617.
  • R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 240 further occurrence(s) are not listed individually; the score already reflects all 280.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 104 further occurrence(s) are not listed individually; the score already reflects all 144.
  • X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 473 further occurrence(s) are not listed individually; the score already reflects all 513.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 47 further occurrence(s) are not listed individually; the score already reflects all 87.

Repo exclusion declarations: 9 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

1492 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was queryStore.useQueryStore.executeTabSql at 569. A further 83 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PickleUnpickler.dispatch at 62 — they are counted neither in the figure above nor in this dimension's score. 32 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: apps/desktop/src/lib/redis/codec/pickle.ts (PickleUnpickler.dispatch at 62), apps/desktop/src/lib/connection/connectionPresentation.ts (connectionPresentation.connectionUrlPlaceholder at 53), REDACTED (Gbase8sAgent.mapColType at 41), agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java (InformixAgent.mapColType at 31), crates/dbx-mcp/src/backend.rs (WebBackend::execute_mongo_command at 30), and 27 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

dbx_core::data::database_export::export_database_sql_core_inner (cyclomatic 130) · ×183REDACTED:4032
dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cyclomatic 164) · ×55crates/dbx-sql-schema/src/schema_diff.rs:6545
dbx_sql_core::object_source_sql::oracle_trigger::analyze (cyclomatic 72) · ×53crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:409
dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cyclomatic 37) · ×20crates/dbx-drivers/src/db/ssh_tunnel.rs:439
dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote (cyclomatic 53) · ×15REDACTED:2776

+ 1058 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with queryStore.useQueryStore.executeTabSql (cyclomatic 569), settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 278). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

2073 method(s) exceeded the cognitive complexity threshold of 15; the worst was queryStore.useQueryStore.executeTabSql at 683.

dbx_core::data::database_export::export_database_sql_core_inner (cognitive 298) · ×305REDACTED:4032
dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cognitive 578) · ×80crates/dbx-sql-schema/src/schema_diff.rs:6545
dbx_sql_core::sql::split_sql_statement_ranges_with_options (cognitive 152) · ×77crates/dbx-sql-core/src/sql.rs:1480
dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cognitive 66) · ×38crates/dbx-drivers/src/db/ssh_tunnel.rs:439
dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote (cognitive 81) · ×31REDACTED:2776

+ 1308 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 46 bodies over 120 down to 120 or less in Cognitive Complexity — start with queryStore.useQueryStore.executeTabSql (cognitive 683), dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cognitive 578), dbx_core::data::database_export::export_database_sql_core_inner (cognitive 298). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 46 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.8 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 100% · ceiling Prevented

713 god class(es) detected.

FunctionTooLong: useDataGridExport.useDataGridExport · ×303apps/desktop/src/composables/useDataGridExport.ts:226
FileTooLong: data/transfer.rs · ×250crates/dbx-core/src/data/transfer.rs
ClassTooLong: DbxJdbcPlugin · ×58REDACTED:64
TooManyMethods: DbxJdbcPlugin · ×43REDACTED:64
MethodTooLong: AppState.get_or_create_pool_for_session_inner_with_receipt · ×41REDACTED:3456

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 303 FunctionTooLong finding(s) in God Classes — start with REDACTED (21), transfer.rs (9), connectionStore.ts (8). — One of this dimension's main actionable groups (303 warning-level).
  2. Resolve the 250 FileTooLong finding(s) in God Classes — start with lib.rs (4), REDACTED (3), connection.rs (3). — One of this dimension's main actionable groups (250 warning-level).
  3. Resolve the 58 ClassTooLong finding(s) in God Classes — start with backend.rs (2), descriptor.rs (2), REDACTED. — One of this dimension's main actionable groups (58 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.6 / 10Stronggated by 1298 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Verified

1234 duplicated block group(s) detected. A further 64 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 24 of the 1298 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .ts (25% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (5 lines × 2) · ×155crates/dbx-ai-provider/src/ai.rs:2905
Duplicated block (7 lines × 2) · ×109agents/drivers/duckdb/src/schema.rs:422
Duplicated block (6 lines × 2) · ×103agents/drivers/duckdb/src/schema.rs:551
Duplicated block (9 lines × 2) · ×72crates/dbx-ai-provider/src/ai.rs:1602
Duplicated block (8 lines × 2) · ×70crates/dbx-ai-provider/src/ai.rs:4109

+ 224 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 155 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with REDACTED (8), mongodb_import_export.rs (8), mysql.rs (6). — One of this dimension's main actionable groups (155 warning-level).
  2. Resolve the 109 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with REDACTED (10), REDACTED (5), mongo_driver.rs (5). — One of this dimension's main actionable groups (109 warning-level).
  3. Resolve the 103 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mongodb_import_export.rs (6), sql.rs (3), transfer.rs (3). — One of this dimension's main actionable groups (103 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling9.2 / 10Stronggated by 11 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Prevented

118 production modules (Gradle+Cargo+npm+Go), 0 dependency cycle(s), 2 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 10 module(s) off the main sequence, with abstractness counted on 78 of the 118 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: dbx-formats · ×9
Unstable project dbx-drivers
Unstable project dbx-sql
Off the main sequence: dbx-agents:common

What to do

  1. Resolve the 9 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 1 Unstable project dbx-drivers finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project dbx-sql finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 7 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

7 of 458 classes have LCOM4 above 3.

Low cohesion: MqAdminConfig (LCOM4 6) · ×7crates/dbx-core/src/admin/mq/config.rs:48

What to do

  1. Resolve the 7 Low cohesion finding(s) in Cohesion (LCOM4) — start with connection.rs (2), config.rs, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

37821 test methods: 36827 unit, 985 integration, 0 BDD, 9 e2e. The JavaScript/TypeScript suite contributes 22270 `it`/`test` case(s) across 2104 test file(s) declaring at least one beside 1908 .NET test method(s); its tier split is read from package names and paths only. The Rust suite contributes 11929 `#[test]` function(s) across 640 file(s) declaring at least one; its unit/integration split is Cargo's own — 159 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 35 test function(s) across 3 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only. The Go suite contributes 1679 test case(s) across 187 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 0 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 13 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 1 zero-assertion, 12 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 22269 tests. Measured on the JavaScript/TypeScript suite only — at least 541 test source file(s) (.rs, .go, .java, .rb) went unread, so its test quality is unmeasured and is not in these counts.

Fixed-sleep synchronisation: compiled UI output waits for a successful build signal · ×12plugins/sdk/dev-host/tests/server.test.mjs:138
No assertions: removes a previous mode's function signature when the mode changesapps/desktop/src/components/editor/__tests__/QueryEditor.kingbase.integration.spec.ts:98
Mock-dominated test: skips the substring lookup when the prefix search fills the result budget or the filter is short · ×97apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:494

What to do

  1. Resolve the 97 Mock-dominated test finding(s) in Test Quality — start with useSidebarTreeExportRuntime.spec.ts (13), QueryResultTransferDialog.spec.ts (8), useDataGridEditor.spec.ts (7). — One of this dimension's main actionable groups (97 recommendation-level).
  2. Resolve the 12 Fixed-sleep synchronisation finding(s) in Test Quality — start with oracleForeignKeys.spec.ts (3), server.test.mjs, connectionStore.metadataLoading.spec.ts. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 1 No assertions finding(s) in Test Quality — start with QueryEditor.kingbase.integration.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene8.7 7.7 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 7.7 / 10 · rule-coverage 89% · ceiling Verified

7 outdated, 0 author-deprecated direct Go module(s), 4 pinning or checksum defect(s). 47 of 47 direct requirement(s) were graded against proxy.golang.org (0 not served there, 5 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and REDACTED there.

Dependency pinned to a stale untagged commit: github.com/jcmturner/krb5test · ×3
No REDACTED committed (plugins/sdk/cli/templates/go/backend/go.mod)
Outdated: gitee.com/XuguDB/go-xugu-driver · ×7

What to do

  1. Resolve the 3 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 No REDACTED committed (plugins/sdk/cli/templates/go/backend/go.mod) finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

28 secret(s) detected.

REDACTED

What to do

  1. Resolve the 34 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (16), REDACTED (5), REDACTED. — One of this dimension's main actionable groups (34 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 1048 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 7 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json and a Gradle build (build.gradle/build.gradle.kts), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots6.8 / 10Adequate✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 6.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: apps/desktop/src/stores/queryStore.ts (289×669=193341); apps/desktop/src/stores/settingsStore.ts (212×278=58936); apps/desktop/src/components/grid/DataGrid.vue (412×129=53148) Repeated repair below the complexity floor: crates/dbx-core/src/persistence/secret_codec.rs (15 of 17 changes were fixes); apps/desktop/src/lib/dataGrid/binaryCellDownload.ts (11 of 14 changes were fixes); apps/desktop/src/components/grid/DataGridCellDetailPanel.vue (10 of 19 changes were fixes)

Hotspot: apps/desktop/src/stores/queryStore.ts · ×308apps/desktop/src/stores/queryStore.ts:8102
Repeated repair: crates/dbx-core/src/persistence/secret_codec.rs · ×81crates/dbx-core/src/persistence/secret_codec.rs:395

What to do

  1. Resolve the 308 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (4), lib.rs (3), connection.rs (3). — One of this dimension's main actionable groups (308 warning-level).
  2. Resolve the 81 Repeated repair finding(s) in Churn × Complexity Hotspots — start with agents.rs (2), csv_export.rs (2), secret_codec.rs. — One of this dimension's main actionable groups (81 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.4 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

101 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is apps/desktop/src/lib/mongo/mongoCompletionTables.ts. Counted over 1780 of the 2561 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×6
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

3 deducted task-comment markers across 1274949 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×3crates/dbx-ai-provider/src/ai.rs:926

What to do

  1. Resolve the 3 TodoComment finding(s) in Explicit Debt — start with ai.rs, krb5.go, krb5_test.go. — One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 206 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.1 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 8.1 / 10 · rule-coverage 100% · ceiling Documented

8 of 83 build units (Cargo, Go, Gradle, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

11 finding(s): 0 critical, 11 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 10 REDACTED finding(s) in Secrets (history) — start with REDACTED (8), REDACTED (2). — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

574 finding(s): 0 critical, 462 high, 99 medium, 13 low. 345 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 76 file(s) — `.github/ISSUE_TEMPLATE/database_compatibility.yml`, `.github/scripts/suggest-similar-issues.mjs` (line 48), `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java` (line 630, line 643), `agents/gradlew` (line 74, line 178), `agents/scripts/build_offline_zip.sh` (line 9), … (+71 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 15 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 30 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 48 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (5), REDACTED (3). — One of this dimension's main actionable groups (48 issue-level).
  2. Resolve the 21 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (6), REDACTED (3). — One of this dimension's main actionable groups (21 issue-level).
  3. No action in Static Analysis (SAST) — all 345 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (345 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

97 finding(s): 5 critical, 16 high, 75 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 24 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (15), REDACTED (7), REDACTED (2). — One of this dimension's main actionable groups (24 warning-level).
  2. Resolve the 16 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (16 issue-level).
  3. Resolve the 5 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security6.3 6.1 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 97% · ceiling Documented

31 finding(s): 0 critical, 3 high, 27 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 27 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (21), REDACTED (6). — One of this dimension's main actionable groups (27 warning-level).
  2. Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

5 of 1780 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is apps/desktop/src/lib/database/jdbcxBuiltinDriver.ts. Counted over 1780 of the 2561 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×5apps/desktop/src/lib/database/jdbcxBuiltinDriver.ts:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.0 / 10Adequategated by 12 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: AgentProtocol.java↔agent_driver.rs 100%; TreeItem.vue↔treeNodeIcon.ts 100%; http.ts↔document_cmd.rs 100%

Boundary-crossing change coupling: AgentProtocol.java ↔ agent_driver.rs · ×12agents/common/src/main/java/com/dbx/agent/AgentProtocol.java:1
Change coupling: tests.rs ↔ triggers.rs · ×26crates/dbx-sql-schema/src/table_structure_sql/tests.rs:1
Change-coupling hub: treeNodeIcon.ts → REDACTED, TreeItem.vue, REDACTED, REDACTED, ko.ts, REDACTED, REDACTED, connectionStore.ts · ×16apps/desktop/src/lib/sidebar/treeNodeIcon.ts

What to do

  1. Resolve the 12 Boundary-crossing change coupling finding(s) in Change Coupling — start with AgentProtocol.java (2), redis.rs (2), mongo.rs (2). — One of this dimension's main actionable groups (12 issue-level).
  2. Resolve the 26 Change coupling finding(s) in Change Coupling — start with App.vue (2), RedisKeyBrowser.vue (2), QueryEditor.vue (2). — One of this dimension's main actionable groups (26 warning-level).
  3. Resolve the 16 Change-coupling hub finding(s) in Change Coupling — start with treeNodeIcon.ts, http.ts, REDACTED. — One of this dimension's main actionable groups (16 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 27 platform declaration(s) and 147 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives5.4 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — apps/desktop/src/components/editor/AiAttachmentCard.vue:49
  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×3) — apps/desktop/src/components/grid/DataGridCellDetailDialog.vue:226, apps/desktop/src/components/grid/DataGridCellDetailPanel.vue:199, docs/components/landing/Starfield.tsx:192
  • An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. — docs/components/DocsSidebarFooter.tsx:19

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels4.9 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×14) — apps/desktop/src/App.vue:5991, apps/desktop/src/App.vue:5996, apps/desktop/src/components/admin/DamengUserAdmin.vue:681, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×10) — apps/desktop/src/App.vue:5992, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:313, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:317, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×15) — apps/desktop/src/App.vue:6010, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:302, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:355, …
  • This <td> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label. — apps/desktop/src/components/admin/ProcessListPanel.vue:817

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure7.3 / 10Strong✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — apps/desktop/index.html:2, dbx-er-diagram-architecture.html:3, docs/app/(root)/layout.tsx:34
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×4) — apps/desktop/src/components/admin/MySqlDashboard.vue:247, apps/desktop/src/components/debug/DebuggeeSqlPanel.vue:52, apps/desktop/src/components/redis/RedisDashboard.vue:510, …
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — apps/desktop/src/components/diagram/DiagramInspector.vue:420
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — dbx-er-diagram-architecture.html:699
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — plugins/sdk/cli/templates/svelte/index.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.5 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×22) — apps/desktop/src/components/admin/ProcessListPanel.vue:795, apps/desktop/src/components/admin/ProcessListPanel.vue:817, apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:318, …
  • This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — apps/desktop/src/components/ai/rich/AiHtmlPreview.vue:104
  • The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×5) — apps/desktop/src/components/diagram/LayerPanel.vue:407, apps/desktop/src/components/diagram/LayerPanel.vue:429, apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:2274, …
  • This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. (×3) — apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:481, apps/desktop/src/components/diff/SchemaDiffRoutineList.vue:73, apps/desktop/src/components/layout/EditorGroupTabBar.vue:2502
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0". (×2) — apps/desktop/src/components/editor/EditorSettingsDialog.vue:12075, apps/desktop/src/components/import/TableImportDialog.vue:2410
  • The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×3) — apps/desktop/src/components/editor/TableStructurePeekDialog.vue:314, apps/desktop/src/components/editor/TableStructurePeekDialog.vue:320, apps/desktop/src/components/editor/TableStructurePeekDialog.vue:323
  • This <tr> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. — apps/desktop/src/components/grid/DataGridTableInfoPanels.vue:107
  • This <img> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. — apps/desktop/src/components/grid/ImagePreviewDialog.vue:223
  • This <div> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. — apps/desktop/src/components/layout/AppToolbar.vue:573
  • The repo's own CSS styles .app-tab-scrollbar with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/desktop/src/components/layout/EditorGroupTabBar.vue:2216

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness7.9 / 10Strong✓ Tool-verified

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden. (×4) — apps/desktop/src/components/explain/ExplainPlanNodeTree.vue:63, apps/desktop/src/components/grid/DataGrid.vue:15520, apps/desktop/src/components/layout/StartupLoading.vue:16, …

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety3.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×4) — apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:302, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:355, apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1227, …
  • <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×36) — apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:307, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:347, apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:363, …

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-vuejs-accessibility) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 620 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition8.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `EditorToolbarActions` declares 31 required operations: `newQuery`, `databaseRequiredSignalFor`, `connectionRequiredSignalFor`, `captureExecutionSnapshot`, `toolbarExecute`, `toolbarExecuteAll`, `toolbarExecuteInNewResultTab`, `cancelExecution`, `explain`, `formatSql`, `compressSql`, `toggleSqlKeywordCase`, `saveSql`, `saveAllTabs`, `openSqlFile`, `importResultArchive`, `pasteSqlInCondition`, `multiExecute`, `previewChanges`, `changeConnection`, `changeCatalog`, `changeDatabase`, `changeSchema`, `setDefaultDatabase`, `clearDefaultDatabase`, `activateSettingsPage`, `closeSettingsPage`, `activateDriverStore`, `closeDriverStore`, `activatePluginCenter`, `closePluginCenter`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — apps/desktop/src/components/layout/editorToolbarActions.ts:23
  • `QueryEditorSurfaceHandle` declares 23 required operations: `focusSearch`, `focusWhere`, `openGoToColumn`, `refreshData`, `toggleResultsPane`, `refreshQueryEditorCompletionCache`, `handleModRTarget`, `requestQueryEditorExecute`, `requestQueryEditorExecuteAll`, `captureQueryEditorExecutionSnapshot`, `requestQueryEditorExecuteInNewResultTab`, `requestQueryEditorPreviewChanges`, `shouldBlockQueryEditorExecutionShortcut`, `cancelQueryEditorExecutionViewport`, `acceptQueryEditorExecutionViewport`, `pasteClipboardAsSqlInCondition`, `applyTableStructureChanges`, `insertRedisCommand`, `executeRedisCommand`, `isRedisConsoleReady`, `previewStatementRange`, `focusStatementRange`, `focusErrorPosition`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — apps/desktop/src/components/layout/querySurfaces.ts:15
  • `UseDataGridLargeValuesOptions` declares 18 required operations: `gridScrollerElement`, `displayItemAt`, `getRowItem`, `tableColumnForGridColumn`, `formatCell`, `formatCellCached`, `scheduleCanvasDraw`, `clearCellFormatCache`, `invalidateResultEstimate`, `connectionIdentifierQuote`, `getConnectionConfig`, `uuid`, `translate`, `translateBackendError`, `appendDebugLog`, `toast`, `cloneRow`, `cloneRows`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — apps/desktop/src/composables/useDataGridLargeValues.ts:49

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

  • `InnerWebView.load_extensions` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — vendor/wry/src/webview2/mod.rs:1437

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)7.8 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 98 of 129 project(s) that lack one — worth up to 1.5 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 28/87 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `agents/drivers/access`, `agents/drivers/bigquery`, `agents/drivers/cache`, `agents/drivers/cassandra-go`, `agents/drivers/databend` and 54 more.
  • `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 81 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — deploy/plugin-stats-worker/worker.ts:81
  • `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 108 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — deploy/plugin-stats-worker/worker.ts:108
  • `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 363 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — deploy/plugin-stats-worker/worker.ts:363
  • `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 411 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — deploy/plugin-stats-worker/worker.ts:411
  • `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 755 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/savedSqlStore.ts:755
  • `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 835 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/savedSqlStore.ts:835
  • `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 947 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/savedSqlStore.ts:947
  • `apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts` reports through `console.*` at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts:67
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 214 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:214
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 592 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:592
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 661 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:661
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 736 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:736
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 748 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:748
  • `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 901 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/tabs/tabResultCache.ts:901
  • `apps/desktop/src/lib/sql/errorPosition.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/errorPosition.ts:51
  • `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/sqlHighlighter.ts:33
  • `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/sqlHighlighter.ts:48
  • `apps/desktop/src/lib/sql/sqlRichText.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sql/sqlRichText.ts:62
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 735 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:735
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 738 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:738
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 783 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:783
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 789 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:789
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 793 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:793
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 804 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:804
  • `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 893 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:893
  • `apps/desktop/src/lib/query/queryCursorOffsetPagination.ts` reports through `console.*` at line 71 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:71
  • `apps/desktop/src/lib/query/queryCursorOffsetPagination.ts` reports through `console.*` at line 77 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:77
  • `apps/desktop/src/lib/plugins/pluginCommandPalette.ts` reports through `console.*` at line 54 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginCommandPalette.ts:54
  • `apps/desktop/src/lib/plugins/pluginCommandRegistry.ts` reports through `console.*` at line 126 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginCommandRegistry.ts:126
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 444 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:444
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 453 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:453
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 454 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:454
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 499 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:499
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 522 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:522
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 816 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:816
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 837 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:837
  • `apps/desktop/src/lib/plugins/pluginFloatingWindow.ts` reports through `console.*` at line 883 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:883
  • `REDACTED` reports through `console.*` at line 436 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:436
  • `apps/desktop/src/lib/metadata/metadataRuntimeCache.ts` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/desktop/src/lib/metadata/metadataRuntimeCache.ts:170

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — REDACTED:158, REDACTED:204, REDACTED:390, …
  • `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — agents/scripts/build_driver_zips.py:114
  • `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — crates/dbx-core/src/persistence/cloud_sync.rs:1880, crates/dbx-core/src/persistence/cloud_sync.rs:1990, crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:67
  • `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/dbx-core/src/persistence/cloud_sync.rs:1999
  • `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/dbx-driver-agent/src/agent_manager.rs:1588

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
PF1 · Benchmark discipline8.5 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

  • A Go testing.B suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — agents/drivers/zookeeper/integration_test.go

What to do

  • Call b.ReportAllocs() in the benchmarks, or run them with `go test -bench . -benchmem`, so allocation regressions are visible, not just time.
PF2 · Allocation hygiene7.2 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 367 use(s) across 157,765 production line(s) (~2.3/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
  • Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
PF3 · Async & latency hygiene8.5 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `enable_wal_mode` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — REDACTED:1708

What to do

  • Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
R1 · Type Safety9.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.8 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • 340 duplicated blocks under apps/desktop/src/components/ have copies in at least two of the sibling directories admin, ai, backup, chart, codeSnapshot, common (+39 more sibling(s) not listed) — 197 of them are reported below, and 143 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 340 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 340 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 340 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/desktop/src/components/layout/SqlLibraryPanel.vue:1388
  • 221 duplicated blocks under apps/desktop/src/ have copies in at least two of the sibling directories components, composables, lib, stores, types — 137 of them are reported below, and 84 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 221 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 221 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 221 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/desktop/src/components/sidebar/TreeItem.vue:307
  • 148 duplicated blocks under apps/desktop/src/lib/ have copies in at least two of the sibling directories ai, app, backend, backup, cloudSync, codeSnapshot (+39 more sibling(s) not listed) — 98 of them are reported below, and 50 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 148 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 148 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 148 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/desktop/src/lib/app/documentJsonValues.ts:306
  • apps/desktop/src/lib/backend/http.ts:1621 · apps/desktop/src/lib/backend/tauri.ts:2067 — the two spans are one implementation copied and then locally edited — 1185 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/backend/http.ts:1621
  • apps/desktop/src/components/admin/DamengRoleAdmin.vue:58 · apps/desktop/src/components/admin/DamengUserAdmin.vue:81 — the two spans are one implementation copied and then locally edited — 1634 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/admin/DamengRoleAdmin.vue:58
  • apps/desktop/src/components/layout/SqlLibraryPanel.vue:1388 · apps/desktop/src/components/transfer/TransferTaskTree.vue:333 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — apps/desktop/src/components/layout/SqlLibraryPanel.vue:1388
  • apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78 · apps/desktop/src/components/grid/DataGridSortBuilder.vue:49 — the two spans are one implementation copied and then locally edited — 1169 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78
  • apps/desktop/src/lib/metadata/objectDdlCache.ts:44 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:25 — the two spans are one implementation copied and then locally edited — 1086 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/metadata/objectDdlCache.ts:44
  • apps/desktop/src/components/admin/MySqlDashboard.vue:32 · apps/desktop/src/components/admin/PostgresDashboard.vue:29 — the two spans are one implementation copied and then locally edited — 1085 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/admin/MySqlDashboard.vue:32
  • apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84 · apps/desktop/src/components/mq/rabbitmq/RabbitMqPoliciesPanel.vue:58 — the two spans are one implementation copied and then locally edited — 589 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84
  • apps/desktop/src/components/sidebar/TreeItem.vue:307 · apps/desktop/src/lib/sidebar/treeNodeIcon.ts:54 — the two spans are one implementation copied and then locally edited — 578 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/sidebar/TreeItem.vue:307
  • apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45 · apps/desktop/src/components/grid/DataGridTextSortWorkbench.vue:28 — the two spans are one implementation copied and then locally edited — 610 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45
  • apps/desktop/src/lib/app/documentJsonValues.ts:306 · apps/desktop/src/lib/common/safeJsonFormat.ts:462 — the two spans are one implementation copied and then locally edited — 596 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/app/documentJsonValues.ts:306
  • apps/desktop/src/lib/metadata/objectDdlCache.ts:193 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:131 — the two spans are one implementation copied and then locally edited — 569 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/metadata/objectDdlCache.ts:193
  • apps/desktop/src/lib/sql/sqlStatementRanges.ts:1226 · apps/desktop/src/lib/sql/sqlStatementRanges.ts:1460 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — apps/desktop/src/lib/sql/sqlStatementRanges.ts:1226
  • REDACTED:6489 · REDACTED:6618 — the two spans are one implementation copied and then locally edited — 291 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:6489
  • apps/desktop/src/components/connection/ConnectionTreeSelect.vue:76 · apps/desktop/src/components/ui/searchable-select/SearchableSelect.vue:175 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/connection/ConnectionTreeSelect.vue:76
  • apps/desktop/src/lib/backend/http.ts:4278 · apps/desktop/src/lib/backend/tauri.ts:4432 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — apps/desktop/src/lib/backend/http.ts:4278
  • apps/desktop/src/lib/sql/identifierSearch.ts:7 · apps/desktop/src/lib/sql/sqlCompletion.ts:6794 — the two spans are one implementation copied and then locally edited — 523 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/sql/identifierSearch.ts:7
  • apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65 · apps/desktop/src/components/grid/GridSnapshotDialog.vue:29 — the two spans are one implementation copied and then locally edited — 436 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65
  • apps/desktop/src/components/sidebar/ConnectionTree.vue:1373 · apps/desktop/src/components/sidebar/ConnectionTree.vue:1446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/desktop/src/components/sidebar/ConnectionTree.vue:1373
  • apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12 · apps/desktop/src/components/mq/SendMessagePanel.vue:12 — the two spans are one implementation copied and then locally edited — 390 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12
  • apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20 · apps/desktop/src/components/plugins/PluginWorkbenchTab.vue:27 — the two spans are one implementation copied and then locally edited — 408 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20
  • apps/desktop/src/lib/sql/sqlFormatter.ts:633 · apps/desktop/src/lib/sql/sqlFormatter.ts:996 — the two spans are one implementation copied and then locally edited — 491 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/sql/sqlFormatter.ts:633
  • apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68 · apps/desktop/src/composables/useDataGridScrollbars.ts:44 — the two spans are one implementation copied and then locally edited — 260 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68
  • apps/desktop/src/components/generate/params/IdNumberParams.vue:37 · apps/desktop/src/lib/dataGrid/dataGenerate.ts:704 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — apps/desktop/src/components/generate/params/IdNumberParams.vue:37
  • apps/desktop/src/components/mq/ExchangesPanel.vue:107 · apps/desktop/src/components/mq/TopicsPanel.vue:259 — the two spans are one implementation copied and then locally edited — 292 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/mq/ExchangesPanel.vue:107
  • apps/desktop/src/lib/backend/tauri.ts:391 · apps/desktop/src/stores/settingsStore.ts:88 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — apps/desktop/src/lib/backend/tauri.ts:391
  • apps/desktop/src/components/plugins/PluginFileManager.vue:190 · apps/desktop/src/composables/usePluginShortcutHeight.ts:64 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/plugins/PluginFileManager.vue:190
  • apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38 · apps/desktop/src/lib/table/oracleRoutineRename.ts:53 — the two spans are one implementation copied and then locally edited — 541 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38
  • apps/desktop/src/stores/savedSqlStore.ts:1017 · apps/desktop/src/stores/transferTaskStore.ts:397 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/stores/savedSqlStore.ts:1017
  • apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380 · apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:43 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380
  • apps/desktop/src/components/objects/ObjectBrowser.vue:4738 · apps/desktop/src/components/objects/ObjectSourceDialog.vue:276 — the two spans are one implementation copied and then locally edited — 282 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/objects/ObjectBrowser.vue:4738
  • apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20 · apps/desktop/src/components/sidebar/VisibleSchemasDialog.vue:33 — the two spans are one implementation copied and then locally edited — 334 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20
  • apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160 · apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:370 — the two spans are one implementation copied and then locally edited — 343 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160
  • apps/desktop/src/components/editor/EditorSettingsDialog.vue:809 · apps/desktop/src/components/editor/EditorSettingsDialog.vue:990 — the two spans are one implementation copied and then locally edited — 534 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/desktop/src/components/editor/EditorSettingsDialog.vue:809
  • apps/desktop/src/lib/backend/tauri.ts:6778 · apps/desktop/src/lib/backend/tauri.ts:6830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/desktop/src/lib/backend/tauri.ts:6778
  • apps/desktop/src/components/connection/ConnectionDialog.vue:7019 · apps/desktop/src/components/connection/TunnelProfileManager.vue:84 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/desktop/src/components/connection/ConnectionDialog.vue:7019
  • apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:860 · apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:860
  • apps/desktop/src/lib/backend/http.ts:3742 · apps/desktop/src/lib/backend/http.ts:3815 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — apps/desktop/src/lib/backend/http.ts:3742

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.7 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • apps/desktop/src/lib/diagram/elk-layout.ts:1 imports elkjs/lib/elk.bundled.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/diagram/elk-layout.ts:1
  • apps/desktop/src/lib/sql/layout/internals.ts:60 imports sql-formatter/dist/esm/parser/createParser.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:60
  • apps/desktop/src/lib/sql/layout/internals.ts:61 imports sql-formatter/dist/esm/dialect.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:61
  • apps/desktop/src/lib/sql/layout/internals.ts:62 imports sql-formatter/dist/esm/allDialects.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:62
  • apps/desktop/src/lib/sql/layout/internals.ts:63 imports sql-formatter/dist/esm/formatter/ExpressionFormatter.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:63
  • apps/desktop/src/lib/sql/layout/internals.ts:64 imports sql-formatter/dist/esm/formatter/InlineLayout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:64
  • apps/desktop/src/lib/sql/layout/internals.ts:65 imports sql-formatter/dist/esm/formatter/Params.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:65
  • apps/desktop/src/lib/sql/layout/internals.ts:66 imports sql-formatter/dist/esm/formatter/Layout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:66
  • apps/desktop/src/lib/sql/layout/internals.ts:67 imports sql-formatter/dist/esm/formatter/Indentation.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/desktop/src/lib/sql/layout/internals.ts:67
  • packages/app-tests/mongoShellCommand.test.ts:43 reaches past another workspace package's public entry into its internals with a relative path (../mongo-shell/src/json.ts) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/app-tests/mongoShellCommand.test.ts:43

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity7.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • executeTabSql has cyclomatic complexity 627 and cognitive complexity 832; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/queryStore.ts:8102
  • connectionConfigForSubmit has cyclomatic complexity 285 and cognitive complexity 362; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/connection/ConnectionDialog.vue:4926
  • applyEditorSettingsPatch has cyclomatic complexity 276 and cognitive complexity 294; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/settingsStore.ts:3005
  • send has cyclomatic complexity 240 and cognitive complexity 346; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/editor/AiAssistant.vue:4061
  • toggle has cyclomatic complexity 220 and cognitive complexity 239; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:917
  • dispatch has cyclomatic complexity 180 and cognitive complexity 281; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:648
  • fetchCapturedTabResultForExport has cyclomatic complexity 171 and cognitive complexity 242; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/queryStore.ts:10991
  • normalizeEditorSettings has cyclomatic complexity 164 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/settingsStore.ts:2014
  • buildObjectSidebarMenu has cyclomatic complexity 133 and cognitive complexity 215; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:7987
  • onGridKeydown has cyclomatic complexity 129 and cognitive complexity 133; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/grid/DataGrid.vue:11734
  • handleKeydown has cyclomatic complexity 127 and cognitive complexity 144; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/App.vue:4667
  • saveChanges has cyclomatic complexity 125 and cognitive complexity 149; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/composables/useDataGridEditor.ts:2440
  • refreshSqlPreview has cyclomatic complexity 124 and cognitive complexity 180; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/structure/TableStructureEditor.vue:3472
  • prepareOracleTypeManagement has cyclomatic complexity 122 and cognitive complexity 203; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/table/oracleTypeManagement.ts:230
  • performAsyncCompletionWithResult has cyclomatic complexity 122 and cognitive complexity 151; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1582
  • openData has cyclomatic complexity 114 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38
  • ensureTreeLoadedForTarget has cyclomatic complexity 109 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/sidebar/ConnectionTree.vue:1886
  • buildDefaultGeneratorParams has cyclomatic complexity 108 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/lib/dataGrid/dataGenerate.ts:1259
  • loadTreeNodeChildren has cyclomatic complexity 107 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/stores/connectionStore.ts:8584
  • getIconInfo has cyclomatic complexity 107 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/desktop/src/components/sidebar/TreeItem.vue:267

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files4.0 / 10Weak✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • apps/desktop/src/components/grid/DataGrid.vue has 17278 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/grid/DataGrid.vue:1
  • REDACTED has 13712 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 13674 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/components/editor/EditorSettingsDialog.vue has 13474 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/editor/EditorSettingsDialog.vue:1
  • REDACTED has 13442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 13022 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 13001 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 12983 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 12966 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/i18n/locales/ko.ts has 12480 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/i18n/locales/ko.ts:1
  • REDACTED has 12029 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 12014 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/stores/queryStore.ts has 11226 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/stores/queryStore.ts:1
  • apps/desktop/src/i18n/locales/az.ts has 11119 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/i18n/locales/az.ts:1
  • apps/desktop/src/components/connection/ConnectionDialog.vue has 11086 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/connection/ConnectionDialog.vue:1
  • REDACTED has 11013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/stores/connectionStore.ts has 10978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/stores/connectionStore.ts:1
  • apps/desktop/src/components/structure/TableStructureEditor.vue has 10120 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/structure/TableStructureEditor.vue:1
  • REDACTED has 8523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/components/editor/AiAssistant.vue has 7836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/editor/AiAssistant.vue:1
  • apps/desktop/src/components/objects/ObjectBrowser.vue has 6869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/objects/ObjectBrowser.vue:1
  • apps/desktop/src/lib/sql/sqlCompletion.ts has 6524 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/sql/sqlCompletion.ts:1
  • apps/desktop/src/lib/backend/tauri.ts has 6128 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/backend/tauri.ts:1
  • apps/desktop/src/App.vue has 5743 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/App.vue:1
  • apps/desktop/src/lib/backend/http.ts has 5116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/backend/http.ts:1
  • apps/desktop/src/components/redis/RedisKeyBrowser.vue has 4030 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/redis/RedisKeyBrowser.vue:1
  • apps/desktop/src/components/redis/RedisValueViewer.vue has 3956 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/redis/RedisValueViewer.vue:1
  • apps/desktop/src/components/layout/ContentArea.vue has 3854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/layout/ContentArea.vue:1
  • apps/desktop/src/components/nacos/NacosAdminConsole.vue has 3778 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/nacos/NacosAdminConsole.vue:1
  • apps/desktop/src/stores/settingsStore.ts has 3359 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/stores/settingsStore.ts:1
  • apps/desktop/src/components/document/DocumentBrowser.vue has 3299 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/document/DocumentBrowser.vue:1
  • apps/desktop/src/components/editor/QueryEditor.vue has 3296 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/editor/QueryEditor.vue:1
  • apps/desktop/src/components/sidebar/ConnectionTree.vue has 3052 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/sidebar/ConnectionTree.vue:1
  • apps/desktop/src/types/database.ts has 2909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/types/database.ts:1
  • apps/desktop/src/composables/useDataGridEditor.ts has 2840 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/composables/useDataGridEditor.ts:1
  • apps/desktop/src/composables/useDataGridExport.ts has 2838 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/composables/useDataGridExport.ts:1
  • apps/desktop/src/lib/sql/sqlStatementRanges.ts has 2768 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/lib/sql/sqlStatementRanges.ts:1
  • apps/desktop/src/components/layout/EditorGroupTabBar.vue has 2471 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/layout/EditorGroupTabBar.vue:1
  • REDACTED has 2409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/desktop/src/components/import/TableImportDialog.vue has 2341 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src/components/import/TableImportDialog.vue:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.8 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×32) — deploy/plugin-stats-worker/worker.ts:1, plugins/sdk/dev-host/ui/App.vue:1, scripts/sync-connection-types.mjs:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.6 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code8.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 84 application, 20 tooling and 2157 test entry point(s) detected in this repo. Gate removals on `pnpm run typecheck` — an undetected custom entry would make these reachable.
  • no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×14) — deploy/plugin-stats-worker/worker.ts, REDACTED, REDACTED, …
  • Nothing imports this binding — it is safe to review for removal. (×25) — apps/desktop/src/components/debug/plDebugLaunch.ts:46, apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:11, apps/desktop/src/composables/useSchemaDiffSession.ts:438, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.5 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
  • Declared in plugins/sdk/dev-host/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • apps/desktop/src/components/ui/badge/Badge.vue → apps/desktop/src/components/ui/badge/index.ts → apps/desktop/src/components/ui/badge/Badge.vue — apps/desktop/src/components/ui/badge/Badge.vue:8
  • apps/desktop/src/components/ui/button/Button.vue → apps/desktop/src/components/ui/button/index.ts → apps/desktop/src/components/ui/button/Button.vue — apps/desktop/src/components/ui/button/Button.vue:7
  • apps/desktop/src/components/ui/select/SelectContent.vue → apps/desktop/src/components/ui/select/index.ts → apps/desktop/src/components/ui/select/SelectContent.vue — apps/desktop/src/components/ui/select/SelectContent.vue:9
  • apps/desktop/src/components/ui/tabs/TabsList.vue → apps/desktop/src/components/ui/tabs/index.ts → apps/desktop/src/components/ui/tabs/TabsList.vue — apps/desktop/src/components/ui/tabs/TabsList.vue:8
  • apps/desktop/src/lib/backend/http.ts → apps/desktop/src/lib/backend/tauri.ts → apps/desktop/src/lib/backend/http.ts — apps/desktop/src/lib/backend/http.ts:1586
  • apps/desktop/src/lib/sql/sqlRisk.ts → apps/desktop/src/types/database.ts → apps/desktop/src/lib/database/oracleTriggerPlan.ts → apps/desktop/src/lib/database/productionExecutionGuard.ts → apps/desktop/src/lib/database/productionSafety.ts → apps/desktop/src/lib/sql/sqlRisk.ts (one verified cycle inside a mutually-dependent group of 30 files) — apps/desktop/src/lib/sql/sqlRisk.ts:5

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture6.5 / 10Adequate✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `https://analytics.unihub.top/script.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. — docs/app/[lang]/layout.tsx:66
  • Set: Referrer-Policy, X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−1.5 on this card.) — docs/public/_headers:1

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
  • Add Content-Security-Policy, Strict-Transport-Security, X-Frame-Options beside the headers already set; Content-Security-Policy is the one that pays for itself first, then Strict-Transport-Security, then nosniff and a frame policy.
X1 · Async correctness8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`. — REDACTED:1726

What to do

  • Blocking `thread::sleep` inside an `async` body
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader5.2 / 10Adequate✓ Tool-verified

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

  • `column_count` is read from the bytes being parsed at line 390 (`u32::from_be_bytes`), then used to size a `Vec::with_capacity` at line 406 — and nowhere in its scope is `column_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `column_count` against the bytes actually remaining and a maximum the format allows before allocating. — crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:406
  • `len` is read from the bytes being parsed at line 3361 (`u32::from_le_bytes`), then used to size a `vec![…; n]` at line 3363 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating. — REDACTED:3363

What to do

  • Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `typeManagementRecordsEqual` is exported, takes a document from its caller (line 3) and hands it to `canonical`, which calls itself at line 5 (`canonical`) with a piece of `value` (and at line 11) — and nowhere in `canonical` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonical` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/table/oracleTypeManagementRecord.ts:5
  • `parseRedisCommandDocumentation` is exported, takes a document from its caller (line 176) and hands it to `collect`, which calls itself at line 195 (`collect`) with a piece of `rawDocs` — and nowhere in `collect` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collect` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/redis/redisCommandDocs.ts:195
  • `parseRedisCommandDocumentation` is exported, takes a document from its caller (line 176) and hands it to `collect`, which calls itself at line 225 (`collect`) with a piece of `rawValue` (and at line 229, line 235, line 237) — and nowhere in `collect` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collect` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/redis/redisCommandDocs.ts:225
  • `toJsonable` is exported and takes `value: unknown` from its caller, and it calls itself at line 615 (`toJsonable`) with a piece of `value` (and at line 617, line 622) — and nowhere in `toJsonable` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `toJsonable` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/redis/codec/pickle.ts:615
  • `mongoDocumentDisplayText` is exported and takes `value: unknown` from its caller, and it calls itself at line 213 (`mongoDocumentDisplayText`) with a piece of `value` (and at line 219) — and nowhere in `mongoDocumentDisplayText` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `mongoDocumentDisplayText` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/mongo/mongoDocumentValues.ts:213
  • `mongoDocumentRelaxedExtendedJson` is exported and takes `value: unknown` from its caller, and it calls itself at line 275 (`mongoDocumentRelaxedExtendedJson`) with a piece of `value` (and at line 277) — and nowhere in `mongoDocumentRelaxedExtendedJson` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `mongoDocumentRelaxedExtendedJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/mongo/mongoDocumentValues.ts:275
  • `formatMongoShellLiteral` is exported and takes `value: unknown` from its caller, and it calls itself at line 688 (`formatMongoShellLiteral`) with a piece of `value` (and at line 704) — and nowhere in `formatMongoShellLiteral` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `formatMongoShellLiteral` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/mongo/mongoDocumentValues.ts:688
  • `jsonDetailDisplayValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 237 (`jsonDetailDisplayValue`) with a piece of `value` (and at line 239) — and nowhere in `jsonDetailDisplayValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `jsonDetailDisplayValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/lib/dataGrid/dataGridDetail.ts:237
  • `queryResultTransferSqlLiteral` is exported, takes a document from its caller (line 412) and hands it to `postgresArrayLiteral`, which calls itself at line 366 (`postgresArrayLiteral`) with a piece of `value` — and nowhere in `postgresArrayLiteral` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `postgresArrayLiteral` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src/components/transfer/queryResultTransferValues.ts:366

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation5.6 / 10Adequate✓ Tool-verified

Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 18/66 functions that make a cancellable request (fetch, axios, ky, ofetch; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `verifyDev` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/verify-plugin-cli-package.mjs:87
  • `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — scripts/verify-plugin-cli-package.mjs:123, apps/desktop/src/lib/backend/http.ts:431
  • `request` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/scripts/update-contributors.mjs:25
  • `fetchRegistry` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/lib/agentRegistrySource.ts:9
  • `requestDraft` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/components/issues/IssueSubmissionClient.tsx:271
  • `fetchDailyUniques` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — deploy/plugin-stats-worker/worker.ts:145
  • `fetchWindowCounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — deploy/plugin-stats-worker/worker.ts:187
  • `writeRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:565
  • `listRemoteRuntimeCacheMetadata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:609
  • `pruneRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:621
  • `deleteRemoteRuntimeCacheOwner` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:635
  • `readRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:648
  • `deleteRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/tabs/tabResultCache.ts:666
  • `logoutWeb` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/startup/startupAuthentication.ts:23
  • `dataUrlToBlob` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:416
  • `postQueryWithDiagnostics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:442
  • `get` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:491
  • `del` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:497
  • `put` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:503
  • `testConnectionWithInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:544
  • `installPluginPackage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:765
  • `installPluginPackageFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:782
  • `pluginAssetPayload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:915
  • `importJdbcDrivers` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:940
  • `installJdbcPluginLocal` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:988
  • `importAgentsFromZip` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:1080
  • `importAgentDriver` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:1112
  • `aiStream` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2333
  • `saveMcpGlobalPolicy` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2573
  • `saveWebMcpHttpSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2602
  • `rotateWebMcpToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2612
  • `saveSqlFileUploadMaxMb` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2630
  • `saveMaxAgentTurns` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2639
  • `saveHistoryRetentionLimit` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2652
  • `saveMcpHistoryRetentionLimit` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2665
  • `saveMaxRetries` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:2678
  • `previewSqlFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:3092
  • `previewTableImportFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/desktop/src/lib/backend/http.ts:3346

What to do

  • Thread a context.Context or an AbortSignal through functions that make requests, so the work stops when its caller gives up.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped4.7 / 10Weak✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `highlightedGrantsSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1306
  • `highlight(oracleVisibleSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1486
  • `highlight(directSql || t(incomplete ? 'oracleSecurity.incomplete' : 'oracleSecurity.noGrants'))` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/admin/OracleSecurityDetails.vue:30
  • `snapshotHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:176, apps/desktop/src/components/grid/GridSnapshotDialog.vue:156
  • `highlightedRawResponse` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/common/ElasticsearchJsonResponsePanel.vue:269
  • `highlightedJson(jsonTreeKeyText(node), node, 'key')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/common/JsonTree.vue:272
  • `highlightedJson(scalarText(node.value), node, 'value')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/common/JsonTree.vue:283
  • `seg.html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — apps/desktop/src/components/editor/AiAssistant.vue:7117, apps/desktop/src/components/editor/AiAssistant.vue:7166
  • `highlightedHead` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/DangerConfirmDialog.vue:159
  • `highlightedTail` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/DangerConfirmDialog.vue:163
  • `selectedAiPartnerDescriptionHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/EditorSettingsDialog.vue:12075
  • `highlight(selectedEntry.sql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/QueryHistory.vue:862
  • `highlight(selectedEntry.rollback_sql || '')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/QueryHistory.vue:872
  • `highlightedSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/SqlParameterDialog.vue:234
  • `highlightedHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/SqlPreviewPanel.vue:255
  • `hoverSqlHighlighter(sqlContent,isDark.value?"dark":"light")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/editor/queryEditorHoverContent.ts:75
  • `highlightedCode` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/generate/ModelGenerateDialog.vue:227
  • `highlightedDdlContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/grid/DataGrid.vue:17064
  • `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — apps/desktop/src/components/layout/UpdateDialog.vue:292
  • `renderedNotes` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/layout/UpdateDialog.vue:373
  • `highlight(item.sqlSnippet)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/lineage/FieldLineageDialog.vue:419
  • `markCellHtml(hit, column)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:772
  • `markCellHtml(hit, key)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:816
  • `filteredTableDdlContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/objects/ObjectBrowser.vue:6646
  • `highlight(renamePreviewSqlText)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/objects/ObjectBrowser.vue:6915
  • `sortIndicator('id')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:181
  • `sortIndicator('timestamp')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:182
  • `sortIndicator('duration_micros')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:183
  • `sortIndicator('command')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:184
  • `sortIndicator('client_addr')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:185
  • `sortIndicator('client_name')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/redis/RedisSlowlogPanel.vue:186
  • `formatChangelogItemHtml(item)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/settings/ChangelogPanel.vue:202
  • `highlight(renameObjectPreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:383
  • `highlight(structurePreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:560
  • `highlight(createDatabasePreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:733
  • `highlight(editDatabasePropertiesPreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:822
  • `highlight(schemaCommentPreviewSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sidebar/SidebarTreeItemDialogs.vue:932
  • `activePreviewHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/desktop/src/components/sql-file/SqlFileExecutionDialog.vue:1133

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard7.5 / 10Strong✓ Tool-verified

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

  • This condition tests `tokens` for emptiness and then indexes it on a branch that test does not reach. `tokens[0].Quoted` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `tokens` being empty — so an empty `tokens` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `tokens[1].word(" ")` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `tokens` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `tokens`. — agents/drivers/oracle-go/pldebug_legacy_declarations.go:102

What to do

  • Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.2 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `if err := json.Unmarshal(body, &payload); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:381, REDACTED:720
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×17) — scripts/verify-plugin-cli-package.mjs:158, plugins/sdk/dev-host/runtime.mjs:32, plugins/sdk/dev-host/ui/App.vue:344, …
  • `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — plugins/sdk/dev-host/runtime.mjs:74
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×14) — plugins/sdk/dev-host/server.mjs:121, plugins/sdk/dev-host/server.mjs:723, apps/desktop/src/main.ts:110, …
  • `catch (RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:1498
  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:4147, REDACTED:4156
  • `catch (SQLException | RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:6412, REDACTED:6447
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:88

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging4.8 / 10Adequate✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info!` at line 1621 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1621
  • `info!` at line 1623 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1623
  • `error!` at line 1648 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1648
  • `error!` at line 1655 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1655
  • `error!` at line 1675 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1675
  • `error!` at line 1696 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/dbx-web/src/main.rs:1696

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types7.2 / 10Strong✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 3/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~2.4 `!` null assertions per 1k TypeScript source lines — 1204 assertion(s) across the 496233 source line(s) of the 1511 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: apps/desktop/src/stores/queryStore.ts (88), apps/desktop/src/components/transfer/queryResultTransferDdl.ts (39), apps/desktop/src/stores/connectionStore.ts (34). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health56%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture67%Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity76%StrongSolid.
Readiness62%Adequate — gated by D13, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security59%Adequate — gated by D28, D29, D30Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
Accessibility39%Weak — gated by AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance79%StrongSolid.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 34 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. PHP builds its object graph per request and shares none of it between requests. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1: failed to do request: Head "https://registry-1.docker.io/v2/docker/dockerfile/manifests/1": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust, TypeScript, html not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .go, .java, .php, .py, .rb, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 63 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 310 value object(s); 5 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — Not assessed, and this one is on us: 1 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 1837 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 636 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 320 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 23 more in this group — see findings.md.
D13 · REDACTED Scanning · Leaked secret · ×34
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 9 more in this group — see findings.md.
AC2 · Forms & labels · <input> without a programmatic label · ×21
  • <input> without a programmatic label apps/desktop/src/App.vue:5992 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/App.vue:6010 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:302 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:313 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:355 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DamengRoleAdmin.vue:334 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DamengUserAdmin.vue:497 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseJobAdmin.vue:807 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1227 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1417 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1467 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/MySqlDashboard.vue:244 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/ProcessListPanel.vue:752 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/ProcessListPanel.vue:759 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:288 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:289 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:290 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/XuguUserPermissions.vue:668 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/admin/XuguUserPermissions.vue:878 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:217 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:235 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×19
  • Click handler on a non-interactive <div> apps/desktop/src/components/diagram/DiagramSchemaSelect.vue:128 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/diagram/LayerPanel.vue:334 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:172 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:213 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/dolt/DoltDiffTable.vue:245 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/editor/AiAssistant.vue:6751 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/editor/QueryEditorIntentionPopup.vue:30 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/editor/ThemeCustomizerDialog.vue:472 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1271 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1276 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1281 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1286 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1291 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1296 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/export/DatabaseExportDialog.vue:1325 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/generate/GeneratorSelect.vue:50 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/generate/GeneratorSelect.vue:59 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/grid/DataGridColumnHeader.vue:70 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> apps/desktop/src/components/import/TableImportDialog.vue:2410 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
D30 · Dependency Vulnerabilities · High CVE · ×16
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×14
  • <label> that labels no control apps/desktop/src/App.vue:5991 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/App.vue:5996 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DamengUserAdmin.vue:681 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DamengUserAdmin.vue:714 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DamengUserAdmin.vue:719 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1416 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1426 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:279 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:155 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:192 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:202 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:206 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:224 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control apps/desktop/src/components/backup/DatabaseBackupConfigFields.vue:248 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D35 · Change Coupling · Boundary-crossing change coupling · ×12
  • Boundary-crossing change coupling: AgentProtocol.java ↔ agent_driver.rs agents/common/src/main/java/com/dbx/agent/AgentProtocol.java:1 — `agents/common/src/main/java/com/dbx/agent/AgentProtocol.java` (context agents) and `crates/dbx-driver-agent/src/agent_driver.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 100% of the time (20 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection() (at that commit the file was still `crates/dbx-drivers/src/db/agent_driver.rs`); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: redis.rs ↔ redis_cmd.rs crates/dbx-web/src/routes/redis.rs:1 — `crates/dbx-web/src/routes/redis.rs` (context crates) and `src-tauri/src/commands/redis_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 90% of the time (19 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `dbb83334` fix(redis): faithful raw byte command parsing and cluster crossslot p…; `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys — run `git show` on any of them.
  • Boundary-crossing change coupling: mongo.rs ↔ mongo_cmd.rs crates/dbx-web/src/routes/mongo.rs:1 — `crates/dbx-web/src/routes/mongo.rs` (context crates) and `src-tauri/src/commands/mongo_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 82% of the time (28 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 28 shared commits counted here, the most recent 3 are `92ad8331` fix(mongo): error when querying a non-existent collection; `f78dc1ba` feat(mongodb): support bulkWrite; `9eafac70` feat(mongodb): support replaceOne — run `git show` on any of them.
  • Boundary-crossing change coupling: AgentProtocol.java ↔ mongo_ops.rs agents/common/src/main/java/com/dbx/agent/AgentProtocol.java:1 — `agents/common/src/main/java/com/dbx/agent/AgentProtocol.java` (context agents) and `crates/dbx-core/src/query/mongo_ops.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 80% of the time (16 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection(); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: redis.rs ↔ lib.rs crates/dbx-web/src/routes/redis.rs:1 — `crates/dbx-web/src/routes/redis.rs` (context crates) and `src-tauri/src/lib.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 67% of the time (14 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys; `59187f2e` feat(redis): view and edit Hash field expiry (HEXPIRE/HTTL/HPERSIST) — run `git show` on any of them.
  • Boundary-crossing change coupling: mongo.rs ↔ lib.rs crates/dbx-web/src/routes/mongo.rs:1 — `crates/dbx-web/src/routes/mongo.rs` (context crates) and `src-tauri/src/lib.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 62% of the time (21 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `f78dc1ba` feat(mongodb): support bulkWrite; `9eafac70` feat(mongodb): support replaceOne; `52c89267` feat(vector): support renaming Milvus collections — run `git show` on any of them.
  • Boundary-crossing change coupling: mongo_driver.rs ↔ document_cmd.rs crates/dbx-driver-mongodb/src/mongo_driver.rs:1 — `crates/dbx-driver-mongodb/src/mongo_driver.rs` (context crates) and `src-tauri/src/commands/document_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3e9974b2` perf(mongodb): skip total count for explicit limit queries; `a5ce8510` feat(mongo): preserve BSON types when cloning and saving documents (at that commit the file was still `crates/dbx-core/src/db/mongo_driver.rs`); `c9764be9` fix(mongodb): support collation for find queries (at that commit the file was still `crates/dbx-core/src/db/mongo_driver.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: main.rs ↔ mongo_cmd.rs crates/dbx-web/src/main.rs:1 — `crates/dbx-web/src/main.rs` (context crates) and `src-tauri/src/commands/mongo_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 59% of the time (20 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `f78dc1ba` feat(mongodb): support bulkWrite; `9eafac70` feat(mongodb): support replaceOne; `52c89267` feat(vector): support renaming Milvus collections — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ mongo_ops.rs REDACTED:1 — `REDACTED` (context agents) and `crates/dbx-core/src/query/mongo_ops.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 58% of the time (18 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection(); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/mongo_ops.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: main.rs ↔ redis_cmd.rs crates/dbx-web/src/main.rs:1 — `crates/dbx-web/src/main.rs` (context crates) and `src-tauri/src/commands/redis_cmd.rs` (context src-tauri) sit in DIFFERENT parts of the tree yet change together 56% of the time (14 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `0f9d32e1` feat(redis): edit hash fields; `168f2a47` feat(redis): support renaming keys; `59187f2e` feat(redis): view and edit Hash field expiry (HEXPIRE/HTTL/HPERSIST) — run `git show` on any of them.
  • Boundary-crossing change coupling: JsonRpcServer.java ↔ agent_driver.rs agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:1 — `agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java` (context agents) and `crates/dbx-driver-agent/src/agent_driver.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `9cade987` fix(sql): harden SQL recognition, duplicate commits, and batch execut…; `0e414e63` fix(agent): recover JDBC connections after query timeouts (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`); `73120883` fix(dameng): separate materialized view metadata (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ agent_driver.rs REDACTED:1 — `REDACTED` (context agents) and `crates/dbx-driver-agent/src/agent_driver.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 52% of the time (16 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `2db28fc2` feat(mongodb): support db.collection.renameCollection() (at that commit the file was still `crates/dbx-drivers/src/db/agent_driver.rs`); `f78dc1ba` feat(mongodb): support bulkWrite (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`); `9eafac70` feat(mongodb): support replaceOne (at that commit the file was still `crates/dbx-core/src/db/agent_driver.rs`) — run `git show` on any of them.
D28 · Secrets (history) · REDACTED · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×9
  • Clickable element isn't keyboard-operable apps/desktop/src/components/diagram/LayerPanel.vue:407 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/diagram/LayerPanel.vue:429 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:2274 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/editor/TableStructurePeekDialog.vue:314 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/editor/TableStructurePeekDialog.vue:320 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/editor/TableStructurePeekDialog.vue:323 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <td> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/grid/DataGridSearchBar.vue:109 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/layout/EditorGroupTabBar.vue:2216 — The repo's own CSS styles .app-tab-scrollbar with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/desktop/src/components/layout/SqlSearchMatchSnippet.vue:93 — The repo's own CSS styles .cursor-pointer with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×5
  • Import cycle (2 files) apps/desktop/src/components/ui/badge/Badge.vue:8 — apps/desktop/src/components/ui/badge/Badge.vue → apps/desktop/src/components/ui/badge/index.ts → apps/desktop/src/components/ui/badge/Badge.vue
  • Import cycle (2 files) apps/desktop/src/components/ui/button/Button.vue:7 — apps/desktop/src/components/ui/button/Button.vue → apps/desktop/src/components/ui/button/index.ts → apps/desktop/src/components/ui/button/Button.vue
  • Import cycle (2 files) apps/desktop/src/components/ui/select/SelectContent.vue:9 — apps/desktop/src/components/ui/select/SelectContent.vue → apps/desktop/src/components/ui/select/index.ts → apps/desktop/src/components/ui/select/SelectContent.vue
  • Import cycle (2 files) apps/desktop/src/components/ui/tabs/TabsList.vue:8 — apps/desktop/src/components/ui/tabs/TabsList.vue → apps/desktop/src/components/ui/tabs/index.ts → apps/desktop/src/components/ui/tabs/TabsList.vue
  • Import cycle (2 files) apps/desktop/src/lib/backend/http.ts:1586 — apps/desktop/src/lib/backend/http.ts → apps/desktop/src/lib/backend/tauri.ts → apps/desktop/src/lib/backend/http.ts
AC2 · Forms & labels · <select> without a programmatic label · ×4
  • <select> without a programmatic label apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:317 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label apps/desktop/src/components/admin/MySqlDashboard.vue:192 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label apps/desktop/src/components/admin/PostgresDashboard.vue:213 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label apps/desktop/src/components/admin/XuguServerDashboard.vue:299 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC5 · ARIA correctness · aria-hidden hides a focusable element · ×4
  • aria-hidden hides a focusable element apps/desktop/src/components/explain/ExplainPlanNodeTree.vue:63 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/grid/DataGrid.vue:15520 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/layout/StartupLoading.vue:16 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element apps/desktop/src/components/plugins/PluginShortcutBar.vue:184 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
AC4 · Keyboard semantics · Focusable <div> isn't keyboard-operable · ×3
  • Focusable <div> isn't keyboard-operable apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:481 — This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
  • Focusable <div> isn't keyboard-operable apps/desktop/src/components/diff/SchemaDiffRoutineList.vue:73 — This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
  • Focusable <div> isn't keyboard-operable apps/desktop/src/components/layout/EditorGroupTabBar.vue:2502 — This <div> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <tr> · ×2
  • Click handler on a non-interactive <tr> apps/desktop/src/components/admin/SqlServerActivityTracePanel.vue:318 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <tr> apps/desktop/src/components/document/MongoGridFsBrowser.vue:338 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative apps/desktop/src/components/editor/AiAttachmentCard.vue:49 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC1 · Text alternatives · <svg role="img"> without an accessible name · ×1
  • <svg role="img"> without an accessible name docs/components/DocsSidebarFooter.tsx:19 — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC2 · Forms & labels · Custom control named only by title on <td> · ×1
  • Custom control named only by title on <td> apps/desktop/src/components/admin/ProcessListPanel.vue:817 — This <td> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> plugins/sdk/cli/templates/svelte/index.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC4 · Keyboard semantics · Click handler on a non-interactive <th> · ×1
  • Click handler on a non-interactive <th> apps/desktop/src/components/admin/ProcessListPanel.vue:795 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <td> · ×1
  • Click handler on a non-interactive <td> apps/desktop/src/components/admin/ProcessListPanel.vue:817 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <p> · ×1
  • Click handler on a non-interactive <p> apps/desktop/src/components/editor/EditorSettingsDialog.vue:12075 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
AC4 · Keyboard semantics · Focusable <tr> isn't keyboard-operable · ×1
  • Focusable <tr> isn't keyboard-operable apps/desktop/src/components/grid/DataGridTableInfoPanels.vue:107 — This <tr> carries tabindex="0", so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <img> · ×1
  • Double-click handler on a non-interactive <img> apps/desktop/src/components/grid/ImagePreviewDialog.vue:223 — This <img> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> apps/desktop/src/components/layout/AppToolbar.vue:573 — This <div> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: InnerWebView.load_extensions vendor/wry/src/webview2/mod.rs:1437 — `InnerWebView.load_extensions` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (5 files) · ×1
  • Import cycle (5 files) apps/desktop/src/lib/sql/sqlRisk.ts:5 — apps/desktop/src/lib/sql/sqlRisk.ts → apps/desktop/src/types/database.ts → apps/desktop/src/lib/database/oracleTriggerPlan.ts → apps/desktop/src/lib/database/productionExecutionGuard.ts → apps/desktop/src/lib/database/productionSafety.ts → apps/desktop/src/lib/sql/sqlRisk.ts (one verified cycle inside a mutually-dependent group of 30 files)
Serious — 6594 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×308
  • Hotspot: apps/desktop/src/stores/queryStore.ts apps/desktop/src/stores/queryStore.ts:8102 — apps/desktop/src/stores/queryStore.ts changed 289 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 669 in queryStore.useQueryStore.executeTabSql at line 8102. 166 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/stores/queryStore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/stores/settingsStore.ts apps/desktop/src/stores/settingsStore.ts:3005 — apps/desktop/src/stores/settingsStore.ts changed 212 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 278 in settingsStore.useSettingsStore.applyEditorSettingsPatch at line 3005. 31 of those changes were fix/bug commits, and the other 181 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/stores/settingsStore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/grid/DataGrid.vue apps/desktop/src/components/grid/DataGrid.vue:11734 — apps/desktop/src/components/grid/DataGrid.vue changed 412 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 129 in onGridKeydown at line 11734. 209 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/DataGrid.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:917 — REDACTED changed 231 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 220 in toggle at line 917. 86 of those changes were fix/bug commits, and the other 145 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/connection/ConnectionDialog.vue apps/desktop/src/components/connection/ConnectionDialog.vue:4926 — apps/desktop/src/components/connection/ConnectionDialog.vue changed 156 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 285 in connectionConfigForSubmit at line 4926. 65 of those changes were fix/bug commits, and the other 91 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/connection/ConnectionDialog.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/App.vue apps/desktop/src/App.vue:4667 — apps/desktop/src/App.vue changed 250 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 127 in handleKeydown at line 4667. 106 of those changes were fix/bug commits, and the other 144 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/App.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/stores/connectionStore.ts apps/desktop/src/stores/connectionStore.ts:8584 — apps/desktop/src/stores/connectionStore.ts changed 233 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in connectionStore.useConnectionStore.loadTreeNodeChildren at line 8584. 106 of those changes were fix/bug commits, and the other 127 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/stores/connectionStore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/dbx-core/src/data/transfer.rs crates/dbx-core/src/data/transfer.rs:12890 — crates/dbx-core/src/data/transfer.rs changed 180 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 123 in dbx_core::data::transfer::transfer_table_inner at line 12890. 56 of those changes were fix/bug commits, and the other 124 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-core/src/data/transfer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/editor/AiAssistant.vue apps/desktop/src/components/editor/AiAssistant.vue:4061 — apps/desktop/src/components/editor/AiAssistant.vue changed 75 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 240 in send at line 4061. 30 of those changes were fix/bug commits, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/editor/AiAssistant.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/dbx-core/src/schema/mod.rs crates/dbx-core/src/schema/mod.rs:2401 — crates/dbx-core/src/schema/mod.rs changed 188 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in dbx_core::schema::list_tables_once at line 2401. 45 of those changes were fix/bug commits, and the other 143 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-core/src/schema/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:3456 — REDACTED changed 145 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in AppState::get_or_create_pool_for_session_inner_with_receipt at line 3456. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/sidebar/ConnectionTree.vue apps/desktop/src/components/sidebar/ConnectionTree.vue:1886 — apps/desktop/src/components/sidebar/ConnectionTree.vue changed 115 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in ensureTreeLoadedForTarget at line 1886. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/sidebar/ConnectionTree.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/structure/TableStructureEditor.vue apps/desktop/src/components/structure/TableStructureEditor.vue:3472 — apps/desktop/src/components/structure/TableStructureEditor.vue changed 99 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in refreshSqlPreview at line 3472. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/structure/TableStructureEditor.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1759 — REDACTED changed 151 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in dbx_core::query::do_execute_typed at line 1759. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:4032 — REDACTED changed 85 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in dbx_core::data::database_export::export_database_sql_core_inner at line 4032. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src-tauri/src/lib.rs src-tauri/src/lib.rs:1801 — src-tauri/src/lib.rs changed 184 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in dbx::run at line 1801. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- src-tauri/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/sidebar/TreeItem.vue apps/desktop/src/components/sidebar/TreeItem.vue:267 — apps/desktop/src/components/sidebar/TreeItem.vue changed 100 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in getIconInfo at line 267. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/sidebar/TreeItem.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/lib/sql/sqlCompletion.ts apps/desktop/src/lib/sql/sqlCompletion.ts:1997 — apps/desktop/src/lib/sql/sqlCompletion.ts changed 103 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in SqlCompletionProvider.build at line 1997. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/sql/sqlCompletion.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/dbx-sql-schema/src/schema_diff.rs crates/dbx-sql-schema/src/schema_diff.rs:6545 — crates/dbx-sql-schema/src/schema_diff.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl at line 6545. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-sql-schema/src/schema_diff.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/objects/ObjectBrowser.vue apps/desktop/src/components/objects/ObjectBrowser.vue:2791 — apps/desktop/src/components/objects/ObjectBrowser.vue changed 132 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in confirmRename at line 2791. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/objects/ObjectBrowser.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/components/editor/QueryEditor.vue apps/desktop/src/components/editor/QueryEditor.vue:867 — apps/desktop/src/components/editor/QueryEditor.vue changed 220 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in selectStarExpansionTargetForView at line 867. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/editor/QueryEditor.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/composables/useDataGridExport.ts apps/desktop/src/composables/useDataGridExport.ts:1139 — apps/desktop/src/composables/useDataGridExport.ts changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 117 in useDataGridExport.useDataGridExport.exportLocalSnapshot at line 1139. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/composables/useDataGridExport.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:648 — REDACTED changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 174 in PluginHostBridge.dispatch at line 648. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:7375 — REDACTED changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 117 in dbx_core::data::table_import::import_table_file_core at line 7375. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/desktop/src/lib/sql/sqlStatementRanges.ts apps/desktop/src/lib/sql/sqlStatementRanges.ts:411 — apps/desktop/src/lib/sql/sqlStatementRanges.ts changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 108 in sqlStatementRanges.splitSqlStatementRanges at line 411. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/sql/sqlStatementRanges.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 283 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_core · ×305
  • dbx_core::data::database_export::export_database_sql_core_inner (cognitive 298) REDACTED:4032 — dbx_core::data::database_export::export_database_sql_core_inner has cognitive complexity 298 (threshold 15). Drivers by points: if/else 82 (197 pts), match/switch 18 (47 pts), loops 18 (33 pts), boolean chains 21 (nesting depth added 159). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::data::table_export::export_table_data_core_inner (cognitive 197) REDACTED:1681 — dbx_core::data::table_export::export_table_data_core_inner has cognitive complexity 197 (threshold 15). Drivers by points: if/else 71 (169 pts), loops 8 (18 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 111). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::data::table_import::import_table_file_core (cognitive 196) REDACTED:7375 — dbx_core::data::table_import::import_table_file_core has cognitive complexity 196 (threshold 15). Drivers by points: if/else 58 (108 pts), match/switch 31 (64 pts), boolean chains 15, loops 5 (9 pts) (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::transfer_table_inner (cognitive 191) crates/dbx-core/src/data/transfer.rs:12890 — dbx_core::data::transfer::transfer_table_inner has cognitive complexity 191 (threshold 15). Drivers by points: if/else 85 (120 pts), boolean chains 34, match/switch 12 (25 pts), loops 6 (12 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::transfer_mysql_schema_objects (cognitive 176) crates/dbx-core/src/data/transfer.rs:9942 — dbx_core::data::transfer::transfer_mysql_schema_objects has cognitive complexity 176 (threshold 15). Drivers by points: if/else 26 (104 pts), match/switch 8 (43 pts), loops 5 (23 pts), boolean chains 6 (nesting depth added 131). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::schema::oracle_routines::plan::build_plan_with_tables (cognitive 155) crates/dbx-core/src/schema/oracle_routines/plan.rs:815 — dbx_core::schema::oracle_routines::plan::build_plan_with_tables has cognitive complexity 155 (threshold 15). Drivers by points: if/else 45 (103 pts), match/switch 7 (21 pts), boolean chains 19, loops 7 (12 pts) (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::query_result_export::export_query_result_core_inner (cognitive 142) REDACTED:1086 — dbx_core::data::query_result_export::export_query_result_core_inner has cognitive complexity 142 (threshold 15). Drivers by points: if/else 69 (118 pts), boolean chains 14, loops 3 (8 pts), match/switch 1 (2 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::oracle_ddl_indexes::prepare_schema_sync_oracle_ddl_core (cognitive 130) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:365 — dbx_core::schema::oracle_ddl_indexes::prepare_schema_sync_oracle_ddl_core has cognitive complexity 130 (threshold 15). Drivers by points: if/else 28 (91 pts), loops 5 (18 pts), match/switch 5 (17 pts), boolean chains 4 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::list_tables_once (cognitive 127) crates/dbx-core/src/schema/mod.rs:2401 — dbx_core::schema::list_tables_once has cognitive complexity 127 (threshold 15). Drivers by points: if/else 57 (105 pts), boolean chains 15, match/switch 3 (7 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::native_jobs::operations::dameng::run_steps (cognitive 113) crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:388 — dbx_core::schema::native_jobs::operations::dameng::run_steps has cognitive complexity 113 (threshold 15). Drivers by points: if/else 51 (93 pts), boolean chains 18, loops 1, match/switch 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::native_jobs::operations::run_claimed (cognitive 110) crates/dbx-core/src/schema/native_jobs/operations.rs:777 — dbx_core::schema::native_jobs::operations::run_claimed has cognitive complexity 110 (threshold 15). Drivers by points: if/else 48 (85 pts), match/switch 5 (14 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::native_jobs::operations::scheduler::transition::run (cognitive 104) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:535 — dbx_core::schema::native_jobs::operations::scheduler::transition::run has cognitive complexity 104 (threshold 15). Drivers by points: if/else 47 (86 pts), boolean chains 12, match/switch 2 (5 pts), loops 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::query::snapshot_export::write_snapshot_export_with_fetch (cognitive 102) crates/dbx-core/src/query/snapshot_export.rs:70 — dbx_core::query::snapshot_export::write_snapshot_export_with_fetch has cognitive complexity 102 (threshold 15). Drivers by points: if/else 31 (83 pts), loops 6 (14 pts), boolean chains 5 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::ai::agent_loop::run_agent_loop_inner (cognitive 101) crates/dbx-core/src/ai/agent_loop.rs:210 — dbx_core::ai::agent_loop::run_agent_loop_inner has cognitive complexity 101 (threshold 15). Drivers by points: if/else 33 (57 pts), match/switch 9 (23 pts), loops 9 (19 pts), boolean chains 2 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info (cognitive 101) crates/dbx-core/src/schema/mod.rs:17110 — dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info has cognitive complexity 101 (threshold 15). Drivers by points: if/else 42 (74 pts), loops 9 (13 pts), boolean chains 12, match/switch 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::transfer_mongodb_table (cognitive 96) crates/dbx-core/src/data/transfer.rs:11669 — dbx_core::data::transfer::transfer_mongodb_table has cognitive complexity 96 (threshold 15). Drivers by points: if/else 30 (74 pts), loops 3 (11 pts), match/switch 2 (9 pts), boolean chains 2 (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::query::do_execute_typed (cognitive 95) REDACTED:1759 — dbx_core::query::do_execute_typed has cognitive complexity 95 (threshold 15). Drivers by points: if/else 40 (73 pts), match/switch 9 (19 pts), boolean chains 3 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::list_objects_once (cognitive 95) crates/dbx-core/src/schema/mod.rs:7705 — dbx_core::schema::list_objects_once has cognitive complexity 95 (threshold 15). Drivers by points: if/else 43 (73 pts), boolean chains 12, match/switch 4 (10 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer_runner::run_transfer (cognitive 94) crates/dbx-core/src/data/transfer_runner.rs:86 — dbx_core::data::transfer_runner::run_transfer has cognitive complexity 94 (threshold 15). Drivers by points: if/else 48 (76 pts), match/switch 8 (13 pts), boolean chains 3, loops 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes (cognitive 87) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:701 — dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes has cognitive complexity 87 (threshold 15). Drivers by points: if/else 26 (50 pts), boolean chains 30, match/switch 3 (5 pts), loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery (cognitive 87) crates/dbx-core/src/schema/oracle_routines/plan/recovery/package_recovery.rs:60 — dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery has cognitive complexity 87 (threshold 15). Drivers by points: if/else 28 (54 pts), match/switch 5 (16 pts), boolean chains 11, loops 4 (6 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::data::transfer::generate_create_table_ddl_with_column_quoting (cognitive 86) crates/dbx-core/src/data/transfer.rs:4929 — dbx_core::data::transfer::generate_create_table_ddl_with_column_quoting has cognitive complexity 86 (threshold 15). Drivers by points: if/else 25 (66 pts), boolean chains 9, match/switch 5 (8 pts), loops 2 (3 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_core::data::transfer::map_column_type (cognitive 84) crates/dbx-core/src/data/transfer.rs:4594 — dbx_core::data::transfer::map_column_type has cognitive complexity 84 (threshold 15). Drivers by points: match/switch 24 (47 pts), if/else 22 (33 pts), boolean chains 4 (nesting depth added 34). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection (cognitive 76) crates/dbx-core/src/persistence/cloud_sync.rs:1226 — dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (52 pts), boolean chains 16, loops 4 (6 pts), match/switch 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_core::query::execute_in_manual_transaction_with_options (cognitive 75) REDACTED:6747 — dbx_core::query::execute_in_manual_transaction_with_options has cognitive complexity 75 (threshold 15). Drivers by points: if/else 35 (60 pts), match/switch 3 (8 pts), boolean chains 6, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 280 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×303
  • FunctionTooLong: useDataGridExport.useDataGridExport apps/desktop/src/composables/useDataGridExport.ts:226 — FunctionTooLong — useDataGridExport runs 2082 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1982 over it, 20.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridEditor.useDataGridEditor apps/desktop/src/composables/useDataGridEditor.ts:374 — FunctionTooLong — useDataGridEditor runs 1935 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1835 over it, 19.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx::run src-tauri/src/lib.rs:1801 — FunctionTooLong — dbx::run runs 1289 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1189 over it, 12.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useQueryEditorCompletion.useQueryEditorCompletion apps/desktop/src/components/editor/useQueryEditorCompletion.ts:94 — FunctionTooLong — useQueryEditorCompletion runs 1272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1172 over it, 12.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::table_import::import_table_file_core REDACTED:7375 — FunctionTooLong — dbx_core::data::table_import::import_table_file_core runs 1116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1016 over it, 11.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_web::serve crates/dbx-web/src/main.rs:519 — FunctionTooLong — dbx_web::serve runs 1019 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 919 over it, 10.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:117 — FunctionTooLong — useSidebarDatabaseSpecificMutationRuntime runs 913 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 813 over it, 9.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::database_export::export_database_sql_core_inner REDACTED:4032 — FunctionTooLong — dbx_core::data::database_export::export_database_sql_core_inner runs 896 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 796 over it, 8.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: settingsStore.useSettingsStore apps/desktop/src/stores/settingsStore.ts:2464 — FunctionTooLong — useSettingsStore runs 838 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 738 over it, 8.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: savedSqlStore.useSavedSqlStore apps/desktop/src/stores/savedSqlStore.ts:219 — FunctionTooLong — useSavedSqlStore runs 755 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 655 over it, 7.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::transfer::transfer_table_inner crates/dbx-core/src/data/transfer.rs:12890 — FunctionTooLong — dbx_core::data::transfer::transfer_table_inner runs 735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 635 over it, 7.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useSqlExecution.useSqlExecution apps/desktop/src/composables/useSqlExecution.ts:165 — FunctionTooLong — useSqlExecution runs 721 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 621 over it, 7.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useSidebarTreeExportRuntime.useSidebarTreeExportRuntime apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:126 — FunctionTooLong — useSidebarTreeExportRuntime runs 702 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 602 over it, 7.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::table_export::export_table_data_core_inner REDACTED:1681 — FunctionTooLong — dbx_core::data::table_export::export_table_data_core_inner runs 646 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 546 over it, 6.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridActions.useDataGridActions apps/desktop/src/composables/useDataGridActions.ts:47 — FunctionTooLong — useDataGridActions runs 623 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 523 over it, 6.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: DriversClient.DriversClient docs/app/[lang]/drivers/DriversClient.tsx:216 — FunctionTooLong — DriversClient runs 593 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 493 over it, 5.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useQuickOpen.useQuickOpen apps/desktop/src/composables/useQuickOpen.ts:318 — FunctionTooLong — useQuickOpen runs 578 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 478 over it, 5.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::data::transfer_runner::run_transfer crates/dbx-core/src/data/transfer_runner.rs:86 — FunctionTooLong — dbx_core::data::transfer_runner::run_transfer runs 555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 455 over it, 5.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl crates/dbx-sql-schema/src/schema_diff.rs:6545 — FunctionTooLong — dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl runs 539 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 439 over it, 5.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createMockHost plugins/sdk/dev-host/server.mjs:77 — FunctionTooLong — createMockHost runs 538 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 438 over it, 5.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridSelection.useDataGridSelection apps/desktop/src/composables/useDataGridSelection.ts:52 — FunctionTooLong — useDataGridSelection runs 533 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 433 over it, 5.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useDataGridLargeValues.useDataGridLargeValues apps/desktop/src/composables/useDataGridLargeValues.ts:112 — FunctionTooLong — useDataGridLargeValues runs 531 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 431 over it, 5.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx_core::query::do_execute_typed REDACTED:1759 — FunctionTooLong — dbx_core::query::do_execute_typed runs 484 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 384 over it, 4.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dbx::commands::connection::test_connection_with_info_impl src-tauri/src/commands/connection.rs:1567 — FunctionTooLong — dbx::commands::connection::test_connection_with_info_impl runs 483 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 383 over it, 4.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata apps/desktop/src/components/editor/useQueryEditorCompletionMetadata.ts:44 — FunctionTooLong — useQueryEditorCompletionMetadata runs 473 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 373 over it, 4.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 278 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×250
  • FileTooLong: data/transfer.rs crates/dbx-core/src/data/transfer.rs — FileTooLong — 10396 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 440 free functions. The bar is 500 significant lines; this is 9896 over it, 20.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: stores/queryStore.ts apps/desktop/src/stores/queryStore.ts — FileTooLong — 8843 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: useQueryStore (1166-11899). The bar is 500 significant lines; this is 8343 over it, 17.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: stores/connectionStore.ts apps/desktop/src/stores/connectionStore.ts — FileTooLong — 8505 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: useConnectionStore (469-11649). The bar is 500 significant lines; this is 8005 over it, 17.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: schema/mod.rs crates/dbx-core/src/schema/mod.rs — FileTooLong — 8260 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 381 free functions. The bar is 500 significant lines; this is 7760 over it, 16.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 7938 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 427 free functions. The bar is 500 significant lines; this is 7438 over it, 15.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 7500 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 146 free functions. The bar is 500 significant lines; this is 7000 over it, 15.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 6483 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 226 free functions. The bar is 500 significant lines; this is 5983 over it, 12.97× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 6116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: AppState (2 blocks, 444-7631), declaring 110 free functions. The bar is 500 significant lines; this is 5616 over it, 12.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 5467 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 209 free functions. The bar is 500 significant lines; this is 4967 over it, 10.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/mysql.rs crates/dbx-driver-mysql/src/mysql.rs — FileTooLong — 5191 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 295 free functions. The bar is 500 significant lines; this is 4691 over it, 10.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/schema_diff.rs crates/dbx-sql-schema/src/schema_diff.rs — FileTooLong — 5030 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 145 free functions. The bar is 500 significant lines; this is 4530 over it, 10.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4822 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DbxJdbcPlugin (64-6691). The bar is 500 significant lines; this is 4322 over it, 9.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: backend/tauri.ts apps/desktop/src/lib/backend/tauri.ts — FileTooLong — 4651 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4151 over it, 9.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sql/sqlCompletion.ts apps/desktop/src/lib/sql/sqlCompletion.ts — FileTooLong — 4500 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4000 over it, 9.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs crates/dbx-driver-redis/src/lib.rs — FileTooLong — 3863 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 226 free functions. The bar is 500 significant lines; this is 3363 over it, 7.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: backend/http.ts apps/desktop/src/lib/backend/http.ts — FileTooLong — 3798 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3298 over it, 7.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/server.rs crates/dbx-mcp/src/server.rs — FileTooLong — 3667 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 64% of them inside a single declaration: DbxMcpServer (5 blocks, 694-4129), declaring 66 free functions. The bar is 500 significant lines; this is 3167 over it, 7.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 3655 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 147 free functions. The bar is 500 significant lines; this is 3155 over it, 7.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/ai.rs crates/dbx-ai-provider/src/ai.rs — FileTooLong — 3513 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 149 free functions. The bar is 500 significant lines; this is 3013 over it, 7.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 3426 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 184 free functions. The bar is 500 significant lines; this is 2926 over it, 6.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: nacos/http.rs crates/dbx-core/src/admin/nacos/http.rs — FileTooLong — 3307 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: NacosOpenApiAdmin (3 blocks, 167-3387), declaring 69 free functions. The bar is 500 significant lines; this is 2807 over it, 6.61× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/agent_driver.rs crates/dbx-driver-agent/src/agent_driver.rs — FileTooLong — 3188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 79 free functions. The bar is 500 significant lines; this is 2688 over it, 6.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/sqlserver.rs crates/dbx-driver-sqlserver/src/sqlserver.rs — FileTooLong — 3186 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 190 free functions. The bar is 500 significant lines; this is 2686 over it, 6.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/agent_service.rs crates/dbx-driver-agent/src/agent_service.rs — FileTooLong — 2915 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 162 free functions. The bar is 500 significant lines; this is 2415 over it, 5.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: stores/settingsStore.ts apps/desktop/src/stores/settingsStore.ts — FileTooLong — 2827 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2327 over it, 5.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 225 more in this group — see findings.md.
D1 · Cyclomatic Complexity · dbx_core · ×183
  • dbx_core::data::database_export::export_database_sql_core_inner (cyclomatic 130) REDACTED:4032 — dbx_core::data::database_export::export_database_sql_core_inner has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::transfer_table_inner (cyclomatic 123) crates/dbx-core/src/data/transfer.rs:12890 — dbx_core::data::transfer::transfer_table_inner has cyclomatic complexity 123 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::table_import::import_table_file_core (cyclomatic 117) REDACTED:7375 — dbx_core::data::table_import::import_table_file_core has cyclomatic complexity 117 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::map_column_type (cyclomatic 107) crates/dbx-core/src/data/transfer.rs:4594 — dbx_core::data::transfer::map_column_type has cyclomatic complexity 107 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_core::schema::list_tables_once (cyclomatic 84) crates/dbx-core/src/schema/mod.rs:2401 — dbx_core::schema::list_tables_once has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::table_export::export_table_data_core_inner (cyclomatic 78) REDACTED:1681 — dbx_core::data::table_export::export_table_data_core_inner has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::query::do_execute_typed (cyclomatic 78) REDACTED:1759 — dbx_core::query::do_execute_typed has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::query_result_export::export_query_result_core_inner (cyclomatic 76) REDACTED:1086 — dbx_core::data::query_result_export::export_query_result_core_inner has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_routines::plan::build_plan_with_tables (cyclomatic 73) crates/dbx-core/src/schema/oracle_routines/plan.rs:815 — dbx_core::schema::oracle_routines::plan::build_plan_with_tables has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes (cyclomatic 65) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:701 — dbx_core::schema::oracle_ddl_indexes::capture_table_ddl_indexes has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info (cyclomatic 60) crates/dbx-core/src/schema/mod.rs:17110 — dbx_core::schema::render_postgres_table_ddl_with_constraints_and_partition_info has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::native_jobs::operations::dameng::run_steps (cyclomatic 59) crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:388 — dbx_core::schema::native_jobs::operations::dameng::run_steps has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::list_objects_once (cyclomatic 57) crates/dbx-core/src/schema/mod.rs:7705 — dbx_core::schema::list_objects_once has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::ai::agent_loop::run_agent_loop_inner (cyclomatic 55) crates/dbx-core/src/ai/agent_loop.rs:210 — dbx_core::ai::agent_loop::run_agent_loop_inner has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::get_columns_core_for_session_inner_with_pool (cyclomatic 55) crates/dbx-core/src/schema/mod.rs:8592 — dbx_core::schema::get_columns_core_for_session_inner_with_pool has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::native_jobs::operations::run_claimed (cyclomatic 55) crates/dbx-core/src/schema/native_jobs/operations.rs:777 — dbx_core::schema::native_jobs::operations::run_claimed has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::native_jobs::operations::scheduler::transition::run (cyclomatic 55) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:535 — dbx_core::schema::native_jobs::operations::scheduler::transition::run has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer_runner::run_transfer (cyclomatic 54) crates/dbx-core/src/data/transfer_runner.rs:86 — dbx_core::data::transfer_runner::run_transfer has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection (cyclomatic 51) crates/dbx-core/src/persistence/cloud_sync.rs:1226 — dbx_core::persistence::cloud_sync::apply_sync_snapshot_with_selection has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::query::pl_debug::pl_debug_operate_submission_core (cyclomatic 48) crates/dbx-core/src/query/pl_debug.rs:1431 — dbx_core::query::pl_debug::pl_debug_operate_submission_core has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery (cyclomatic 47) crates/dbx-core/src/schema/oracle_routines/plan/recovery/package_recovery.rs:60 — dbx_core::schema::oracle_routines::plan::recovery::package_recovery::prepare_package_recovery has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::escape_value_typed (cyclomatic 45) crates/dbx-core/src/data/transfer.rs:3807 — dbx_core::data::transfer::escape_value_typed has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::schema::oracle_type_evolution::table_guard (cyclomatic 43) crates/dbx-core/src/schema/oracle_type_evolution.rs:409 — dbx_core::schema::oracle_type_evolution::table_guard has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::table_import::parse_xlsx_preview_file_with_options (cyclomatic 42) REDACTED:3558 — dbx_core::data::table_import::parse_xlsx_preview_file_with_options has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_core::data::transfer::oracle_table_contract::types::from_ast (cyclomatic 42) crates/dbx-core/src/data/transfer/oracle_table_contract/types.rs:27 — dbx_core::data::transfer::oracle_table_contract::types::from_ast has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • + 158 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×155
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai.rs:2905 — crates/dbx-ai-provider/src/ai.rs:2905-2909 | crates/dbx-ai-provider/src/ai.rs:3071-3076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai.rs:5263 — crates/dbx-ai-provider/src/ai.rs:5263-5267 | crates/dbx-core/src/persistence/history.rs:120-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:457 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:457-461 | crates/dbx-ai-provider/src/ai_codex_cli.rs:991-995 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codex_cli.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai_cli_agent.rs:450 — crates/dbx-ai-provider/src/ai_cli_agent.rs:450-454 | crates/dbx-ai-provider/src/ai_cli_agent.rs:628-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-ai-provider/src/ai_cli_agent.rs:553 — crates/dbx-ai-provider/src/ai_cli_agent.rs:553-557 | crates/dbx-ai-provider/src/ai_cli_agent.rs:592-596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:383 — crates/dbx-core/src/admin/consul/blocking.rs:383-387 | crates/dbx-core/src/admin/consul/txn.rs:376-380 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/consul/client.rs:153 — crates/dbx-core/src/admin/consul/client.rs:153-157 | crates/dbx-core/src/admin/consul/client.rs:185-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:152 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:152-156 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:218-222 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1146 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1146-1150 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1369-1373 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:579 — crates/dbx-core/src/admin/nacos/http.rs:579-583 | crates/dbx-core/src/admin/nacos/http.rs:605-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:3984 — crates/dbx-core/src/admin/nacos/http.rs:3984-3988 | crates/dbx-core/src/admin/nacos/http.rs:4048-4052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/connection/jdbc.rs:935 — crates/dbx-core/src/connection/jdbc.rs:935-939 | crates/dbx-core/src/connection/jdbc.rs:972-976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/connection/jdbc.rs:1095 — crates/dbx-core/src/connection/jdbc.rs:1095-1099 | crates/dbx-core/src/connection/jdbc.rs:1167-1171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/connection/jdbc.rs:1148 — crates/dbx-core/src/connection/jdbc.rs:1148-1152 | crates/dbx-core/src/connection/jdbc.rs:1205-1209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:3915 — REDACTED:3915-3919 | src-tauri/src/commands/connection.rs:2616-2620 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:1212 — crates/dbx-core/src/data/mongodb_import_export.rs:1212-1216 | crates/dbx-core/src/data/mongodb_import_export.rs:1252-1256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:1301 — REDACTED:1301-1305 | REDACTED:2131-2135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:1280 — REDACTED:1280-1284 | REDACTED:1384-1388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:1468 — REDACTED:1468-1472 | REDACTED:1487-1491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/persistence/cloud_sync.rs:1674 — crates/dbx-core/src/persistence/cloud_sync.rs:1674-1678 | crates/dbx-core/src/persistence/cloud_sync.rs:1832-1836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/persistence/cloud_sync.rs:3077 — crates/dbx-core/src/persistence/cloud_sync.rs:3077-3081 | crates/dbx-core/src/persistence/cloud_sync.rs:3101-3105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/persistence/config/governance.rs:233 — crates/dbx-core/src/persistence/config/governance.rs:233-237 | crates/dbx-core/src/persistence/config/governance.rs:247-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:2814 — REDACTED:2814-2818 | REDACTED:4923-4927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) REDACTED:4968 — REDACTED:4968-4972 | REDACTED:7699-7704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/dbx-core/src/query/pl_debug/mutation.rs:184 — crates/dbx-core/src/query/pl_debug/mutation.rs:184-188 | crates/dbx-core/src/query/pl_debug/mutation.rs:206-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 130 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×109
  • Duplicated block (7 lines × 2) agents/drivers/duckdb/src/schema.rs:422 — agents/drivers/duckdb/src/schema.rs:422-428 | crates/dbx-core/src/schema/mod.rs:7320-7326 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) agents/drivers/duckdb/src/sql.rs:119 — agents/drivers/duckdb/src/sql.rs:119-125 | crates/dbx-drivers/src/db/duckdb_sql.rs:138-144 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/dbx-ai-provider/src/ai.rs:3846 — crates/dbx-ai-provider/src/ai.rs:3846-3852 | crates/dbx-ai-provider/src/ai.rs:4460-4466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:161 — crates/dbx-core/src/admin/consul/blocking.rs:161-167 | crates/dbx-core/src/admin/consul/blocking.rs:214-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/mqtt/client.rs:927 — crates/dbx-core/src/admin/mqtt/client.rs:927-933 | crates/dbx-core/src/admin/mqtt/client.rs:957-963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:944 — crates/dbx-core/src/admin/nacos/http.rs:944-950 | crates/dbx-core/src/admin/nacos/http.rs:1006-1012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:1622 — crates/dbx-core/src/admin/nacos/http.rs:1622-1628 | crates/dbx-core/src/admin/nacos/http.rs:1649-1655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:2974 — crates/dbx-core/src/admin/nacos/http.rs:2974-2980 | crates/dbx-core/src/admin/nacos/http.rs:3013-3019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/connection/jdbc.rs:904 — crates/dbx-core/src/connection/jdbc.rs:904-910 | crates/dbx-core/src/connection/jdbc.rs:1056-1062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:7264 — REDACTED:7264-7270 | REDACTED:7308-7314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:8647 — REDACTED:8647-8653 | REDACTED:112-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) REDACTED:931 — REDACTED:931-937 | crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:688-694 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/data/sqlite_backup.rs:97 — crates/dbx-core/src/data/sqlite_backup.rs:97-103 | crates/dbx-driver-agent/src/agent_service.rs:2779-2785 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/data/transfer.rs:3279 — crates/dbx-core/src/data/transfer.rs:3279-3285 | crates/dbx-core/src/data/transfer.rs:13999-14005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/persistence/secret_codec.rs:242 — crates/dbx-core/src/persistence/secret_codec.rs:242-248 | crates/dbx-core/src/persistence/secret_codec.rs:503-509 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:2903 — REDACTED:2903-2909 | REDACTED:2918-2924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:5781 — REDACTED:5781-5787 | crates/dbx-core/src/persistence/storage/type_execution_receipts.rs:61-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) REDACTED:6406 — REDACTED:6406-6412 | REDACTED:6620-6626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:3161 — REDACTED:3161-3167 | REDACTED:3875-3881 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:6558 — REDACTED:6558-6564 | REDACTED:6604-6610 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:1031 — crates/dbx-core/src/schema/mod.rs:1031-1037 | crates/dbx-core/src/schema/mod.rs:7050-7056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:2376 — crates/dbx-core/src/schema/mod.rs:2376-2383 | crates/dbx-core/src/schema/mod.rs:13048-13054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:2898 — crates/dbx-core/src/schema/mod.rs:2898-2904 | crates/dbx-core/src/schema/mod.rs:2919-2925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/mod.rs:10848 — crates/dbx-core/src/schema/mod.rs:10848-10855 | crates/dbx-core/src/schema/mod.rs:10925-10931 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/dbx-core/src/schema/oracle_routines.rs:297 — crates/dbx-core/src/schema/oracle_routines.rs:297-303 | crates/dbx-core/src/schema/oracle_routines.rs:322-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 84 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×103
  • Duplicated block (6 lines × 2) agents/drivers/duckdb/src/schema.rs:551 — agents/drivers/duckdb/src/schema.rs:551-556 | crates/dbx-drivers/src/db/sqlite.rs:1789-1794 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) agents/drivers/duckdb/src/sql.rs:361 — agents/drivers/duckdb/src/sql.rs:361-366 | crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:23-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/dbx-ai-provider/src/ai_codex_cli.rs:107 — crates/dbx-ai-provider/src/ai_codex_cli.rs:107-113 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:248-253 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/dbx-ai-provider/src/ai_cursor_cli.rs:235 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:235-240 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:285-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:173 — crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:173-178 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:184-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-cli/src/main.rs:497 — crates/dbx-cli/src/main.rs:497-502 | crates/dbx-cli/src/main.rs:549-554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1208 — crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1208-1213 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1286-1293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/admin/nacos/access_control.rs:90 — crates/dbx-core/src/admin/nacos/access_control.rs:90-95 | crates/dbx-core/src/ai/agent_tools.rs:80-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/ai/plugin_tools.rs:837 — crates/dbx-core/src/ai/plugin_tools.rs:837-842 | crates/dbx-mcp/src/plugin_tools.rs:109-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/connection/connection_secrets.rs:649 — crates/dbx-core/src/connection/connection_secrets.rs:649-654 | crates/dbx-core/src/persistence/cloud_sync.rs:2704-2709 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:1285 — crates/dbx-core/src/data/mongodb_import_export.rs:1285-1290 | crates/dbx-core/src/data/mongodb_import_export.rs:1306-1312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) REDACTED:1931 — REDACTED:1931-1936 | REDACTED:1979-1985 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) REDACTED:3085 — REDACTED:3085-3090 | REDACTED:3183-3188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/data/transfer.rs:5312 — crates/dbx-core/src/data/transfer.rs:5312-5318 | crates/dbx-core/src/data/transfer.rs:5507-5512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/data/transfer.rs:7293 — crates/dbx-core/src/data/transfer.rs:7293-7298 | crates/dbx-core/src/data/transfer.rs:7567-7572 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) REDACTED:5784 — REDACTED:5784-5789 | REDACTED:8557-8562 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) REDACTED:6152 — REDACTED:6152-6157 | REDACTED:6175-6180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/query/redis_ops.rs:297 — crates/dbx-core/src/query/redis_ops.rs:297-302 | crates/dbx-core/src/query/redis_ops.rs:329-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/agent_pg_sequences.rs:72 — crates/dbx-core/src/schema/agent_pg_sequences.rs:72-77 | crates/dbx-core/src/schema/kingbase.rs:119-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/mod.rs:9126 — crates/dbx-core/src/schema/mod.rs:9126-9131 | crates/dbx-core/src/schema/mod.rs:9264-9269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:334 — crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:334-339 | crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:348-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:107 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:107-112 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:114-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:113 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:113-118 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:120-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/schema/oracle_routines.rs:382 — crates/dbx-core/src/schema/oracle_routines.rs:382-387 | crates/dbx-core/src/schema/oracle_routines/readback.rs:64-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/dbx-core/src/skills/mod.rs:263 — crates/dbx-core/src/skills/mod.rs:263-268 | crates/dbx-core/src/skills/mod.rs:677-682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 78 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×81
  • Repeated repair: crates/dbx-core/src/persistence/secret_codec.rs crates/dbx-core/src/persistence/secret_codec.rs:395 — crates/dbx-core/src/persistence/secret_codec.rs changed 17 times in last 90 days and 15 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is dbx_core::persistence::secret_codec::secret_service_keyring_codec at line 395), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(migration): preserve portable keys across devices”; “fix(secrets): unlock REDACTED Service items on retry”; “fix(mcp): stop repeated keychain prompts and validate upgrade identity”; “fix(core): gate secret codec test helper to keyring builds”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-core/src/persistence/secret_codec.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/dataGrid/binaryCellDownload.ts apps/desktop/src/lib/dataGrid/binaryCellDownload.ts:332 — apps/desktop/src/lib/dataGrid/binaryCellDownload.ts changed 14 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is binaryCellDownload.binaryCellClipboardText at line 332), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): display readable UUID string when editing MariaDB UUID cells (#12920)”; “fix(grid): copy text-like oracle blobs as decoded text”; “fix(grid): copy text like mysql blobs as decoded text”; “fix(grid): preview text stored in Oracle BLOB cells”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/dataGrid/binaryCellDownload.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/grid/DataGridCellDetailPanel.vue apps/desktop/src/components/grid/DataGridCellDetailPanel.vue:91 — apps/desktop/src/components/grid/DataGridCellDetailPanel.vue changed 19 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is (anonymous) at line 91), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): support geometry and WKT preview by selection”; “fix(grid): follow boolean text setting in editor and detail views”; “fix(grid): make cell detail layout responsive”; “fix(grid): preview text stored in Oracle BLOB cells”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/DataGridCellDetailPanel.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/dataGrid/dataGridPagination.ts apps/desktop/src/lib/dataGrid/dataGridPagination.ts:259 — apps/desktop/src/lib/dataGrid/dataGridPagination.ts changed 15 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is dataGridPagination.canStartDataGridLoadAll at line 259), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): drop full-grid overlay during total row count”; “fix(mysql): disable next page via read only probe”; “fix(grid): keep unpaginated query results on a single page”; “fix(grid): stop load-all re-requesting exhausted result sets”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/dataGrid/dataGridPagination.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/mcp.rs src-tauri/src/commands/mcp.rs:1290 — src-tauri/src/commands/mcp.rs changed 15 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is dbx::commands::mcp::mcp_native_binary_path_for at line 1290), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): stop linux shell probes from suspending tauri dev”; “fix(mcp): clean stale Windows replacement temporary files (#13010)”; “fix(mcp): update pnpm-installed MCP server with @latest”; “fix(mcp): support pnpm global shim with separate node runtime”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- src-tauri/src/commands/mcp.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/table/tableEditing.ts apps/desktop/src/lib/table/tableEditing.ts:29 — apps/desktop/src/lib/table/tableEditing.ts changed 13 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is tableEditing.editablePrimaryKeys at line 29), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(doris): keep UNIQUE KEY columns unique-only and scope the nullable row id”; “fix(doris): recognize composite unique keys as table row identifiers”; “fix(grid): edit keyless postgres tables via ctid row locator”; “fix(grid): support unique and virtual row identifiers”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/table/tableEditing.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/app_settings.rs src-tauri/src/commands/app_settings.rs:539 — src-tauri/src/commands/app_settings.rs changed 14 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is dbx::commands::app_settings::migrate_store_directory at line 539), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(window): restore main window geometry in logical units on macOS”; “fix(desktop): keep macOS icon independent from app theme”; “fix(desktop): keep the macOS app icon dark in dark theme”; “fix(settings): persist appearance preferences”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- src-tauri/src/commands/app_settings.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/grid/DataGridColumnHeader.vue apps/desktop/src/components/grid/DataGridColumnHeader.vue:50 — apps/desktop/src/components/grid/DataGridColumnHeader.vue changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is columnIndexText at line 50), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): use theme-aware column header tooltip”; “fix(theme): keep inverted text opaque over background images”; “fix(desktop): restore legacy webview dialog and highlight fixes”; “fix(desktop): add legacy webview fallbacks for snapshots and dialogs”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/DataGridColumnHeader.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/composables/useDataGridColumnResize.ts apps/desktop/src/composables/useDataGridColumnResize.ts:147 — apps/desktop/src/composables/useDataGridColumnResize.ts changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is useDataGridColumnResize.useDataGridColumnResize.initColumnWidths at line 147), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): invalidate only auto-calculated column widths on font or density changes (#12913)”; “fix(grid): size columns by sampled values and distribute spare width”; “fix(grid): guard DataGrid startup initialization”; “fix(iotdb): correct timestamp display and table editing”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/composables/useDataGridColumnResize.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:69 — agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is IrisAgent.resultValue at line 69), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): enable table data editing and add-row for Cache / IRIS”; “fix(iris): display %Boolean columns as stored 1/0 values”; “fix(intersystems): read out-of-range integers via BigDecimal”; “fix(iris): raise jdbc query prefetch for large results”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/editor/DangerConfirmDialog.vue apps/desktop/src/components/editor/DangerConfirmDialog.vue:101 — apps/desktop/src/components/editor/DangerConfirmDialog.vue changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is onDangerDialogOpenAutoFocus at line 101), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(oracle): preserve column parameters and OceanBase table clones”; “fix(editor): keep scroll after closing sql parameter dialog”; “fix(editor): guard danger dialog focus across reopen”; “fix(editor): keep scroll after canceling dangerous sql”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/editor/DangerConfirmDialog.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/tabs/contentSurfaceEvents.ts apps/desktop/src/lib/tabs/contentSurfaceEvents.ts:70 — apps/desktop/src/lib/tabs/contentSurfaceEvents.ts changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is contentSurfaceEvents.createContentSurfaceEventForwarders at line 70), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(objects): add sidebar locate actions to table and view context menus”; “fix(plugin): close plugin tabs safely and hide load flash”; “fix(editor): preserve SQL tab viewport state”; “fix(objects): preserve category filter per tab”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/tabs/contentSurfaceEvents.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/sidebar/dataTabOpenPolicy.ts apps/desktop/src/lib/sidebar/dataTabOpenPolicy.ts:50 — apps/desktop/src/lib/sidebar/dataTabOpenPolicy.ts changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is dataTabOpenPolicy.canReuseActiveTableTab at line 50), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(connection): invalidate data-tab metadata on disconnect/reconnect”; “fix(grid): protect unsaved cell edits on data tab reuse”; “fix(tabs): reuse data tabs only for the same table”; “fix(tabs): honor data tab reuse across activation paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/sidebar/dataTabOpenPolicy.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-plugin-runtime/src/plugins/runtime.rs crates/dbx-plugin-runtime/src/plugins/runtime.rs:972 — crates/dbx-plugin-runtime/src/plugins/runtime.rs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is UserInputSpec::parse at line 972), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(jdbc): explain Java 21 requirement on older plugin launches”; “fix(plugin): preserve reconnected sidecar sessions”; “fix(plugins): coordinate sidecar cleanup across hosts”; “fix(plugins): terminate Windows sidecar process trees”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-plugin-runtime/src/plugins/runtime.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/grid/TemporalCellEditor.vue apps/desktop/src/components/grid/TemporalCellEditor.vue:180 — apps/desktop/src/components/grid/TemporalCellEditor.vue changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is flushInputValue at line 180), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(grid): commit temporal value editor on blur like CodeMirror sibling”; “fix(grid): save value editor and cell detail edits via Ctrl+S”; “fix(grid): commit and save temporal cell edits on Ctrl+S”; “fix(grid): keep tz-aware Now values and duckdb lockfile in sync”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/grid/TemporalCellEditor.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/agents.rs src-tauri/src/commands/agents.rs:185 — src-tauri/src/commands/agents.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is dbx::commands::agents::set_agent_java_runtime_config at line 185), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(jdbc): stop plugin processes before replacing jdbc directory”; “fix(updates): auto-continue client upgrade on update-all”; “fix(agent): keep offline import resilient per item with os error detail”; “fix(agents): import standalone JRE offline packages”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- src-tauri/src/commands/agents.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-formats/src/csv_export.rs crates/dbx-formats/src/csv_export.rs:200 — crates/dbx-formats/src/csv_export.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is dbx_formats::csv_export::push_csv_value_with_quote_mode at line 200), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(csv): count decimal significant digits across separator”; “fix(clipboard): keep @-prefixed non-ASCII text verbatim”; “fix(grid): keep plain negative numeric text cells unguarded on copy”; “fix(export): neutralize formula injection in CSV/TSV exports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-formats/src/csv_export.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/dataGrid/dataGridDetail.ts apps/desktop/src/lib/dataGrid/dataGridDetail.ts:225 — apps/desktop/src/lib/dataGrid/dataGridDetail.ts changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is dataGridDetail.jsonDetailDisplayValue at line 225), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cassandra): render collection values as CQL literals”; “fix(mysql): copy varbinary text values as raw strings”; “fix(grid): copy NULL cells as empty fields”; “fix(tdengine): display timezone timestamps and tags correctly”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/dataGrid/dataGridDetail.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/export/exportFormats.ts apps/desktop/src/lib/export/exportFormats.ts:29 — apps/desktop/src/lib/export/exportFormats.ts changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is exportFormats.formatTsv at line 29), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(export): mark NULL as \N in CSV and TSV exports”; “fix(grid): copy cells containing double quotes verbatim”; “fix(sqlserver): wrap identity inserts with SET IDENTITY_INSERT”; “fix(xugu): preserve spatial SRIDs in exports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/export/exportFormats.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-web/src/routes/agents.rs crates/dbx-web/src/routes/agents.rs:290 — crates/dbx-web/src/routes/agents.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is dbx_web::routes::agents::import_agents_from_zip at line 290), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(jdbc): stop plugin processes before replacing jdbc directory”; “fix(updates): auto-continue client upgrade on update-all”; “fix(agent): keep offline import resilient per item with os error detail”; “fix(agents): import standalone JRE offline packages”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-web/src/routes/agents.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/lib/metadata/objectDdlCache.ts apps/desktop/src/lib/metadata/objectDdlCache.ts:147 — apps/desktop/src/lib/metadata/objectDdlCache.ts changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is objectDdlCache.loadRemoteDdl at line 147), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(oracle): preserve explicit DDL owner and trigger completeness”; “fix(gbase8s): strip NUL characters from column defaults and table DDL”; “fix(oceanbase): preserve object paging and completion metadata identity”; “fix(metadata): await object cache invalidation on connection refresh”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/lib/metadata/objectDdlCache.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/plugins/PluginWorkbenchTab.vue apps/desktop/src/components/plugins/PluginWorkbenchTab.vue:60 — apps/desktop/src/components/plugins/PluginWorkbenchTab.vue changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is refresh at line 60), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(connection): block passive reconnect for user-closed connections”; “fix(plugins): self-heal restored plugin pages silently”; “fix(plugin): resolve result-view by UI contribution”; “fix(plugin): close plugin tabs safely and hide load flash”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/plugins/PluginWorkbenchTab.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: apps/desktop/src/components/ssh/SshHostKeyPromptDialog.vue apps/desktop/src/components/ssh/SshHostKeyPromptDialog.vue:113 — apps/desktop/src/components/ssh/SshHostKeyPromptDialog.vue changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is handleWebEvent at line 113), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ssh): clear focus ring clipping in the host key prompt”; “fix(dialog): keep stacked dialogs dismissible”; “fix(sqlite): validate ssh backup and query errors”; “fix(ssh): raise host-key prompt above connection dialog”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- apps/desktop/src/components/ssh/SshHostKeyPromptDialog.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src-tauri/src/commands/plugins.rs src-tauri/src/commands/plugins.rs:147 — src-tauri/src/commands/plugins.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is dbx::commands::plugins::install_plugin_event_bridge at line 147), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(plugins): terminate Windows sidecar process trees”; “fix(plugins): stream dropped files and folders into plugin workbenches”; “fix(plugins): make plugin uninstall state consistent on failure”; “fix(plugins): refresh workbench tabs after install and rollback”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- src-tauri/src/commands/plugins.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/dbx-core/src/data/csv_export.rs crates/dbx-core/src/data/csv_export.rs:103 — crates/dbx-core/src/data/csv_export.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is dbx_core::data::csv_export::write_table_csv_pages at line 103), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): refresh desktop connection list after MCP mutations”; “fix(neo4j): pick node identity function by server version”; “fix(export): mark NULL as \N in CSV and TSV exports”; “fix(cassandra): use cursor pagination for table data and exports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 09:18:44 +08:00' --until='2026-10-27 09:18:44 +08:00' --full-history --no-merges -- crates/dbx-core/src/data/csv_export.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 56 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_sql_schema · ×80
  • dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cognitive 578) crates/dbx-sql-schema/src/schema_diff.rs:6545 — dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl has cognitive complexity 578 (threshold 15). Drivers by points: if/else 127 (478 pts), match/switch 9 (43 pts), loops 12 (35 pts), boolean chains 22 (nesting depth added 408). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan (cognitive 257) crates/dbx-sql-schema/src/native_job_changes/transitions.rs:130 — dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan has cognitive complexity 257 (threshold 15). Drivers by points: if/else 85 (168 pts), boolean chains 37, loops 14 (36 pts), match/switch 6 (16 pts) (nesting depth added 115). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes (cognitive 234) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:16 — dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes has cognitive complexity 234 (threshold 15). Drivers by points: if/else 60 (180 pts), match/switch 9 (32 pts), boolean chains 14, loops 5 (8 pts) (nesting depth added 146). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl (cognitive 175) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs:72 — dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl has cognitive complexity 175 (threshold 15). Drivers by points: if/else 70 (133 pts), boolean chains 28, loops 7 (12 pts), match/switch 2 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::columns::build_column_sql (cognitive 164) crates/dbx-sql-schema/src/table_structure_sql/columns.rs:29 — dbx_sql_schema::table_structure_sql::columns::build_column_sql has cognitive complexity 164 (threshold 15). Drivers by points: if/else 62 (123 pts), boolean chains 29, match/switch 2 (7 pts), loops 3 (5 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::generate_create_table_sql (cognitive 91) crates/dbx-sql-schema/src/schema_diff.rs:5796 — dbx_sql_schema::schema_diff::generate_create_table_sql has cognitive complexity 91 (threshold 15). Drivers by points: if/else 35 (79 pts), loops 5 (6 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes (cognitive 85) crates/dbx-sql-schema/src/table_structure_sql/oracle_foreign_keys.rs:10 — dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes has cognitive complexity 85 (threshold 15). Drivers by points: if/else 26 (69 pts), boolean chains 9, loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::starrocks_layout::build (cognitive 85) crates/dbx-sql-schema/src/table_structure_sql/starrocks_layout.rs:36 — dbx_sql_schema::table_structure_sql::starrocks_layout::build has cognitive complexity 85 (threshold 15). Drivers by points: if/else 24 (57 pts), boolean chains 14, match/switch 4 (10 pts), loops 2 (4 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan (cognitive 84) crates/dbx-sql-schema/src/native_job_changes/creation.rs:32 — dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan has cognitive complexity 84 (threshold 15). Drivers by points: if/else 35 (70 pts), boolean chains 8, loops 3, match/switch 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations (cognitive 82) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:20 — dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations has cognitive complexity 82 (threshold 15). Drivers by points: if/else 28 (70 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::native_job_changes::dameng::parts::plan_entries (cognitive 76) crates/dbx-sql-schema/src/native_job_changes/dameng/parts.rs:570 — dbx_sql_schema::native_job_changes::dameng::parts::plan_entries has cognitive complexity 76 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 9 (20 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::native_job_changes::native_job_mutation_plan (cognitive 75) crates/dbx-sql-schema/src/native_job_changes.rs:233 — dbx_sql_schema::native_job_changes::native_job_mutation_plan has cognitive complexity 75 (threshold 15). Drivers by points: if/else 32 (60 pts), match/switch 4 (9 pts), boolean chains 6 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::diff_columns_with_identifier_options (cognitive 68) crates/dbx-sql-schema/src/schema_diff.rs:3445 — dbx_sql_schema::schema_diff::diff_columns_with_identifier_options has cognitive complexity 68 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 5 (10 pts), boolean chains 6 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::table_structure_sql::indexes::build_index_sql (cognitive 68) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:7 — dbx_sql_schema::table_structure_sql::indexes::build_index_sql has cognitive complexity 68 (threshold 15). Drivers by points: if/else 22 (62 pts), boolean chains 5, loops 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::prepare_schema_diff (cognitive 66) crates/dbx-sql-schema/src/schema_diff.rs:2100 — dbx_sql_schema::schema_diff::prepare_schema_diff has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (47 pts), loops 5 (9 pts), boolean chains 8, match/switch 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::consume_postgres_cast_type (cognitive 65) crates/dbx-sql-schema/src/schema_diff.rs:5159 — dbx_sql_schema::schema_diff::consume_postgres_cast_type has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (55 pts), match/switch 2 (6 pts), boolean chains 2, loops 2 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql (cognitive 65) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:557 — dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (52 pts), match/switch 3 (8 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::generate_permission_sync_sql (cognitive 63) crates/dbx-sql-schema/src/schema_diff.rs:1864 — dbx_sql_schema::schema_diff::generate_permission_sync_sql has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (60 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements (cognitive 61) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:577 — dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements has cognitive complexity 61 (threshold 15). Drivers by points: if/else 41 (43 pts), boolean chains 14, match/switch 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_schema::schema_diff::order_diffs_for_execution (cognitive 54) crates/dbx-sql-schema/src/schema_diff.rs:6417 — dbx_sql_schema::schema_diff::order_diffs_for_execution has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 8 (15 pts), match/switch 3 (8 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change (cognitive 53) crates/dbx-sql-schema/src/table_structure_sql/existing_primary_key.rs:8 — dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 18 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::starrocks_partition::validate (cognitive 49) crates/dbx-sql-schema/src/table_structure_sql/starrocks_partition.rs:88 — dbx_sql_schema::table_structure_sql::starrocks_partition::validate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 7, loops 3 (7 pts), match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql (cognitive 48) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:24 — dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 14, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::native_job_changes::dameng::parts::apply_changes (cognitive 43) crates/dbx-sql-schema/src/native_job_changes/dameng/parts.rs:225 — dbx_sql_schema::native_job_changes::dameng::parts::apply_changes has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 4 (5 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_schema::schema_diff::diff_schema (cognitive 42) crates/dbx-sql-schema/src/schema_diff.rs:2418 — dbx_sql_schema::schema_diff::diff_schema has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 6, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 55 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_sql_core · ×77
  • dbx_sql_core::sql::split_sql_statement_ranges_with_options (cognitive 152) crates/dbx-sql-core/src/sql.rs:1480 — dbx_sql_core::sql::split_sql_statement_ranges_with_options has cognitive complexity 152 (threshold 15). Drivers by points: if/else 43 (121 pts), boolean chains 28, match/switch 1 (2 pts), loops 1 (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained (cognitive 111) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1543 — dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained has cognitive complexity 111 (threshold 15). Drivers by points: if/else 32 (71 pts), boolean chains 18, loops 9 (13 pts), match/switch 3 (9 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata (cognitive 104) crates/dbx-sql-core/src/query_execution_sql.rs:1219 — dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata has cognitive complexity 104 (threshold 15). Drivers by points: if/else 30 (74 pts), loops 5 (18 pts), boolean chains 7, match/switch 1 (5 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl (cognitive 94) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:703 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl has cognitive complexity 94 (threshold 15). Drivers by points: if/else 33 (62 pts), boolean chains 18, loops 5 (8 pts), match/switch 2 (6 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_trigger::analyze (cognitive 94) crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:409 — dbx_sql_core::object_source_sql::oracle_trigger::analyze has cognitive complexity 94 (threshold 15). Drivers by points: if/else 42 (56 pts), boolean chains 31, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits (cognitive 93) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:579 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits has cognitive complexity 93 (threshold 15). Drivers by points: if/else 17 (62 pts), boolean chains 16, match/switch 2 (8 pts), loops 3 (7 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::oracle_view_rename::rewrite_hints (cognitive 84) crates/dbx-sql-core/src/oracle_view_rename.rs:479 — dbx_sql_core::oracle_view_rename::rewrite_hints has cognitive complexity 84 (threshold 15). Drivers by points: if/else 23 (64 pts), boolean chains 10, loops 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges (cognitive 82) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:935 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges has cognitive complexity 82 (threshold 15). Drivers by points: if/else 24 (65 pts), boolean chains 11, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::rewrite_oracle_routine_references (cognitive 79) crates/dbx-sql-core/src/object_source_sql.rs:210 — dbx_sql_core::object_source_sql::rewrite_oracle_routine_references has cognitive complexity 79 (threshold 15). Drivers by points: if/else 23 (52 pts), boolean chains 12, loops 5 (10 pts), match/switch 1 (5 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql_diagnostics::redact_literals (cognitive 73) crates/dbx-sql-core/src/sql_diagnostics.rs:37 — dbx_sql_core::sql_diagnostics::redact_literals has cognitive complexity 73 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 7 (21 pts), boolean chains 9 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass (cognitive 72) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:94 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass has cognitive complexity 72 (threshold 15). Drivers by points: if/else 28 (61 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::mysql_routine_tokens (cognitive 71) crates/dbx-sql-core/src/sql.rs:2282 — dbx_sql_core::sql::mysql_routine_tokens has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (60 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers (cognitive 63) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:343 — dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (41 pts), boolean chains 11, loops 5 (11 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql_analysis::spark_datasource_clause_removals (cognitive 63) crates/dbx-sql-core/src/sql_analysis.rs:327 — dbx_sql_core::sql_analysis::spark_datasource_clause_removals has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (57 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::oracle_plsql_tokens_fallback (cognitive 62) crates/dbx-sql-core/src/sql.rs:4030 — dbx_sql_core::sql::oracle_plsql_tokens_fallback has cognitive complexity 62 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 6 (16 pts), boolean chains 5 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl (cognitive 60) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:450 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 6 (15 pts), boolean chains 10 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::cypher_read_only::is_proven_read_only_cypher (cognitive 58) crates/dbx-sql-core/src/cypher_read_only.rs:25 — dbx_sql_core::cypher_read_only::is_proven_read_only_cypher has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 5 (13 pts), boolean chains 11, match/switch 1 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::statements (cognitive 53) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:277 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::statements has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (46 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl (cognitive 52) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1231 — dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 7 (11 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::first_executable_sql_token_with_options (cognitive 48) crates/dbx-sql-core/src/sql.rs:3341 — dbx_sql_core::sql::first_executable_sql_token_with_options has cognitive complexity 48 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 7 (16 pts), boolean chains 15 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::sql::sqlserver_top_level_tokens (cognitive 46) crates/dbx-sql-core/src/sql.rs:1906 — dbx_sql_core::sql::sqlserver_top_level_tokens has cognitive complexity 46 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 6 (16 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::validate_oracle_object_source (cognitive 45) crates/dbx-sql-core/src/object_source_sql.rs:710 — dbx_sql_core::object_source_sql::validate_oracle_object_source has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 10, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_core::object_source_sql::rewrite_oracle_table_references (cognitive 44) crates/dbx-sql-core/src/object_source_sql.rs:368 — dbx_sql_core::object_source_sql::rewrite_oracle_table_references has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 14, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches (cognitive 44) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:71 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 2 (5 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_core::object_source_sql::oceanbase_sequence_edit_sql (cognitive 41) crates/dbx-sql-core/src/object_source_sql.rs:1196 — dbx_sql_core::object_source_sql::oceanbase_sequence_edit_sql has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 5, loops 2, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 52 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×72
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai.rs:1602 — crates/dbx-ai-provider/src/ai.rs:1602-1610 | crates/dbx-ai-provider/src/ai.rs:1632-1640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361-369 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:766-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:674 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:674-682 | crates/dbx-ai-provider/src/ai_grok_cli.rs:600-608 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` and `crates/dbx-ai-provider/src/ai_grok_cli.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_cursor_cli.rs:338 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:338-346 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:562-570 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_cursor_cli.rs` and `crates/dbx-ai-provider/src/ai_opencode_cli.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/dbx-ai-provider/src/ai_opencode_cli.rs:612 — crates/dbx-ai-provider/src/ai_opencode_cli.rs:612-620 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:637-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:969 — crates/dbx-core/src/admin/nacos/http.rs:969-977 | crates/dbx-core/src/admin/nacos/http.rs:991-999 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:2389 — crates/dbx-core/src/admin/nacos/http.rs:2389-2397 | crates/dbx-core/src/admin/nacos/http.rs:2429-2437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/ai/agent_tools.rs:902 — crates/dbx-core/src/ai/agent_tools.rs:902-910 | crates/dbx-core/src/ai/agent_tools.rs:1004-1012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:2380 — REDACTED:2380-2388 | REDACTED:2425-2433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:3656 — REDACTED:3656-3664 | src-tauri/src/commands/connection.rs:2307-2315 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/cloudflare_d1/import.rs:29 — crates/dbx-core/src/data/cloudflare_d1/import.rs:29-37 | REDACTED:4885-4893 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) REDACTED:1154 — REDACTED:1154-1162 | REDACTED:3242-3250 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) REDACTED:1186 — REDACTED:1186-1194 | REDACTED:3543-3551 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) REDACTED:2478 — REDACTED:2478-2486 | REDACTED:2615-2623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:910 — crates/dbx-core/src/data/mongodb_import_export.rs:910-918 | crates/dbx-core/src/data/mongodb_import_export.rs:1545-1553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:3037 — crates/dbx-core/src/data/mongodb_import_export.rs:3037-3045 | crates/dbx-core/src/data/mongodb_import_export.rs:3277-3285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:1937 — REDACTED:1937-1945 | REDACTED:1986-1994 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:1286 — REDACTED:1286-1294 | REDACTED:1390-1398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/data/transfer.rs:5589 — crates/dbx-core/src/data/transfer.rs:5589-5597 | crates/dbx-core/src/data/transfer.rs:5716-5724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:6164 — REDACTED:6164-6172 | REDACTED:6187-6195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:8142 — REDACTED:8142-8150 | REDACTED:8990-8998 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:2649 — REDACTED:2649-2657 | REDACTED:2680-2688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:6858 — REDACTED:6858-6866 | REDACTED:7071-7079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/agent_pg_sequences.rs:53 — crates/dbx-core/src/schema/agent_pg_sequences.rs:53-61 | crates/dbx-core/src/schema/kingbase.rs:100-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/dbx-core/src/schema/exact_metadata.rs:159 — crates/dbx-core/src/schema/exact_metadata.rs:159-167 | crates/dbx-core/src/schema/exact_metadata.rs:192-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 47 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×70
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai.rs:4109 — crates/dbx-ai-provider/src/ai.rs:4109-4116 | crates/dbx-ai-provider/src/ai.rs:4842-4849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai.rs:4207 — crates/dbx-ai-provider/src/ai.rs:4207-4214 | crates/dbx-ai-provider/src/ai.rs:5103-5110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:279 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:279-286 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:358-365 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:397 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:397-404 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:508-515 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/dbx-ai-provider/src/ai_codex_cli.rs:391 — crates/dbx-ai-provider/src/ai_codex_cli.rs:391-398 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:373-380 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:3975 — crates/dbx-core/src/admin/nacos/http.rs:3975-3982 | crates/dbx-core/src/admin/nacos/http.rs:4039-4046 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:342 — REDACTED:342-349 | crates/dbx-formats/src/text_export.rs:110-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/data/transfer.rs:10858 — crates/dbx-core/src/data/transfer.rs:10858-10865 | crates/dbx-core/src/data/transfer.rs:10891-10898 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:9804 — REDACTED:9804-9811 | REDACTED:9969-9976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/query/document_ops.rs:576 — crates/dbx-core/src/query/document_ops.rs:576-583 | crates/dbx-core/src/query/mongo_ops.rs:563-570 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/query/document_ops.rs:601 — crates/dbx-core/src/query/document_ops.rs:601-608 | crates/dbx-core/src/query/document_ops.rs:646-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:2039 — REDACTED:2039-2046 | REDACTED:2235-2242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:2219 — REDACTED:2219-2226 | REDACTED:2250-2257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:6986 — REDACTED:6986-6993 | REDACTED:7014-7021 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/query/redis_ops.rs:153 — crates/dbx-core/src/query/redis_ops.rs:153-160 | crates/dbx-core/src/query/redis_ops.rs:1291-1298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/schema/mod.rs:9322 — crates/dbx-core/src/schema/mod.rs:9322-9329 | crates/dbx-core/src/schema/mod.rs:9399-9406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:313 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:313-320 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:344-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-core/src/schema/oracle_type_details.rs:80 — crates/dbx-core/src/schema/oracle_type_details.rs:80-87 | crates/dbx-core/src/schema/oracle_type_management.rs:107-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/dbx-driver-agent/src/agent_driver.rs:352 — crates/dbx-driver-agent/src/agent_driver.rs:352-359 | crates/dbx-driver-agent/src/agent_driver.rs:381-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-agent/src/agent_manager.rs:1310 — crates/dbx-driver-agent/src/agent_manager.rs:1310-1317 | crates/dbx-driver-agent/src/agent_manager.rs:1333-1340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:511 — crates/dbx-driver-mongodb/src/mongo_driver.rs:511-518 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1784-1791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:2778 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2778-2785 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2801-2808 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:1857 — REDACTED:1857-1864 | REDACTED:8753-8760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-redis/src/lib.rs:5337 — crates/dbx-driver-redis/src/lib.rs:5337-5344 | crates/dbx-driver-redis/src/lib.rs:5363-5370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:2437 — crates/dbx-driver-sqlserver/src/sqlserver.rs:2437-2444 | crates/dbx-driver-sqlserver/src/sqlserver.rs:2496-2503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 45 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×67
  • Duplicated block (10 lines × 2) agents/drivers/duckdb/src/schema.rs:484 — agents/drivers/duckdb/src/schema.rs:484-493 | agents/drivers/duckdb/src/schema.rs:534-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-ai-provider/src/ai.rs:2506 — crates/dbx-ai-provider/src/ai.rs:2506-2515 | crates/dbx-ai-provider/src/ai.rs:2534-2543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:545 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:545-554 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:796-805 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:3107 — crates/dbx-core/src/admin/nacos/http.rs:3107-3116 | crates/dbx-core/src/admin/nacos/http.rs:3123-3132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/connection/jdbc.rs:990 — crates/dbx-core/src/connection/jdbc.rs:990-999 | crates/dbx-core/src/connection/jdbc.rs:1070-1079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:3020 — REDACTED:3020-3029 | REDACTED:3061-3070 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:3847 — REDACTED:3847-3856 | src-tauri/src/commands/connection.rs:2436-2445 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) REDACTED:7634 — REDACTED:7634-7643 | crates/dbx-driver-support/src/http_tunnel.rs:143-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) REDACTED:7993 — REDACTED:7993-8002 | REDACTED:8034-8043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:1134 — REDACTED:1134-1143 | REDACTED:3225-3234 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) REDACTED:1334 — REDACTED:1334-1343 | REDACTED:2202-2211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:3917 — REDACTED:3917-3926 | REDACTED:3946-3955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:6890 — REDACTED:6890-6899 | crates/dbx-core/src/data/transfer.rs:7011-7020 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/data/transfer.rs:5503 — crates/dbx-core/src/data/transfer.rs:5503-5512 | crates/dbx-core/src/data/transfer.rs:5634-5643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/data/transfer.rs:9291 — crates/dbx-core/src/data/transfer.rs:9291-9300 | crates/dbx-core/src/schema/mod.rs:231-240 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) REDACTED:892 — REDACTED:892-901 | REDACTED:952-963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:8058 — REDACTED:8058-8067 | REDACTED:8153-8162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:8105 — REDACTED:8105-8114 | REDACTED:8200-8209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:9586 — REDACTED:9586-9595 | REDACTED:9669-9678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:5417 — REDACTED:5417-5426 | REDACTED:5811-5820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/query/pl_debug/transport.rs:199 — crates/dbx-core/src/query/pl_debug/transport.rs:199-208 | crates/dbx-core/src/query/pl_debug/transport.rs:236-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/schema/mod.rs:7594 — crates/dbx-core/src/schema/mod.rs:7594-7603 | crates/dbx-core/src/schema/mod.rs:7628-7637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/schema/native_jobs/operations.rs:97 — crates/dbx-core/src/schema/native_jobs/operations.rs:97-106 | crates/dbx-core/src/schema/native_jobs/operations.rs:133-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-core/src/schema/oracle_routines/execution.rs:94 — crates/dbx-core/src/schema/oracle_routines/execution.rs:94-103 | crates/dbx-core/src/schema/oracle_routines/execution.rs:177-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/dbx-driver-agent/src/agent_runtime.rs:437 — crates/dbx-driver-agent/src/agent_runtime.rs:437-446 | crates/dbx-driver-agent/src/agent_runtime.rs:470-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 42 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×58
  • ClassTooLong: DbxJdbcPlugin REDACTED:64 — ClassTooLong — 4762 significant lines (blank, comment-only and punctuation-only lines excluded), 320 methods. The bar is 400 significant lines; this is 4362 over it, 11.91× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Storage REDACTED:230 — ClassTooLong — 4444 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 220 methods, 16 blocks, lines 230-9287. The bar is 400 significant lines; this is 4044 over it, 11.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppState REDACTED:444 — ClassTooLong — 4228 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 179 methods, 2 blocks, lines 444-7631. The bar is 400 significant lines; this is 3828 over it, 10.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DamengAgent REDACTED:68 — ClassTooLong — 2449 significant lines (blank, comment-only and punctuation-only lines excluded), 192 methods. The bar is 400 significant lines; this is 2049 over it, 6.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DbxMcpServer crates/dbx-mcp/src/server.rs:694 — ClassTooLong — 2335 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 65 methods, 5 blocks, lines 694-4129. The bar is 400 significant lines; this is 1935 over it, 5.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NacosOpenApiAdmin crates/dbx-core/src/admin/nacos/http.rs:167 — ClassTooLong — 2264 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 64 methods, 3 blocks, lines 167-3387. The bar is 400 significant lines; this is 1864 over it, 5.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useDataGridExport apps/desktop/src/composables/useDataGridExport.ts:1 — ClassTooLong — 2082 significant lines (blank, comment-only and punctuation-only lines excluded), 121 methods. The bar is 400 significant lines; this is 1682 over it, 5.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: KafkaAgent agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:39 — ClassTooLong — 1997 significant lines (blank, comment-only and punctuation-only lines excluded), 134 methods. The bar is 400 significant lines; this is 1597 over it, 4.99× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useDataGridEditor apps/desktop/src/composables/useDataGridEditor.ts:1 — ClassTooLong — 1935 significant lines (blank, comment-only and punctuation-only lines excluded), 161 methods. The bar is 400 significant lines; this is 1535 over it, 4.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MongoAgent REDACTED:102 — ClassTooLong — 1913 significant lines (blank, comment-only and punctuation-only lines excluded), 156 methods. The bar is 400 significant lines; this is 1513 over it, 4.78× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlDebugSession agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:52 — ClassTooLong — 1648 significant lines (blank, comment-only and punctuation-only lines excluded), 120 methods. The bar is 400 significant lines; this is 1248 over it, 4.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JdbcConnectionPoolRegistry agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:42 — ClassTooLong — 1576 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 1176 over it, 3.94× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useQueryEditorCompletion apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1 — ClassTooLong — 1272 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 872 over it, 3.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AgentDriverClient crates/dbx-driver-agent/src/agent_driver.rs:1159 — ClassTooLong — 1255 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 131 methods, 4 blocks, lines 1159-4372. The bar is 400 significant lines; this is 855 over it, 3.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlDebugTarget agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:33 — ClassTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 819 over it, 3.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WebBackend crates/dbx-mcp/src/backend.rs:553 — ClassTooLong — 1015 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 4 blocks, lines 553-2659. The bar is 400 significant lines; this is 615 over it, 2.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Gbase8sAgent REDACTED:36 — ClassTooLong — 973 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 573 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JdbcExecutor agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:25 — ClassTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 570 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useSidebarDatabaseSpecificMutationRuntime apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:1 — ClassTooLong — 913 significant lines (blank, comment-only and punctuation-only lines excluded), 91 methods. The bar is 400 significant lines; this is 513 over it, 2.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PostgresLikeAgent agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:13 — ClassTooLong — 855 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 455 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JsonRpcServer agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:24 — ClassTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 350 over it, 1.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SqlServerLegacyAgent agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:34 — ClassTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 339 over it, 1.85× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useSqlExecution apps/desktop/src/composables/useSqlExecution.ts:1 — ClassTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 321 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useSidebarTreeExportRuntime apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:1 — ClassTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 302 over it, 1.76× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MqttClient crates/dbx-core/src/admin/mqtt/client.rs:303 — ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 3 blocks, lines 303-1239. The bar is 400 significant lines; this is 254 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 33 more in this group — see findings.md.
D1 · Cyclomatic Complexity · dbx_sql_schema · ×55
  • dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl (cyclomatic 164) crates/dbx-sql-schema/src/schema_diff.rs:6545 — dbx_sql_schema::schema_diff::generate_schema_sync_sql_inner_with_oracle_ddl has cyclomatic complexity 164 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan (cyclomatic 136) crates/dbx-sql-schema/src/native_job_changes/transitions.rs:130 — dbx_sql_schema::native_job_changes::transitions::native_job_scheduler_edit_plan has cyclomatic complexity 136 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl (cyclomatic 104) crates/dbx-sql-schema/src/table_structure_sql/create_table.rs:72 — dbx_sql_schema::table_structure_sql::create_table::build_create_table_sql_impl has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::columns::build_column_sql (cyclomatic 99) crates/dbx-sql-schema/src/table_structure_sql/columns.rs:29 — dbx_sql_schema::table_structure_sql::columns::build_column_sql has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes (cyclomatic 84) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:16 — dbx_sql_schema::table_structure_sql::oracle_constraints::build_changes has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_jobs::references::native_job_reference_queries (cyclomatic 58) crates/dbx-sql-schema/src/native_jobs/references.rs:5 — dbx_sql_schema::native_jobs::references::native_job_reference_queries has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql (cyclomatic 49) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:24 — dbx_sql_schema::table_structure_sql::column_alter::build_single_column_alter_sql has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements (cyclomatic 47) crates/dbx-sql-schema/src/table_structure_sql/indexes.rs:577 — dbx_sql_schema::table_structure_sql::indexes::build_create_index_statements has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_schema::schema_diff::generate_create_table_sql (cyclomatic 46) crates/dbx-sql-schema/src/schema_diff.rs:5796 — dbx_sql_schema::schema_diff::generate_create_table_sql has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::starrocks_layout::build (cyclomatic 46) crates/dbx-sql-schema/src/table_structure_sql/starrocks_layout.rs:36 — dbx_sql_schema::table_structure_sql::starrocks_layout::build has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan (cyclomatic 45) crates/dbx-sql-schema/src/native_job_changes/creation.rs:32 — dbx_sql_schema::native_job_changes::creation::native_job_scheduler_create_plan has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::native_job_mutation_plan (cyclomatic 41) crates/dbx-sql-schema/src/native_job_changes.rs:233 — dbx_sql_schema::native_job_changes::native_job_mutation_plan has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::scheduler_attribute_steps (cyclomatic 40) crates/dbx-sql-schema/src/native_job_changes.rs:518 — dbx_sql_schema::native_job_changes::scheduler_attribute_steps has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change (cyclomatic 40) crates/dbx-sql-schema/src/table_structure_sql/existing_primary_key.rs:8 — dbx_sql_schema::table_structure_sql::existing_primary_key::build_existing_primary_key_change has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes (cyclomatic 38) crates/dbx-sql-schema/src/table_structure_sql/oracle_foreign_keys.rs:10 — dbx_sql_schema::table_structure_sql::oracle_foreign_keys::build_changes has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::schema_diff::consume_postgres_cast_type (cyclomatic 36) crates/dbx-sql-schema/src/schema_diff.rs:5159 — dbx_sql_schema::schema_diff::consume_postgres_cast_type has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_job_changes::dameng::parts::plan_entries (cyclomatic 34) crates/dbx-sql-schema/src/native_job_changes/dameng/parts.rs:570 — dbx_sql_schema::native_job_changes::dameng::parts::plan_entries has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::schema_diff::prepare_schema_diff (cyclomatic 34) crates/dbx-sql-schema/src/schema_diff.rs:2100 — dbx_sql_schema::schema_diff::prepare_schema_diff has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql (cyclomatic 33) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:557 — dbx_sql_schema::table_structure_sql::column_alter::build_postgres_like_existing_column_sql has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::table_structure_sql::oracle_constraints::validate_unique (cyclomatic 33) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:315 — dbx_sql_schema::table_structure_sql::oracle_constraints::validate_unique has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations (cyclomatic 33) crates/dbx-sql-schema/src/table_structure_sql/triggers.rs:20 — dbx_sql_schema::table_structure_sql::triggers::build_trigger_sql_with_operations has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::schema_diff::create_index_sql (cyclomatic 32) crates/dbx-sql-schema/src/schema_diff.rs:4727 — dbx_sql_schema::schema_diff::create_index_sql has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_schema::table_structure_sql::starrocks_partition::validate (cyclomatic 31) crates/dbx-sql-schema/src/table_structure_sql/starrocks_partition.rs:88 — dbx_sql_schema::table_structure_sql::starrocks_partition::validate has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_schema::native_jobs::native_job_catalog_queries (cyclomatic 30) crates/dbx-sql-schema/src/native_jobs.rs:80 — dbx_sql_schema::native_jobs::native_job_catalog_queries has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_schema::schema_diff::diff_columns_with_identifier_options (cyclomatic 30) crates/dbx-sql-schema/src/schema_diff.rs:3445 — dbx_sql_schema::schema_diff::diff_columns_with_identifier_options has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 30 more in this group — see findings.md.
D1 · Cyclomatic Complexity · dbx_sql_core · ×53
  • dbx_sql_core::object_source_sql::oracle_trigger::analyze (cyclomatic 72) crates/dbx-sql-core/src/object_source_sql/oracle_trigger.rs:409 — dbx_sql_core::object_source_sql::oracle_trigger::analyze has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql::split_sql_statement_ranges_with_options (cyclomatic 71) crates/dbx-sql-core/src/sql.rs:1480 — dbx_sql_core::sql::split_sql_statement_ranges_with_options has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained (cyclomatic 66) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1543 — dbx_sql_core::object_source_sql::oracle_indexes::split_oracle_table_ddl_with_retained has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl (cyclomatic 57) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:703 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_table_ddl has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::validate_oracle_object_source (cyclomatic 45) crates/dbx-sql-core/src/object_source_sql.rs:710 — dbx_sql_core::object_source_sql::validate_oracle_object_source has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_core::object_source_sql::rewrite_oracle_routine_references (cyclomatic 43) crates/dbx-sql-core/src/object_source_sql.rs:210 — dbx_sql_core::object_source_sql::rewrite_oracle_routine_references has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits (cyclomatic 43) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:579 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_default_sequence_owner_edits has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata (cyclomatic 41) crates/dbx-sql-core/src/query_execution_sql.rs:1219 — dbx_sql_core::query_execution_sql::strip_sql_comments_and_literals_with_metadata has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges (cyclomatic 38) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:935 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_table_source_statement_ranges has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::oracle_view_rename::rewrite_hints (cyclomatic 37) crates/dbx-sql-core/src/oracle_view_rename.rs:479 — dbx_sql_core::oracle_view_rename::rewrite_hints has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass (cyclomatic 35) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:94 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::body_pass has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql::mysql_routine_tokens (cyclomatic 33) crates/dbx-sql-core/src/sql.rs:2282 — dbx_sql_core::sql::mysql_routine_tokens has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::cypher_read_only::is_proven_read_only_cypher (cyclomatic 32) crates/dbx-sql-core/src/cypher_read_only.rs:25 — dbx_sql_core::cypher_read_only::is_proven_read_only_cypher has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers (cyclomatic 31) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:343 — dbx_sql_core::object_source_sql::oracle_indexes::extract_oracle_triggers has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl (cyclomatic 31) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1231 — dbx_sql_core::object_source_sql::oracle_indexes::parse_oracle_table_ddl has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::rewrite_oracle_table_references (cyclomatic 30) crates/dbx-sql-core/src/object_source_sql.rs:368 — dbx_sql_core::object_source_sql::rewrite_oracle_table_references has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql_analysis::spark_datasource_clause_removals (cyclomatic 30) crates/dbx-sql-core/src/sql_analysis.rs:327 — dbx_sql_core::sql_analysis::spark_datasource_clause_removals has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql_diagnostics::redact_literals (cyclomatic 30) crates/dbx-sql-core/src/sql_diagnostics.rs:37 — dbx_sql_core::sql_diagnostics::redact_literals has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl (cyclomatic 29) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:450 — dbx_sql_core::object_source_sql::oracle_indexes::rebase_oracle_trigger_ddl has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::sql::first_executable_sql_token_with_options (cyclomatic 29) crates/dbx-sql-core/src/sql.rs:3341 — dbx_sql_core::sql::first_executable_sql_token_with_options has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_sql_core::object_source_sql::build_executable_object_source_statements_with_mysql_validation_name (cyclomatic 28) crates/dbx-sql-core/src/object_source_sql.rs:519 — dbx_sql_core::object_source_sql::build_executable_object_source_statements_with_mysql_validation_name has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_core::object_source_sql::rewrite_oracle_routine_self_references (cyclomatic 28) crates/dbx-sql-core/src/object_source_sql.rs:1943 — dbx_sql_core::object_source_sql::rewrite_oracle_routine_self_references has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches (cyclomatic 28) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:71 — dbx_sql_core::object_source_sql::oracle_indexes::oracle_trigger_metadata_matches has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oracle_routines::analysis::package::parse_specification (cyclomatic 26) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:729 — dbx_sql_core::object_source_sql::oracle_routines::analysis::package::parse_specification has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_core::object_source_sql::oceanbase_sequence_edit_sql (cyclomatic 25) crates/dbx-sql-core/src/object_source_sql.rs:1196 — dbx_sql_core::object_source_sql::oceanbase_sequence_edit_sql has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×44
  • Duplicated block (11 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:616 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:616-626 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:873-883 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1380 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1380-1390 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:1400-1410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/admin/nacos/access_control.rs:182 — crates/dbx-core/src/admin/nacos/access_control.rs:182-192 | crates/dbx-core/src/admin/nacos/access_control.rs:206-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/ai/plugin_tools.rs:844 — crates/dbx-core/src/ai/plugin_tools.rs:844-854 | crates/dbx-mcp/src/plugin_tools.rs:116-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) REDACTED:6412 — REDACTED:6412-6422 | REDACTED:7552-7562 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:8029 — REDACTED:8029-8039 | REDACTED:8046-8056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:5797 — REDACTED:5797-5807 | crates/dbx-driver-postgres/src/text_encoding.rs:185-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) REDACTED:4560 — REDACTED:4560-4570 | REDACTED:4627-4637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:1038 — REDACTED:1038-1048 | REDACTED:1066-1076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/query/redis_ops.rs:1079 — crates/dbx-core/src/query/redis_ops.rs:1079-1089 | crates/dbx-core/src/query/redis_ops.rs:1118-1128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-core/src/schema/mod.rs:1680 — crates/dbx-core/src/schema/mod.rs:1680-1690 | crates/dbx-core/src/schema/mod.rs:1701-1711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:2069 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2069-2079 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2092-2102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:2843 — crates/dbx-driver-mysql/src/mysql.rs:2843-2853 | crates/dbx-driver-mysql/src/mysql.rs:2881-2891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-driver-redis/src/lib.rs:3213 — crates/dbx-driver-redis/src/lib.rs:3213-3223 | crates/dbx-driver-redis/src/lib.rs:3330-3340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:1890 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1890-1900 | crates/dbx-sql-data/src/query_result_sql.rs:2847-2857 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/dbx-drivers/src/db/proxy_tunnel.rs:381 — crates/dbx-drivers/src/db/proxy_tunnel.rs:381-391 | crates/dbx-drivers/src/db/proxy_tunnel.rs:412-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:106 — crates/dbx-drivers/src/db/rqlite_driver.rs:106-116 | crates/dbx-drivers/src/db/turso_driver.rs:167-177 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 229 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/dbx-mcp/src/server.rs:1647 — crates/dbx-mcp/src/server.rs:1647-1657 | crates/dbx-mcp/src/server.rs:3062-3072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-mcp/src/session.rs:103 — crates/dbx-mcp/src/session.rs:103-113 | crates/dbx-mcp/src/session.rs:123-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-plugin-runtime/src/plugins/installer.rs:950 — crates/dbx-plugin-runtime/src/plugins/installer.rs:950-960 | crates/dbx-plugin-runtime/src/plugins/installer.rs:977-987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-sql-data/src/data_grid_extractors/json.rs:22 — crates/dbx-sql-data/src/data_grid_extractors/json.rs:22-32 | crates/dbx-sql-data/src/data_grid_extractors/json.rs:41-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:636 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:636-646 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:882-892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-types/src/models/connection.rs:1453 — crates/dbx-types/src/models/connection.rs:1453-1463 | crates/dbx-types/src/models/connection.rs:1748-1758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/dbx-web/src/routes/agents.rs:453 — crates/dbx-web/src/routes/agents.rs:453-463 | src-tauri/src/commands/agents.rs:330-340 — before extracting anything, compare `crates/dbx-web/src/routes/agents.rs` and `src-tauri/src/commands/agents.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/dbx-web/src/routes/agents.rs:505 — crates/dbx-web/src/routes/agents.rs:505-515 | src-tauri/src/commands/agents.rs:343-353 — before extracting anything, compare `crates/dbx-web/src/routes/agents.rs` and `src-tauri/src/commands/agents.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 19 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×43
  • TooManyMethods: DbxJdbcPlugin REDACTED:64 — TooManyMethods — 320 methods. The bar is 30 methods; this is 290 over it, 10.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Storage REDACTED:230 — TooManyMethods — 220 methods, declared across 2 files: REDACTED (217), storage/type_execution_receipts.rs (3). The bar is 30 methods; this is 190 over it, 7.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DamengAgent REDACTED:68 — TooManyMethods — 192 methods. The bar is 30 methods; this is 162 over it, 6.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppState REDACTED:444 — TooManyMethods — 179 methods. The bar is 30 methods; this is 149 over it, 5.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OceanBaseOracleAgent agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:66 — TooManyMethods — 163 methods. The bar is 30 methods; this is 133 over it, 5.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MongoAgent REDACTED:102 — TooManyMethods — 156 methods. The bar is 30 methods; this is 126 over it, 5.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: KafkaAgent agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:39 — TooManyMethods — 134 methods. The bar is 30 methods; this is 104 over it, 4.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgentDriverClient crates/dbx-driver-agent/src/agent_driver.rs:1159 — TooManyMethods — 131 methods. The bar is 30 methods; this is 101 over it, 4.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlDebugSession agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:52 — TooManyMethods — 120 methods. The bar is 30 methods; this is 90 over it, 4.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Gbase8sAgent REDACTED:36 — TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AbstractJdbcAgent agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:19 — TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: JdbcExecutor agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:25 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SqlServerLegacyAgent agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:34 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConsulClient crates/dbx-core/src/admin/consul/client.rs:15 — TooManyMethods — 65 methods, declared across 9 files: consul/agent.rs (17), consul/client.rs (16), consul/kv.rs (10), consul/session.rs (8), +5 more file(s). The bar is 30 methods; this is 35 over it, 2.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DbxMcpServer crates/dbx-mcp/src/server.rs:694 — TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NacosOpenApiAdmin crates/dbx-core/src/admin/nacos/http.rs:167 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgentManager crates/dbx-driver-agent/src/agent_manager.rs:881 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlDebugTarget agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:33 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StandardJdbcMetadata agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:16 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PostgresLikeAgent agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:13 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Db2Agent agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:34 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SpannerAgent agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:58 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Parser apps/desktop/src/lib/mongo/mongoSql.ts:129 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConnectParams agents/common/src/main/java/com/dbx/agent/ConnectParams.java:7 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PulsarApiProfile crates/dbx-core/src/admin/mq/adapters/pulsar_version.rs:68 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 18 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×41
  • MethodTooLong: AppState.get_or_create_pool_for_session_inner_with_receipt REDACTED:3456 — MethodTooLong — get_or_create_pool_for_session_inner_with_receipt runs 633 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 533 over it, 6.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebBackend.execute_mongo_command crates/dbx-mcp/src/backend.rs:2181 — MethodTooLong — execute_mongo_command runs 402 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 302 over it, 4.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TypeMappingMatrix.build_rules crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:630 — MethodTooLong — build_rules runs 386 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 286 over it, 3.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DialectCapabilityDescriptor.for_dialect crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:223 — MethodTooLong — for_dialect runs 366 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 266 over it, 3.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JsonRpcServer.dispatch agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:211 — MethodTooLong — dispatch runs 333 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 233 over it, 3.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PluginHostBridge.dispatch REDACTED:648 — MethodTooLong — dispatch runs 316 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.remove_stale_connection_pool REDACTED:5430 — MethodTooLong — remove_stale_connection_pool runs 255 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BackupService.export_job crates/dbx-core/src/scheduled_backup/engine.rs:154 — MethodTooLong — export_job runs 237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbxMcpServer.execute_batch_request crates/dbx-mcp/src/server.rs:1854 — MethodTooLong — execute_batch_request runs 236 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DialectYaml.from_descriptor_with_caps REDACTED:689 — MethodTooLong — from_descriptor_with_caps runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SqlStatementSplitter.push_chunk_with_control crates/dbx-sql-core/src/sql.rs:742 — MethodTooLong — push_chunk_with_control runs 221 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.refresh_connections REDACTED:6936 — MethodTooLong — refresh_connections runs 218 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbxMcpServer.execute_query crates/dbx-mcp/src/server.rs:1518 — MethodTooLong — execute_query runs 212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Storage.inspect_data_migration_with_error_cache REDACTED:1797 — MethodTooLong — inspect_data_migration_with_error_cache runs 208 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlDebugCompositeOutput.helperDeclarations agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:230 — MethodTooLong — helperDeclarations runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PickleUnpickler.dispatch apps/desktop/src/lib/redis/codec/pickle.ts:114 — MethodTooLong — dispatch runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MysqlDumpBinaryLiteralNormalizer.normalize REDACTED:1701 — MethodTooLong — normalize runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentRuntimeClient.call_typed_with_policy crates/dbx-driver-agent/src/agent_driver.rs:232 — MethodTooLong — call_typed_with_policy runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentDriverClient.call_typed_with_timeout_and_cancel crates/dbx-driver-agent/src/agent_driver.rs:2250 — MethodTooLong — call_typed_with_timeout_and_cancel runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Plan.render agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:262 — MethodTooLong — render runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DbxJdbcPlugin.handle REDACTED:844 — MethodTooLong — handle runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.prepare_connection_transport_with_claimant REDACTED:4480 — MethodTooLong — prepare_connection_transport_with_claimant runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PluginPackageInstaller.install_bytes_locked crates/dbx-plugin-runtime/src/plugins/installer.rs:528 — MethodTooLong — install_bytes_locked runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StarRocksAlter.build crates/dbx-sql-schema/src/table_structure_sql/alter_dialect.rs:63 — MethodTooLong — build runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlDebugRegistry.register crates/dbx-core/src/query/pl_debug.rs:594 — MethodTooLong — register runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 16 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×40
  • Untrusted text written into markup unescaped apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1306 — `highlightedGrantsSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1486 — `highlight(oracleVisibleSql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/admin/OracleSecurityDetails.vue:30 — `highlight(directSql || t(incomplete ? 'oracleSecurity.incomplete' : 'oracleSecurity.noGrants'))` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:176 — `snapshotHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/common/ElasticsearchJsonResponsePanel.vue:269 — `highlightedRawResponse` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/common/JsonTree.vue:272 — `highlightedJson(jsonTreeKeyText(node), node, 'key')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/common/JsonTree.vue:283 — `highlightedJson(scalarText(node.value), node, 'value')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/AiAssistant.vue:7117 — `seg.html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/AiAssistant.vue:7166 — `seg.html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/DangerConfirmDialog.vue:159 — `highlightedHead` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/DangerConfirmDialog.vue:163 — `highlightedTail` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/EditorSettingsDialog.vue:12075 — `selectedAiPartnerDescriptionHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/QueryHistory.vue:862 — `highlight(selectedEntry.sql)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/QueryHistory.vue:872 — `highlight(selectedEntry.rollback_sql || '')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/SqlParameterDialog.vue:234 — `highlightedSql` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/SqlPreviewPanel.vue:255 — `highlightedHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/editor/queryEditorHoverContent.ts:75 — `hoverSqlHighlighter(sqlContent,isDark.value?"dark":"light")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/generate/ModelGenerateDialog.vue:227 — `highlightedCode` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/grid/DataGrid.vue:17064 — `highlightedDdlContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/grid/GridSnapshotDialog.vue:156 — `snapshotHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/layout/UpdateDialog.vue:292 — `escapeHtml(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped apps/desktop/src/components/layout/UpdateDialog.vue:373 — `renderedNotes` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/lineage/FieldLineageDialog.vue:419 — `highlight(item.sqlSnippet)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:772 — `markCellHtml(hit, column)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped apps/desktop/src/components/meilisearch/MeilisearchDocumentsPage.vue:816 — `markCellHtml(hit, key)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 15 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: verifyDev scripts/verify-plugin-cli-package.mjs:87 — `verifyDev` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: post scripts/verify-plugin-cli-package.mjs:123 — `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: request docs/scripts/update-contributors.mjs:25 — `request` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchRegistry docs/lib/agentRegistrySource.ts:9 — `fetchRegistry` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: requestDraft docs/components/issues/IssueSubmissionClient.tsx:271 — `requestDraft` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchDailyUniques deploy/plugin-stats-worker/worker.ts:145 — `fetchDailyUniques` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchWindowCounts deploy/plugin-stats-worker/worker.ts:187 — `fetchWindowCounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: writeRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:565 — `writeRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: listRemoteRuntimeCacheMetadata apps/desktop/src/lib/tabs/tabResultCache.ts:609 — `listRemoteRuntimeCacheMetadata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: pruneRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:621 — `pruneRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: deleteRemoteRuntimeCacheOwner apps/desktop/src/lib/tabs/tabResultCache.ts:635 — `deleteRemoteRuntimeCacheOwner` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: readRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:648 — `readRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: deleteRemoteRuntimeCache apps/desktop/src/lib/tabs/tabResultCache.ts:666 — `deleteRemoteRuntimeCache` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: logoutWeb apps/desktop/src/lib/startup/startupAuthentication.ts:23 — `logoutWeb` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: dataUrlToBlob apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:416 — `dataUrlToBlob` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: post apps/desktop/src/lib/backend/http.ts:431 — `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: postQueryWithDiagnostics apps/desktop/src/lib/backend/http.ts:442 — `postQueryWithDiagnostics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: get apps/desktop/src/lib/backend/http.ts:491 — `get` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: del apps/desktop/src/lib/backend/http.ts:497 — `del` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: put apps/desktop/src/lib/backend/http.ts:503 — `put` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: testConnectionWithInfo apps/desktop/src/lib/backend/http.ts:544 — `testConnectionWithInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: installPluginPackage apps/desktop/src/lib/backend/http.ts:765 — `installPluginPackage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: installPluginPackageFromUrl apps/desktop/src/lib/backend/http.ts:782 — `installPluginPackageFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: pluginAssetPayload apps/desktop/src/lib/backend/http.ts:915 — `pluginAssetPayload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: importJdbcDrivers apps/desktop/src/lib/backend/http.ts:940 — `importJdbcDrivers` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • + 14 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_drivers · ×38
  • dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cognitive 66) crates/dbx-drivers/src/db/ssh_tunnel.rs:439 — dbx_drivers::db::ssh_tunnel::connect_and_authenticate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (44 pts), match/switch 6 (14 pts), boolean chains 7, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::normalize_sqlite_sql (cognitive 64) crates/dbx-drivers/src/db/sqlite.rs:2780 — dbx_drivers::db::sqlite::normalize_sqlite_sql has cognitive complexity 64 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 6 (18 pts), boolean chains 9 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::tokenize_entry (cognitive 60) crates/dbx-drivers/src/db/sqlite.rs:2377 — dbx_drivers::db::sqlite::tokenize_entry has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (43 pts), loops 5 (13 pts), boolean chains 4 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::ssh_tunnel::forward_loop (cognitive 54) crates/dbx-drivers/src/db/ssh_tunnel.rs:1386 — dbx_drivers::db::ssh_tunnel::forward_loop has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (33 pts), match/switch 8 (20 pts), loops 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns (cognitive 48) crates/dbx-drivers/src/db/sqlite.rs:1963 — dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (38 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql (cognitive 45) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:9 — dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql has cognitive complexity 45 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 6 (18 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::strip_sql_comments (cognitive 42) crates/dbx-drivers/src/db/sqlite.rs:2119 — dbx_drivers::db::sqlite::strip_sql_comments has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (13 pts), boolean chains 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::couchdb_driver::get_columns (cognitive 37) crates/dbx-drivers/src/db/couchdb_driver.rs:151 — dbx_drivers::db::couchdb_driver::get_columns has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (10 pts), match/switch 2 (9 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_drivers::db::couchdb_driver::couchdb_docs_to_table (cognitive 36) crates/dbx-drivers/src/db/couchdb_driver.rs:533 — dbx_drivers::db::couchdb_driver::couchdb_docs_to_table has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), match/switch 3 (8 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::solr_driver::solr_docs_to_table (cognitive 36) crates/dbx-drivers/src/db/solr_driver.rs:910 — dbx_drivers::db::solr_driver::solr_docs_to_table has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), match/switch 3 (8 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::extract_create_table_body (cognitive 36) crates/dbx-drivers/src/db/sqlite.rs:2050 — dbx_drivers::db::sqlite::extract_create_table_body has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 4 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::parse_column_definition (cognitive 36) crates/dbx-drivers/src/db/sqlite.rs:2244 — dbx_drivers::db::sqlite::parse_column_definition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_drivers::db::duckdb_sql::split_sql_statements (cognitive 33) crates/dbx-drivers/src/db/duckdb_sql.rs:11 — dbx_drivers::db::duckdb_sql::split_sql_statements has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 9, loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::dynamodb_driver::json_to_attribute_value (cognitive 33) crates/dbx-drivers/src/db/dynamodb_driver.rs:1365 — dbx_drivers::db::dynamodb_driver::json_to_attribute_value has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (32 pts), match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_drivers::db::sqlite::split_table_body_entries (cognitive 32) crates/dbx-drivers/src/db/sqlite.rs:2181 — dbx_drivers::db::sqlite::split_table_body_entries has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::proxy_tunnel::test_proxy_endpoint (cognitive 29) crates/dbx-drivers/src/db/proxy_tunnel.rs:518 — dbx_drivers::db::proxy_tunnel::test_proxy_endpoint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_drivers::db::salesforce_driver::apply_fields_function_limit (cognitive 27) REDACTED:895 — dbx_drivers::db::salesforce_driver::apply_fields_function_limit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 7, loops 2 (nesting depth added 10). Of this number, 19 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement (cognitive 26) crates/dbx-drivers/src/db/dynamodb_driver.rs:396 — dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::solr_driver::translate_field_operator_filter (cognitive 24) crates/dbx-drivers/src/db/solr_driver.rs:426 — dbx_drivers::db::solr_driver::translate_field_operator_filter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (9 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::solr_driver::translate_solr_document_filter_value (cognitive 23) crates/dbx-drivers/src/db/solr_driver.rs:519 — dbx_drivers::db::solr_driver::translate_solr_document_filter_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::sqlite::sqlite_unistr_text (cognitive 23) crates/dbx-drivers/src/db/sqlite.rs:416 — dbx_drivers::db::sqlite::sqlite_unistr_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv (cognitive 23) crates/dbx-drivers/src/db/ssh_proxy_command.rs:55 — dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::cloudflare_d1::sql_lexer::complete_sql_statements (cognitive 22) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:92 — dbx_drivers::db::cloudflare_d1::sql_lexer::complete_sql_statements has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal (cognitive 22) crates/dbx-drivers/src/db/transport_layer_tunnel.rs:263 — dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, match/switch 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_drivers::salesforce_oauth::wait_for_callback (cognitive 21) crates/dbx-drivers/src/salesforce_oauth.rs:309 — dbx_drivers::salesforce_oauth::wait_for_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 13 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×38
  • Duplicated block (12 lines × 2) crates/dbx-cli/src/main.rs:484 — crates/dbx-cli/src/main.rs:484-495 | crates/dbx-cli/src/main.rs:524-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:582 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:582-593 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:838-849 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) REDACTED:3857 — REDACTED:3857-3868 | src-tauri/src/commands/connection.rs:2506-2517 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) REDACTED:1167 — REDACTED:1167-1178 | REDACTED:3529-3540 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) REDACTED:2188 — REDACTED:2188-2199 | REDACTED:2388-2399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:327 — REDACTED:327-338 | REDACTED:3050-3061 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-core/src/data/transfer.rs:10296 — crates/dbx-core/src/data/transfer.rs:10296-10307 | crates/dbx-core/src/data/transfer.rs:10400-10411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:903 — REDACTED:903-914 | REDACTED:965-976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:4678 — REDACTED:4678-4689 | REDACTED:4786-4797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:6448 — REDACTED:6448-6459 | REDACTED:6517-6528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:2100 — REDACTED:2100-2111 | REDACTED:2120-2131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-core/src/schema/mod.rs:1689 — crates/dbx-core/src/schema/mod.rs:1689-1700 | crates/dbx-core/src/schema/mod.rs:1763-1774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-driver-agent/src/agent_service.rs:2712 — crates/dbx-driver-agent/src/agent_service.rs:2712-2723 | crates/dbx-driver-agent/src/driver_delta.rs:140-151 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) crates/dbx-driver-elasticsearch/src/lib.rs:1780 — crates/dbx-driver-elasticsearch/src/lib.rs:1780-1791 | crates/dbx-drivers/src/db/solr_driver.rs:445-456 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:64 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:64-75 | crates/dbx-drivers/src/salesforce_oauth.rs:143-154 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:2210 — crates/dbx-driver-mysql/src/mysql.rs:2210-2221 | REDACTED:3574-3585 — before extracting anything, compare `crates/dbx-driver-mysql/src/mysql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:5580 — crates/dbx-driver-mysql/src/mysql.rs:5580-5591 | crates/dbx-driver-mysql/src/mysql.rs:5888-5899 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6262 — crates/dbx-driver-mysql/src/mysql.rs:6262-6273 | crates/dbx-driver-mysql/src/mysql.rs:6310-6321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:2663 — REDACTED:2663-2674 | REDACTED:2695-2706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:9269 — REDACTED:9269-9280 | REDACTED:9322-9333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:585 — crates/dbx-drivers/src/db/couchdb_driver.rs:585-596 | crates/dbx-drivers/src/db/solr_driver.rs:962-973 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/dbx-drivers/src/db/dynamodb_driver.rs:766 — crates/dbx-drivers/src/db/dynamodb_driver.rs:766-777 | crates/dbx-drivers/src/db/dynamodb_driver.rs:826-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:142 — crates/dbx-drivers/src/db/rqlite_driver.rs:142-153 | crates/dbx-drivers/src/db/turso_driver.rs:203-214 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 229 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1260 — crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1260-1271 | crates/dbx-sql-core/src/object_source_sql/oracle_indexes.rs:1631-1642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:198 — crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:198-209 | crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:796-807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 13 more in this group — see findings.md.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×36
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:307 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:347 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:363 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengRoleAdmin.vue:317 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengRoleAdmin.vue:371 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengRoleAdmin.vue:533 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengUserAdmin.vue:480 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengUserAdmin.vue:567 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DamengUserAdmin.vue:789 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:782 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:921 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:985 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:1063 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseJobAdmin.vue:1111 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1203 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1232 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1301 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1342 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1438 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/MySqlDashboard.vue:205 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/PostgresDashboard.vue:226 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:733 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:746 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:763 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/desktop/src/components/admin/ProcessListPanel.vue:900 — <loader2> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×36
  • Duplicated block (5 lines × 3) agents/drivers/duckdb/src/sql.rs:42 — agents/drivers/duckdb/src/sql.rs:42-46 | crates/dbx-drivers/src/db/duckdb_sql.rs:54-58 | crates/dbx-sql-core/src/sql.rs:1949-1953 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) agents/drivers/duckdb/src/sql.rs:239 — agents/drivers/duckdb/src/sql.rs:239-243 | agents/drivers/duckdb/src/sql.rs:361-365 | crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:23-27 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:71 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:71-75 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:148-152 | crates/dbx-ai-provider/src/ai_grok_cli.rs:118-122 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:231 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:231-236 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:312-316 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:204-208 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_cli_agent.rs:463 — crates/dbx-ai-provider/src/ai_cli_agent.rs:463-467 | crates/dbx-ai-provider/src/ai_cli_agent.rs:641-645 | crates/dbx-ai-provider/src/ai_cli_agent.rs:984-988 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361 — crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:361-365 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:766-770 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:247-251 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` and `crates/dbx-ai-provider/src/ai_qoder_cli.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) REDACTED:1126 — REDACTED:1126-1130 | REDACTED:1145-1149 | crates/dbx-core/src/data/transfer.rs:4354-4358 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/persistence/secret_codec.rs:243 — crates/dbx-core/src/persistence/secret_codec.rs:243-247 | crates/dbx-core/src/persistence/secret_codec.rs:504-508 | crates/dbx-core/src/persistence/secret_codec.rs:518-522 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/schema/mod.rs:9851 — crates/dbx-core/src/schema/mod.rs:9851-9855 | crates/dbx-core/src/schema/mod.rs:9976-9980 | crates/dbx-core/src/schema/mod.rs:9995-9999 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:2126 — crates/dbx-driver-elasticsearch/src/lib.rs:2126-2131 | crates/dbx-drivers/src/db/couchdb_driver.rs:509-513 | crates/dbx-drivers/src/db/solr_driver.rs:873-877 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:2133 — crates/dbx-driver-elasticsearch/src/lib.rs:2133-2137 | crates/dbx-drivers/src/db/couchdb_driver.rs:515-519 | crates/dbx-drivers/src/db/solr_driver.rs:879-883 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:1322 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1322-1326 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1452-1456 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1560-1564 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2634 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2634-2638 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2679-2683 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2699-2703 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2741 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2741-2745 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2778-2782 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2801-2805 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:394 — crates/dbx-driver-mongodb/src/mongo_shell.rs:394-398 | crates/dbx-web/src/routes/mcp_policy.rs:76-80 | src-tauri/src/commands/mcp_bridge.rs:1465-1469 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:2843 — crates/dbx-driver-mysql/src/mysql.rs:2843-2847 | crates/dbx-driver-mysql/src/mysql.rs:2881-2885 | crates/dbx-driver-mysql/src/mysql.rs:3026-3030 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:4673 — crates/dbx-driver-mysql/src/mysql.rs:4673-4677 | crates/dbx-driver-mysql/src/oceanbase_mysql.rs:93-97 | crates/dbx-driver-mysql/src/starrocks.rs:140-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (5 lines × 3) REDACTED:569 — REDACTED:569-573 | crates/dbx-drivers/src/db/rqlite_driver.rs:418-422 | crates/dbx-drivers/src/db/turso_driver.rs:661-665 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-sql-core/src/query_execution_sql.rs:612 — crates/dbx-sql-core/src/query_execution_sql.rs:612-616 | crates/dbx-sql-core/src/query_execution_sql.rs:658-662 | crates/dbx-sql-core/src/query_execution_sql.rs:716-720 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/dbx-web/src/routes/query_result_export.rs:66 — crates/dbx-web/src/routes/query_result_export.rs:66-70 | crates/dbx-web/src/routes/sql_file.rs:368-372 | crates/dbx-web/src/routes/table_export.rs:67-71 — before extracting anything, compare `crates/dbx-web/src/routes/query_result_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-core/src/connection/connection_secrets.rs:901 — crates/dbx-core/src/connection/connection_secrets.rs:901-905 | crates/dbx-core/src/persistence/cloud_sync.rs:2839-2843 | REDACTED:10010-10014 — before extracting anything, compare `crates/dbx-core/src/connection/connection_secrets.rs` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) REDACTED:206 — REDACTED:206-210 | REDACTED:1105-1109 | REDACTED:170-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:537 — crates/dbx-driver-mongodb/src/mongo_shell.rs:537-541 | crates/dbx-web/src/routes/mcp_policy.rs:219-223 | src-tauri/src/commands/mcp_bridge.rs:1608-1612 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:543 — crates/dbx-driver-mongodb/src/mongo_shell.rs:543-547 | crates/dbx-web/src/routes/mcp_policy.rs:225-229 | src-tauri/src/commands/mcp_bridge.rs:1614-1618 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/dbx-ai-provider/src/ai_cursor_cli.rs:105 — crates/dbx-ai-provider/src/ai_cursor_cli.rs:105-110 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:156-161 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:229-233 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_cursor_cli.rs` and `crates/dbx-ai-provider/src/ai_opencode_cli.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • + 11 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×32
  • No test reaches this file deploy/plugin-stats-worker/worker.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/App.vue:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/sync-connection-types.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/build-knowledge-base.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/ai-html-runtime-canary.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/windows-installer.integration.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file agents/scripts/build_offline_jdbc_payload.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/run-check.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/check-mq-integration.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/generate-doris-functions.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/dev-backend.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/debug/plDebugWatch.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/plugin-cli/scripts/stage-sdk.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/viteConnectionTypesPlugin.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/types/pluginAiTools.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/PluginIcon.vue:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/dev-host/ui/DebugPanel.vue:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/sdk/cli/templates/svelte/src/App.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/plugin-cli/scripts/stage-dev.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/diagram/diagramZoom.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/desktop/src/lib/app/pinnedTreeNodeIds.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 7 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×32
  • Swallowed exception (empty catch) scripts/verify-plugin-cli-package.mjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/runtime.mjs:32 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/runtime.mjs:74 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/server.mjs:121 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/server.mjs:723 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) plugins/sdk/dev-host/ui/App.vue:344 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1947 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2071 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2075 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2262 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:2292 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) deploy/plugin-stats-worker/worker.ts:340 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/main.ts:110 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/main.ts:121 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:693 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:697 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:943 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:970 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:1022 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:1046 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3080 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3103 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3139 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3186 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/desktop/src/App.vue:3215 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 7 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx_sql_data · ×31
  • dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote (cognitive 81) REDACTED:2776 — dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote has cognitive complexity 81 (threshold 15). Drivers by points: if/else 48 (71 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::build_data_grid_save_statements (cognitive 66) REDACTED:1759 — dbx_sql_data::data_grid_sql::build_data_grid_save_statements has cognitive complexity 66 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 8, loops 4 (7 pts), match/switch 1 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements (cognitive 50) REDACTED:2016 — dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (44 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::build_sorted_query_sql (cognitive 49) crates/dbx-sql-data/src/query_result_sql.rs:494 — dbx_sql_data::query_result_sql::build_sorted_query_sql has cognitive complexity 49 (threshold 15). Drivers by points: if/else 29 (37 pts), boolean chains 9, match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements (cognitive 48) crates/dbx-sql-data/src/data_grid_salesforce_sql.rs:15 — dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::build_query_pagination_execution_plan (cognitive 48) crates/dbx-sql-data/src/query_result_sql.rs:143 — dbx_sql_data::query_result_sql::build_query_pagination_execution_plan has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 12, match/switch 4 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::top_level_sql_tokens (cognitive 45) crates/dbx-sql-data/src/query_result_sql.rs:2744 — dbx_sql_data::query_result_sql::top_level_sql_tokens has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (13 pts), boolean chains 7 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::oceanbase_blob_literals (cognitive 33) REDACTED:4154 — dbx_sql_data::data_grid_sql::oceanbase_blob_literals has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_sql_data::data_grid_sql::validate_data_grid_save (cognitive 31) REDACTED:1379 — dbx_sql_data::data_grid_sql::validate_data_grid_save has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_sql_data::data_grid_extractors::copy_formats::write_dbunit (cognitive 29) crates/dbx-sql-data/src/data_grid_extractors/copy_formats.rs:10 — dbx_sql_data::data_grid_extractors::copy_formats::write_dbunit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection (cognitive 29) crates/dbx-sql-data/src/query_result_sql.rs:1277 — dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_extractors::copy_formats::write_php (cognitive 26) crates/dbx-sql-data/src/data_grid_extractors/copy_formats.rs:79 — dbx_sql_data::data_grid_extractors::copy_formats::write_php has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_tdengine_sql::build_tdengine_data_grid_save_statements (cognitive 25) crates/dbx-sql-data/src/data_grid_tdengine_sql.rs:6 — dbx_sql_data::data_grid_tdengine_sql::build_tdengine_data_grid_save_statements has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters (cognitive 24) REDACTED:612 — dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 8, match/switch 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::query_result_sql::iotdb_tree_count_sql (cognitive 24) crates/dbx-sql-data/src/query_result_sql.rs:1499 — dbx_sql_data::query_result_sql::iotdb_tree_count_sql has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 6 (9 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::data_grid_sql::format_grid_assignment_sql_literal (cognitive 23) REDACTED:2676 — dbx_sql_data::data_grid_sql::format_grid_assignment_sql_literal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_extractors::sql::write_sql_deletes_inserts (cognitive 22) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:213 — dbx_sql_data::data_grid_extractors::sql::write_sql_deletes_inserts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::data_grid_iotdb_sql::build_iotdb_data_grid_rollback_statements (cognitive 21) crates/dbx-sql-data/src/data_grid_iotdb_sql.rs:42 — dbx_sql_data::data_grid_iotdb_sql::build_iotdb_data_grid_rollback_statements has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::build_count_query_sql (cognitive 21) crates/dbx-sql-data/src/query_result_sql.rs:404 — dbx_sql_data::query_result_sql::build_count_query_sql has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_data::query_result_sql::line_has_open_line_comment (cognitive 21) crates/dbx-sql-data/src/query_result_sql.rs:2558 — dbx_sql_data::query_result_sql::line_has_open_line_comment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_sql::last_qualified_identifier_component (cognitive 20) REDACTED:2509 — dbx_sql_data::data_grid_sql::last_qualified_identifier_component has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_extractors::delimited::write_dsv (cognitive 18) crates/dbx-sql-data/src/data_grid_extractors/delimited.rs:19 — dbx_sql_data::data_grid_extractors::delimited::write_dsv has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::leading_execution_hint_prefix (cognitive 18) crates/dbx-sql-data/src/query_result_sql.rs:1185 — dbx_sql_data::query_result_sql::leading_execution_hint_prefix has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::query_result_sql::skip_leading_sql_comments (cognitive 17) crates/dbx-sql-data/src/query_result_sql.rs:1127 — dbx_sql_data::query_result_sql::skip_leading_sql_comments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_data::data_grid_extractors::sql::sql_selected_data (cognitive 16) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:488 — dbx_sql_data::data_grid_extractors::sql::sql_selected_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 6 more in this group — see findings.md.
D31 · IaC & Container Security · Medium IaC · ×27
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×27
  • Duplicated block (13 lines × 2) agents/drivers/duckdb/src/sql.rs:207 — agents/drivers/duckdb/src/sql.rs:207-219 | agents/drivers/duckdb/src/sql.rs:332-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262-274 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:336-348 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:370 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:370-382 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:481-493 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) REDACTED:4489 — REDACTED:4489-4501 | REDACTED:4507-4519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) REDACTED:7964 — REDACTED:7964-7976 | REDACTED:8451-8463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/data/transfer.rs:5741 — crates/dbx-core/src/data/transfer.rs:5741-5753 | crates/dbx-core/src/data/transfer.rs:5792-5804 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) REDACTED:1024 — REDACTED:1024-1036 | REDACTED:1052-1064 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:1071 — crates/dbx-core/src/schema/mod.rs:1071-1083 | crates/dbx-core/src/schema/mod.rs:1095-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:8638 — crates/dbx-core/src/schema/mod.rs:8638-8650 | crates/dbx-core/src/schema/mod.rs:8674-8686 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:9022 — crates/dbx-core/src/schema/mod.rs:9022-9034 | crates/dbx-core/src/schema/normalization.rs:127-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/dbx-driver-support/src/ddl_scan.rs:74 — crates/dbx-driver-support/src/ddl_scan.rs:74-86 | crates/dbx-driver-support/src/ddl_scan.rs:111-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:250 — crates/dbx-drivers/src/db/rqlite_driver.rs:250-262 | crates/dbx-drivers/src/db/turso_driver.rs:311-323 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 229 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:1023 — crates/dbx-drivers/src/db/ssh_tunnel.rs:1023-1035 | crates/dbx-drivers/src/db/ssh_tunnel.rs:1038-1050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-mcp/src/server.rs:2709 — crates/dbx-mcp/src/server.rs:2709-2721 | crates/dbx-mcp/src/server.rs:3005-3017 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-sql-data/src/data_grid_extractors/sql.rs:103 — crates/dbx-sql-data/src/data_grid_extractors/sql.rs:103-115 | crates/dbx-sql-data/src/data_grid_extractors/sql.rs:296-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:27 — crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:27-39 | crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:104-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:331 — crates/dbx-sql-schema/src/table_structure_sql/column_format.rs:331-343 | crates/dbx-sql-schema/src/table_structure_sql/columns.rs:701-713 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/dbx-web/src/routes/etcd.rs:401 — crates/dbx-web/src/routes/etcd.rs:401-413 | src-tauri/src/commands/etcd_cmd.rs:266-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) crates/dbx-web/src/routes/etcd.rs:443 — crates/dbx-web/src/routes/etcd.rs:443-455 | src-tauri/src/commands/etcd_cmd.rs:299-311 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) src-tauri/src/commands/connection.rs:1983 — src-tauri/src/commands/connection.rs:1983-1995 | src-tauri/src/commands/connection.rs:2549-2561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src-tauri/src/commands/mcp_bridge.rs:1685 — src-tauri/src/commands/mcp_bridge.rs:1685-1697 | src-tauri/src/commands/mcp_bridge.rs:1837-1849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src-tauri/src/commands/mcp_bridge.rs:1929 — src-tauri/src/commands/mcp_bridge.rs:1929-1941 | src-tauri/src/commands/mcp_bridge.rs:2171-2183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src-tauri/src/commands/mongodb_dump.rs:47 — src-tauri/src/commands/mongodb_dump.rs:47-59 | src-tauri/src/commands/mongodb_dump.rs:78-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/dbx-core/src/schema/mod.rs:2858 — crates/dbx-core/src/schema/mod.rs:2858-2870 | crates/dbx-core/src/schema/providers/native.rs:333-345 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) REDACTED:4167 — REDACTED:4167-4179 | REDACTED:4229-4241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 2 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×26
  • Change coupling: tests.rs ↔ triggers.rs crates/dbx-sql-schema/src/table_structure_sql/tests.rs:1 — `crates/dbx-sql-schema/src/table_structure_sql/tests.rs` and `crates/dbx-sql-schema/src/table_structure_sql/triggers.rs` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `9d38961a` fix(dameng): load and edit triggers in table structure; `e18c6001` fix(oracle): add trigger operations in structure edit; `5a74925d` fix(oracle): extract trigger body from driver source when cloning (at that commit the files were still `crates/dbx-sql/src/table_structure_sql/tests.rs` and `crates/dbx-sql/src/table_structure_sql/triggers.rs`) — run `git show` on any of them.
  • Change coupling: columns.rs ↔ tests.rs crates/dbx-sql-schema/src/table_structure_sql/columns.rs:1 — `crates/dbx-sql-schema/src/table_structure_sql/columns.rs` and `crates/dbx-sql-schema/src/table_structure_sql/tests.rs` change together 85% of the time (22 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are `95d3e800` fix(hana): expose table rename and column comments; `fd3be84b` feat(hana): enable table rename and structure editing; `05a57cbf` fix(sqlserver): drop default constraint before dropping a column — run `git show` on any of them.
  • Change coupling: App.vue ↔ external_sql.rs apps/desktop/src/App.vue:1 — `apps/desktop/src/App.vue` and `src-tauri/src/commands/external_sql.rs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `9b6f3c48` fix(sql-file): open and save custom-filtered text files; `89a35d6e` fix(editor): protect external SQL files from conflicting changes; `f5c25510` fix(sql): prevent oversized SQL editor loads — run `git show` on any of them.
  • Change coupling: explainPlan.ts ↔ query_execution_sql.rs apps/desktop/src/lib/diagram/explainPlan.ts:1 — `apps/desktop/src/lib/diagram/explainPlan.ts` and `crates/dbx-sql-core/src/query_execution_sql.rs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `3c4075a8` feat(opengauss): support the explain button with plain-text EXPLAIN; `32789b1d` feat(xugu): support visual estimated execution plans; `06fc0df2` feat(oceanbase-oracle): support graphical execution plans (at that commit the file was still `crates/dbx-sql/src/query_execution_sql.rs`) — run `git show` on any of them.
  • Change coupling: tauri.ts ↔ main.rs apps/desktop/src/lib/backend/tauri.ts:1 — `apps/desktop/src/lib/backend/tauri.ts` and `crates/dbx-web/src/main.rs` change together 73% of the time (115 of the 158 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 115 shared commits counted here, the most recent 3 are `c7c266c3` perf(search): batch column fetch and multi-table probe; `e7973404` feat(web): keep saved connection credentials on the server; `8b30a42b` feat(transfer): persist task run history — run `git show` on any of them.
  • Change coupling: layout.tsx ↔ LandingFooter.tsx docs/app/[lang]/layout.tsx:1 — `docs/app/[lang]/layout.tsx` and `docs/components/landing/LandingFooter.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a3038e25` docs: raise advertised database count from 90+ to 100+; `d766228b` feat(site): polish dark theme, typography, and docs nav; `28c0977a` docs: bump app size claim to 25 MB — run `git show` on any of them.
  • Change coupling: RedisKeyBrowser.vue ↔ redis_cmd.rs apps/desktop/src/components/redis/RedisKeyBrowser.vue:1 — `apps/desktop/src/components/redis/RedisKeyBrowser.vue` and `src-tauri/src/commands/redis_cmd.rs` change together 60% of the time (15 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `168f2a47` feat(redis): support renaming keys; `31f0b7d6` feat(redis): add stream consumer group monitoring; `ba81fa44` feat(redis): support multiple value formats in viewer (#2766) — run `git show` on any of them.
  • Change coupling: LandingFooter.tsx ↔ metadata.ts docs/components/landing/LandingFooter.tsx:1 — `docs/components/landing/LandingFooter.tsx` and `docs/lib/metadata.ts` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a3038e25` docs: raise advertised database count from 90+ to 100+; `28c0977a` docs: bump app size claim to 25 MB; `d53c855b` feat(docs): update database coverage to 90+ — run `git show` on any of them.
  • Change coupling: DocumentBrowser.vue ↔ document_cmd.rs apps/desktop/src/components/document/DocumentBrowser.vue:1 — `apps/desktop/src/components/document/DocumentBrowser.vue` and `src-tauri/src/commands/document_cmd.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a5ce8510` feat(mongo): preserve BSON types when cloning and saving documents; `c9764be9` fix(mongodb): support collation for find queries; `78a61334` fix(elasticsearch): preserve legacy type on delete — run `git show` on any of them.
  • Change coupling: DriverStoreDialog.vue ↔ agents.rs apps/desktop/src/components/config/DriverStoreDialog.vue:1 — `apps/desktop/src/components/config/DriverStoreDialog.vue` and `crates/dbx-web/src/routes/agents.rs` change together 59% of the time (13 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `da95bd43` fix(updates): auto-continue client upgrade on update-all; `c712be3e` feat(agent): support cancelling installs and upgrades; `8737114d` fix(jdbc): include managed drivers in offline bundles — run `git show` on any of them.
  • Change coupling: queryStore.ts ↔ mongo_cmd.rs apps/desktop/src/stores/queryStore.ts:1 — `apps/desktop/src/stores/queryStore.ts` and `src-tauri/src/commands/mongo_cmd.rs` change together 59% of the time (20 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `3e9974b2` perf(mongodb): skip total count for explicit limit queries; `a78fc48a` feat(mongodb): support find explain in the SQL editor; `f78dc1ba` feat(mongodb): support bulkWrite — run `git show` on any of them.
  • Change coupling: QueryEditor.vue ↔ diagnostics.ts apps/desktop/src/components/editor/QueryEditor.vue:1 — `apps/desktop/src/components/editor/QueryEditor.vue` and `apps/desktop/src/lib/sql/semantic/diagnostics.ts` change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `79d6ab64` fix(sqlserver): diagnose DECLARE without data type in routine bodies; `deb47df2` feat(opengauss): support A-compatibility packages; `c8c7a40e` fix(editor): smooth SQL editor state synchronization — run `git show` on any of them.
  • Change coupling: sidebarTreeItemLayout.ts ↔ connectionStore.ts apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts:1 — `apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts` and `apps/desktop/src/stores/connectionStore.ts` change together 58% of the time (19 of the 33 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `b8f39f9c` feat(oracle): add dblink completion, tree view and management; `ec4f8582` feat(dameng): add user and role administration; `6ea009a5` fix(connection): refresh and display connection notes — run `git show` on any of them.
  • Change coupling: ContentArea.vue ↔ tabResultCache.ts apps/desktop/src/components/layout/ContentArea.vue:1 — `apps/desktop/src/components/layout/ContentArea.vue` and `apps/desktop/src/lib/tabs/tabResultCache.ts` change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `741b10b4` fix(grid): speed up join header comments and show type lengths; `66007187` feat(neo4j): expand node query properties into result columns; `237064f9` fix(grid): budget large-value previews by segment and show executed SQL — run `git show` on any of them.
  • Change coupling: DataGrid.vue ↔ tabResultCache.ts apps/desktop/src/components/grid/DataGrid.vue:1 — `apps/desktop/src/components/grid/DataGrid.vue` and `apps/desktop/src/lib/tabs/tabResultCache.ts` change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `a10bd55a` fix(mysql): disable next page via read only probe; `741b10b4` fix(grid): speed up join header comments and show type lengths; `66007187` feat(neo4j): expand node query properties into result columns — run `git show` on any of them.
  • Change coupling: useDataGridExport.ts ↔ useSidebarTreeExportRuntime.ts apps/desktop/src/composables/useDataGridExport.ts:1 — `apps/desktop/src/composables/useDataGridExport.ts` and `apps/desktop/src/composables/useSidebarTreeExportRuntime.ts` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `0fce8f44` feat(export): reveal exported file from completion toast; `87546f8e` fix(export): honor database name setting in table SQL export; `ce5217bd` fix(csv): stop wrapping exported dates in equals-prefixed formulas — run `git show` on any of them.
  • Change coupling: connection_secrets.rs ↔ REDACTED crates/dbx-core/src/connection/connection_secrets.rs:1 — `crates/dbx-core/src/connection/connection_secrets.rs` and `REDACTED` change together 57% of the time (17 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `2929b1c0` feat(hive): add Kerberos connection options (at that commit the files were still `crates/dbx-core/src/connection_secrets.rs` and `crates/dbx-core/src/query.rs`); `d815a16b` feat(redis): move scan page size to connections (at that commit the files were still `crates/dbx-core/src/connection_secrets.rs` and `crates/dbx-core/src/query.rs`); `40c93b9d` feat(connection): add visible schema filtering (at that commit the files were still `crates/dbx-core/src/connection_secrets.rs` and `crates/dbx-core/src/query.rs`) — run `git show` on any of them.
  • Change coupling: connectionPresentation.ts ↔ REDACTED apps/desktop/src/lib/connection/connectionPresentation.ts:1 — `apps/desktop/src/lib/connection/connectionPresentation.ts` and `REDACTED` change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `264f5c48` feat(influxdb3): add influxdb 3 engine over http (at that commit the file was still `crates/dbx-core/src/connection.rs`); `50e6476c` fix(meilisearch): preserve proxy paths and secure REST requests (at that commit the file was still `crates/dbx-core/src/connection.rs`); `336fbe09` feat(gaussdb): support multi-host connections (at that commit the file was still `crates/dbx-core/src/connection.rs`) — run `git show` on any of them.
  • Change coupling: RedisKeyBrowser.vue ↔ redis.rs apps/desktop/src/components/redis/RedisKeyBrowser.vue:1 — `apps/desktop/src/components/redis/RedisKeyBrowser.vue` and `crates/dbx-web/src/routes/redis.rs` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `168f2a47` feat(redis): support renaming keys; `31f0b7d6` feat(redis): add stream consumer group monitoring; `fc9f97b6` fix(redis): speed up large key scans — run `git show` on any of them.
  • Change coupling: ContentArea.vue ↔ openTabsPersistence.ts apps/desktop/src/components/layout/ContentArea.vue:1 — `apps/desktop/src/components/layout/ContentArea.vue` and `apps/desktop/src/lib/app/openTabsPersistence.ts` change together 51% of the time (19 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `20c5136a` feat(query): 查询结果显示来源连接颜色 (#10823); `9c23e319` feat(redis): add command-line query result mode; `760d2c64` fix(source): open pending tab while loading object source — run `git show` on any of them.
  • Change coupling: App.vue ↔ openTabsPersistence.ts apps/desktop/src/App.vue:1 — `apps/desktop/src/App.vue` and `apps/desktop/src/lib/app/openTabsPersistence.ts` change together 51% of the time (19 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `760d2c64` fix(source): open pending tab while loading object source; `5fb66771` feat(editor): 持久化SQL编辑器光标位置; `14834549` fix(desktop): unify grouped tab bar portal across special pages — run `git show` on any of them.
  • Change coupling: TreeItem.vue ↔ objectSourceEditor.ts apps/desktop/src/components/sidebar/TreeItem.vue:1 — `apps/desktop/src/components/sidebar/TreeItem.vue` and `apps/desktop/src/lib/table/objectSourceEditor.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `668919a7` fix(gbase8s): make view source saves safer; `f16454a4` fix(app): preserve object source formatting (at that commit the file was still `apps/desktop/src/lib/objectSourceEditor.ts`); `da00405e` fix(db): support routine rename editing (at that commit the file was still `apps/desktop/src/lib/objectSourceEditor.ts`) — run `git show` on any of them.
  • Change coupling: ConnectionTree.vue ↔ LightDropdown.vue apps/desktop/src/components/sidebar/ConnectionTree.vue:1 — `apps/desktop/src/components/sidebar/ConnectionTree.vue` and `apps/desktop/src/components/ui/LightDropdown.vue` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `99c3bd0f` feat(ui): animate sidebar and toolbar interaction feedback; `589fbd9d` feat(ui): streamline sidebar and settings layout; `9d603b61` Refine overflow navigation review feedback — run `git show` on any of them.
  • Change coupling: TableStructureEditor.vue ↔ triggers.rs apps/desktop/src/components/structure/TableStructureEditor.vue:1 — `apps/desktop/src/components/structure/TableStructureEditor.vue` and `crates/dbx-sql-schema/src/table_structure_sql/triggers.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `e18c6001` fix(oracle): add trigger operations in structure edit; `d96da5de` fix(sqlserver): edit triggers with events and disabled state (at that commit the file was still `crates/dbx-core/src/table_structure_sql/triggers.rs`); `fdaef625` feat(oracle): support safe trigger structure editing (at that commit the file was still `crates/dbx-core/src/table_structure_sql/triggers.rs`) — run `git show` on any of them.
  • Change coupling: QueryEditor.vue ↔ tokens.ts apps/desktop/src/components/editor/QueryEditor.vue:1 — `apps/desktop/src/components/editor/QueryEditor.vue` and `apps/desktop/src/lib/sql/semantic/tokens.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5c75c239` feat(editor): select SQL string content on double click; `41ffc969` fix(editor): bound SQL completion to active statement; `d24cd987` fix(completion): isolate aliases across SQL statements — run `git show` on any of them.
  • + 1 more in this group — see findings.md.
D2 · Cognitive Complexity · dbx · ×24
  • dbx::run (cognitive 106) src-tauri/src/lib.rs:1801 — dbx::run has cognitive complexity 106 (threshold 15). Drivers by points: if/else 54 (97 pts), match/switch 4 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::connection::test_connection_with_info_impl (cognitive 95) src-tauri/src/commands/connection.rs:1567 — dbx::commands::connection::test_connection_with_info_impl has cognitive complexity 95 (threshold 15). Drivers by points: match/switch 19 (51 pts), if/else 21 (37 pts), boolean chains 7 (nesting depth added 48). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx::commands::connection::connect_db_inner (cognitive 56) src-tauri/src/commands/connection.rs:2229 — dbx::commands::connection::connect_db_inner has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (39 pts), match/switch 5 (12 pts), boolean chains 5 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::global_search::search_root (cognitive 35) src-tauri/src/commands/global_search.rs:150 — dbx::commands::global_search::search_root has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 5 (9 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::start (cognitive 35) src-tauri/src/commands/mcp_bridge.rs:311 — dbx::commands::mcp_bridge::start has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27 (29 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx::commands::list_sql_files::scan_sql_files_with_diagnostics (cognitive 33) src-tauri/src/commands/list_sql_files.rs:239 — dbx::commands::list_sql_files::scan_sql_files_with_diagnostics has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::handle_sql_approval (cognitive 27) src-tauri/src/commands/mcp_bridge.rs:1683 — dbx::commands::mcp_bridge::handle_sql_approval has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 7 (8 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx::commands::plugin_file::drop::open_dropped_plugin_files (cognitive 25) src-tauri/src/commands/plugin_file/drop.rs:31 — dbx::commands::plugin_file::drop::open_dropped_plugin_files has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::connection::sync_connection_configs (cognitive 20) src-tauri/src/commands/connection.rs:1323 — dbx::commands::connection::sync_connection_configs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::saved_sql::sync_saved_sql_directory_blocking (cognitive 20) src-tauri/src/commands/saved_sql.rs:143 — dbx::commands::saved_sql::sync_saved_sql_directory_blocking has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::redis_pubsub_server::handle_monitor_socket (cognitive 19) src-tauri/src/commands/redis_pubsub_server.rs:107 — dbx::commands::redis_pubsub_server::handle_monitor_socket has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (8 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx::webview2_preflight::spawn_preflight_child (cognitive 19) src-tauri/src/webview2_preflight.rs:960 — dbx::webview2_preflight::spawn_preflight_child has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 4 (5 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::locale_family (cognitive 18) src-tauri/src/lib.rs:846 — dbx::locale_family has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::background_backup::run_if_requested (cognitive 18) src-tauri/src/background_backup.rs:369 — dbx::background_backup::run_if_requested has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::plugin_download::download_plugin_file (cognitive 18) src-tauri/src/commands/plugin_download.rs:36 — dbx::commands::plugin_download::download_plugin_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::plugin_file::drop::collect_folder_files (cognitive 18) src-tauri/src/commands/plugin_file/drop.rs:167 — dbx::commands::plugin_file::drop::collect_folder_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::plugin_ui_protocol::media_response (cognitive 18) src-tauri/src/plugin_ui_protocol.rs:141 — dbx::plugin_ui_protocol::media_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx::webview2_preflight::runtime_health (cognitive 18) src-tauri/src/webview2_preflight.rs:261 — dbx::webview2_preflight::runtime_health has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::handle_execute_query_data (cognitive 17) src-tauri/src/commands/mcp_bridge.rs:2726 — dbx::commands::mcp_bridge::handle_execute_query_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4 (6 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::commands::mcp_cleanup::cleanup_directory (cognitive 17) src-tauri/src/commands/mcp_cleanup.rs:24 — dbx::commands::mcp_cleanup::cleanup_directory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::update::download_update_inner (cognitive 17) src-tauri/src/commands/update.rs:559 — dbx::commands::update::download_update_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::fs_open::validate_database_backup_file (cognitive 16) src-tauri/src/commands/fs_open.rs:93 — dbx::commands::fs_open::validate_database_backup_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::commands::mcp_bridge::read_bridge_request (cognitive 16) src-tauri/src/commands/mcp_bridge.rs:441 — dbx::commands::mcp_bridge::read_bridge_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx::plugin_ui_protocol::serve_plugin_media (cognitive 16) src-tauri/src/plugin_ui_protocol.rs:76 — dbx::plugin_ui_protocol::serve_plugin_media has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D30 · Dependency Vulnerabilities · Medium CVE · ×24
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×23
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×22
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:84 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:84-93 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:161-170 | crates/dbx-ai-provider/src/ai_codex_cli.rs:372-387 | crates/dbx-ai-provider/src/ai_grok_cli.rs:131-140 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:95 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:95-118 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:172-195 | crates/dbx-ai-provider/src/ai_codex_cli.rs:342-365 | crates/dbx-ai-provider/src/ai_grok_cli.rs:142-168 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:152 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:152-158 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:232-238 | crates/dbx-ai-provider/src/ai_grok_cli.rs:202-208 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:84-90 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:260 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:260-297 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:334-372 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:751-798 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:222-262 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:259 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:259-271 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:336-355 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:369-381 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:387-403 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/connection/jdbc.rs:914 — crates/dbx-core/src/connection/jdbc.rs:914-947 | crates/dbx-core/src/connection/jdbc.rs:986-1004 | crates/dbx-core/src/connection/jdbc.rs:1066-1084 | crates/dbx-plugin-runtime/src/plugins.rs:196-254 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/data/transfer.rs:9951 — crates/dbx-core/src/data/transfer.rs:9951-10182 | crates/dbx-core/src/data/transfer.rs:10203-10307 | crates/dbx-core/src/data/transfer.rs:10350-10411 | crates/dbx-core/src/data/transfer.rs:10425-10538 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:900 — crates/dbx-core/src/schema/mod.rs:900-999 | crates/dbx-core/src/schema/mod.rs:2412-2856 | crates/dbx-core/src/schema/mod.rs:7717-8038 | crates/dbx-core/src/schema/mod.rs:8603-8940 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-driver-elasticsearch/src/lib.rs:2017 — crates/dbx-driver-elasticsearch/src/lib.rs:2017-2031 | crates/dbx-drivers/src/db/couchdb_driver.rs:491-505 | crates/dbx-drivers/src/db/solr_driver.rs:855-869 | crates/dbx-sql-core/src/query_execution_sql.rs:801-815 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-driver-mysql/src/mysql.rs:6235 — crates/dbx-driver-mysql/src/mysql.rs:6235-6273 | crates/dbx-driver-mysql/src/mysql.rs:6283-6321 | REDACTED:2647-2683 | REDACTED:2692-2727 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:50 — REDACTED:50-72 | crates/dbx-drivers/src/db/influxdb3_driver.rs:74-86 | crates/dbx-drivers/src/db/influxdb_driver.rs:99-111 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:138-150 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:96 — REDACTED:96-119 | crates/dbx-drivers/src/db/influxdb3_driver.rs:88-111 | crates/dbx-drivers/src/db/influxdb_driver.rs:129-152 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:152-175 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:287 — REDACTED:287-322 | crates/dbx-drivers/src/db/rqlite_driver.rs:155-195 | crates/dbx-drivers/src/db/sqlite.rs:2496-2602 | crates/dbx-drivers/src/db/turso_driver.rs:216-256 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-drivers/src/db/sqlite.rs:1508 — crates/dbx-drivers/src/db/sqlite.rs:1508-1560 | crates/dbx-drivers/src/db/sqlite.rs:1562-1637 | crates/dbx-drivers/src/db/sqlite.rs:2604-2649 | crates/dbx-drivers/src/db/sqlite.rs:2651-2746 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-core/src/object_source_sql.rs:210 — crates/dbx-sql-core/src/object_source_sql.rs:210-366 | crates/dbx-sql-core/src/object_source_sql.rs:368-495 | crates/dbx-sql-core/src/object_source_sql.rs:716-861 | crates/dbx-sql-core/src/object_source_sql.rs:1949-2068 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-data/src/query_result_sql.rs:1446 — crates/dbx-sql-data/src/query_result_sql.rs:1446-1492 | crates/dbx-sql-data/src/query_result_sql.rs:1499-1597 | crates/dbx-sql-data/src/query_result_sql.rs:1599-1652 | crates/dbx-sql-data/src/query_result_sql.rs:1711-1789 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-schema/src/schema_diff.rs:3739 — crates/dbx-sql-schema/src/schema_diff.rs:3739-3835 | crates/dbx-sql-schema/src/schema_diff.rs:4017-4067 | crates/dbx-sql-schema/src/schema_diff.rs:4142-4209 | crates/dbx-sql-schema/src/schema_diff.rs:4211-4256 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:561 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:561-705 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:748-804 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:931-976 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1146-1195 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src-tauri/src/commands/mcp_bridge.rs:2239 — src-tauri/src/commands/mcp_bridge.rs:2239-2265 | src-tauri/src/commands/mcp_bridge.rs:2267-2292 | src-tauri/src/commands/mcp_bridge.rs:2670-2724 | src-tauri/src/commands/mcp_bridge.rs:2726-2793 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:29 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:29-55 | agents/common/src/main/java/com/dbx/agent/ConfiguredJdbcAgent.java:132-158 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:125-148 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:196-229 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:276 — agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:276-284 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:913-924 | REDACTED:3026-3037 | REDACTED:6498-6506 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198 — agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198-244 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:117-139 | REDACTED:2644-2678 | REDACTED:2777-2822 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×22
  • Duplicated block (15 lines × 2) crates/dbx-ai-provider/src/ai.rs:3136 — crates/dbx-ai-provider/src/ai.rs:3136-3150 | crates/dbx-ai-provider/src/ai.rs:3155-3169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:670 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:670-684 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:690-704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:1921 — REDACTED:1921-1935 | REDACTED:1950-1964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:2754 — REDACTED:2754-2768 | REDACTED:2849-2863 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/data/transfer.rs:14768 — crates/dbx-core/src/data/transfer.rs:14768-14782 | crates/dbx-core/src/data/transfer.rs:14791-14805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:4402 — REDACTED:4402-4416 | REDACTED:4448-4462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:7025 — REDACTED:7025-7039 | REDACTED:7219-7233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/mod.rs:1286 — crates/dbx-core/src/schema/mod.rs:1286-1300 | crates/dbx-core/src/schema/mod.rs:1305-1319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/mod.rs:2666 — crates/dbx-core/src/schema/mod.rs:2666-2680 | crates/dbx-core/src/schema/mod.rs:2711-2725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/mod.rs:16805 — crates/dbx-core/src/schema/mod.rs:16805-16819 | crates/dbx-core/src/schema/mod.rs:16822-16836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-core/src/schema/state_calibrator.rs:468 — crates/dbx-core/src/schema/state_calibrator.rs:468-482 | crates/dbx-core/src/schema/state_calibrator.rs:491-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:10583 — REDACTED:10583-10597 | REDACTED:10633-10647 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:1795 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1795-1809 | crates/dbx-sql-data/src/query_result_sql.rs:2745-2759 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:1907 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1907-1921 | crates/dbx-sql-data/src/query_result_sql.rs:2871-2885 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:220 — crates/dbx-drivers/src/db/rqlite_driver.rs:220-234 | crates/dbx-drivers/src/db/turso_driver.rs:281-295 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 229 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:573 — crates/dbx-drivers/src/db/ssh_tunnel.rs:573-587 | crates/dbx-drivers/src/db/ssh_tunnel.rs:612-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-mcp/src/server.rs:3749 — crates/dbx-mcp/src/server.rs:3749-3763 | crates/dbx-mcp/src/server.rs:3881-3895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-sql-core/src/sql.rs:3306 — crates/dbx-sql-core/src/sql.rs:3306-3320 | crates/dbx-sql-core/src/sql.rs:3354-3368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:902 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:902-916 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:1030-1044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:142 — crates/dbx-web/src/routes/mongodb_import_export.rs:142-156 | crates/dbx-web/src/routes/table_import.rs:140-154 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) src-tauri/src/commands/cloud_sync.rs:146 — src-tauri/src/commands/cloud_sync.rs:146-160 | src-tauri/src/commands/cloud_sync.rs:330-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) REDACTED:927 — REDACTED:927-941 | REDACTED:1492-1506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:927` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×22
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:433 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:433-439 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:722-728 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:494-500 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/dbx-core/src/admin/mq/token.rs:115 — crates/dbx-core/src/admin/mq/token.rs:115-121 | crates/dbx-core/src/admin/nacos/archive.rs:253-259 | crates/dbx-driver-mysql/src/mysql.rs:1095-1101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) crates/dbx-core/src/admin/nacos/http.rs:3565 — crates/dbx-core/src/admin/nacos/http.rs:3565-3571 | crates/dbx-core/src/admin/nacos/http.rs:3615-3621 | crates/dbx-core/src/admin/nacos/http.rs:3640-3646 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) REDACTED:1140 — REDACTED:1140-1146 | crates/dbx-core/src/data/transfer.rs:4349-4355 | REDACTED:3231-3237 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) REDACTED:3572 — REDACTED:3572-3578 | REDACTED:3902-3908 | REDACTED:4301-4307 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) REDACTED:2139 — REDACTED:2139-2145 | REDACTED:2152-2158 | REDACTED:2198-2204 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-driver-agent/src/agent_service.rs:4462 — crates/dbx-driver-agent/src/agent_service.rs:4462-4468 | crates/dbx-driver-agent/src/agent_service.rs:4480-4486 | crates/dbx-driver-agent/src/agent_service.rs:4494-4500 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:370 — crates/dbx-driver-mongodb/src/mongo_shell.rs:370-376 | crates/dbx-web/src/routes/mcp_policy.rs:52-58 | src-tauri/src/commands/mcp_bridge.rs:1441-1447 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:529 — crates/dbx-driver-mongodb/src/mongo_shell.rs:529-535 | crates/dbx-web/src/routes/mcp_policy.rs:211-217 | src-tauri/src/commands/mcp_bridge.rs:1600-1606 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) REDACTED:291 — REDACTED:291-297 | crates/dbx-drivers/src/db/rqlite_driver.rs:160-166 | crates/dbx-drivers/src/db/turso_driver.rs:221-227 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/dbx-formats/src/csv_export.rs:326 — crates/dbx-formats/src/csv_export.rs:326-332 | crates/dbx-formats/src/csv_export.rs:405-411 | crates/dbx-formats/src/csv_export.rs:437-443 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:1510 — crates/dbx-sql-schema/src/schema_diff.rs:1510-1516 | crates/dbx-sql-schema/src/schema_diff.rs:1522-1528 | crates/dbx-sql-schema/src/schema_diff.rs:1534-1540 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:480 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:480-486 | crates/dbx-ai-provider/src/ai_codex_cli.rs:1013-1019 | crates/dbx-ai-provider/src/ai_grok_cli.rs:702-708 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codex_cli.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) REDACTED:557 — REDACTED:557-563 | crates/dbx-drivers/src/db/rqlite_driver.rs:406-412 | crates/dbx-drivers/src/db/turso_driver.rs:649-655 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) src-tauri/src/commands/connection.rs:2895 — src-tauri/src/commands/connection.rs:2895-2901 | src-tauri/src/commands/connection.rs:2943-2951 | src-tauri/src/commands/plugins.rs:150-156 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 3) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:712 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:712-718 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:891-897 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:935-941 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai.rs:1603 — crates/dbx-ai-provider/src/ai.rs:1603-1609 | crates/dbx-ai-provider/src/ai.rs:1618-1624 | crates/dbx-ai-provider/src/ai.rs:1633-1639 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122-128 | crates/dbx-ai-provider/src/ai_grok_cli.rs:172-178 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:54-60 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_grok_cli.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/dbx-web/src/routes/mongodb_import_export.rs:258 — crates/dbx-web/src/routes/mongodb_import_export.rs:258-264 | crates/dbx-web/src/routes/nacos.rs:934-940 | crates/dbx-web/src/routes/table_import.rs:274-280 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:659 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:659-665 | REDACTED:204-210 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2DriverLoader.java:36-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:48 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:48-54 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:57-63 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:116-122 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) REDACTED:616 — REDACTED:616-622 | agents/drivers/cassandra-go/bench/agent_compare.py:297-303 | REDACTED:616-622 — before extracting anything, compare `REDACTED` and `agents/drivers/cassandra-go/bench/agent_compare.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:611` calls `elapsed_ms`, `perf_counter` and `agents/drivers/cassandra-go/bench/agent_compare.py:293` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D29 · Static Analysis (SAST) · REDACTED · ×21
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · dbx_drivers · ×20
  • dbx_drivers::db::ssh_tunnel::connect_and_authenticate (cyclomatic 37) crates/dbx-drivers/src/db/ssh_tunnel.rs:439 — dbx_drivers::db::ssh_tunnel::connect_and_authenticate has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::normalize_sqlite_sql (cyclomatic 27) crates/dbx-drivers/src/db/sqlite.rs:2780 — dbx_drivers::db::sqlite::normalize_sqlite_sql has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql (cyclomatic 26) crates/dbx-drivers/src/db/cloudflare_d1/sql_lexer.rs:9 — dbx_drivers::db::cloudflare_d1::sql_lexer::lex_sql has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns (cyclomatic 26) crates/dbx-drivers/src/db/sqlite.rs:1963 — dbx_drivers::db::sqlite::parse_sqlite_autoincrement_pk_columns has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::duckdb_sql::split_sql_statements (cyclomatic 25) crates/dbx-drivers/src/db/duckdb_sql.rs:11 — dbx_drivers::db::duckdb_sql::split_sql_statements has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_drivers::db::solr_driver::translate_field_operator_filter (cyclomatic 25) crates/dbx-drivers/src/db/solr_driver.rs:426 — dbx_drivers::db::solr_driver::translate_field_operator_filter has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_drivers::db::ssh_tunnel::forward_loop (cyclomatic 24) crates/dbx-drivers/src/db/ssh_tunnel.rs:1386 — dbx_drivers::db::ssh_tunnel::forward_loop has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement (cyclomatic 23) crates/dbx-drivers/src/db/dynamodb_driver.rs:396 — dbx_drivers::db::dynamodb_driver::parse_dynamodb_statement has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::tokenize_entry (cyclomatic 23) crates/dbx-drivers/src/db/sqlite.rs:2377 — dbx_drivers::db::sqlite::tokenize_entry has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::strip_sql_comments (cyclomatic 20) crates/dbx-drivers/src/db/sqlite.rs:2119 — dbx_drivers::db::sqlite::strip_sql_comments has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::proxy_tunnel::test_proxy_endpoint (cyclomatic 19) crates/dbx-drivers/src/db/proxy_tunnel.rs:518 — dbx_drivers::db::proxy_tunnel::test_proxy_endpoint has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::couchdb_driver::couchdb_docs_to_table (cyclomatic 17) crates/dbx-drivers/src/db/couchdb_driver.rs:533 — dbx_drivers::db::couchdb_driver::couchdb_docs_to_table has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::dynamodb_driver::validate_number (cyclomatic 17) crates/dbx-drivers/src/db/dynamodb_driver.rs:1468 — dbx_drivers::db::dynamodb_driver::validate_number has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::salesforce_driver::apply_fields_function_limit (cyclomatic 17) REDACTED:895 — dbx_drivers::db::salesforce_driver::apply_fields_function_limit has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::solr_driver::solr_docs_to_table (cyclomatic 17) crates/dbx-drivers/src/db/solr_driver.rs:910 — dbx_drivers::db::solr_driver::solr_docs_to_table has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::extract_create_table_body (cyclomatic 17) crates/dbx-drivers/src/db/sqlite.rs:2050 — dbx_drivers::db::sqlite::extract_create_table_body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::sqlite::parse_table_level_primary_key (cyclomatic 17) crates/dbx-drivers/src/db/sqlite.rs:2319 — dbx_drivers::db::sqlite::parse_table_level_primary_key has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal (cyclomatic 17) crates/dbx-drivers/src/db/transport_layer_tunnel.rs:263 — dbx_drivers::db::transport_layer_tunnel::start_transport_layers_internal has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::dynamodb_driver::json_to_attribute_value (cyclomatic 16) crates/dbx-drivers/src/db/dynamodb_driver.rs:1365 — dbx_drivers::db::dynamodb_driver::json_to_attribute_value has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv (cyclomatic 16) crates/dbx-drivers/src/db/ssh_proxy_command.rs:55 — dbx_drivers::db::ssh_proxy_command::parse_proxy_command_argv has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · dbx_ai_provider · ×20
  • dbx_ai_provider::ai::stream_claude_with_tools (cognitive 128) crates/dbx-ai-provider/src/ai.rs:4403 — dbx_ai_provider::ai::stream_claude_with_tools has cognitive complexity 128 (threshold 15). Drivers by points: if/else 25 (105 pts), match/switch 3 (13 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_openai_with_tools (cognitive 111) crates/dbx-ai-provider/src/ai.rs:4628 — dbx_ai_provider::ai::stream_openai_with_tools has cognitive complexity 111 (threshold 15). Drivers by points: if/else 23 (95 pts), loops 3 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_openai (cognitive 69) crates/dbx-ai-provider/src/ai.rs:3939 — dbx_ai_provider::ai::stream_openai has cognitive complexity 69 (threshold 15). Drivers by points: if/else 14 (60 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::build_gemini_contents (cognitive 60) crates/dbx-ai-provider/src/ai.rs:4980 — dbx_ai_provider::ai::build_gemini_contents has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (46 pts), loops 3 (11 pts), boolean chains 3 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_ai_provider::ai::stream_responses_with_tools (cognitive 57) crates/dbx-ai-provider/src/ai.rs:4821 — dbx_ai_provider::ai::stream_responses_with_tools has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (46 pts), match/switch 2 (7 pts), loops 2 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_gemini_with_tools (cognitive 55) crates/dbx-ai-provider/src/ai.rs:5085 — dbx_ai_provider::ai::stream_gemini_with_tools has cognitive complexity 55 (threshold 15). Drivers by points: if/else 9 (42 pts), loops 3 (11 pts), match/switch 1 (2 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_ai_provider::ai::stream_claude (cognitive 43) crates/dbx-ai-provider/src/ai.rs:3834 — dbx_ai_provider::ai::stream_claude has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (37 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent (cognitive 35) crates/dbx-ai-provider/src/ai_cli_agent.rs:1073 — dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 3 (6 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_pi_agent_cli::emit_pi_event (cognitive 35) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:655 — dbx_ai_provider::ai_pi_agent_cli::emit_pi_event has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 1 (4 pts), match/switch 2 (3 pts) (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_ai_provider::ai::stream_responses_api (cognitive 30) crates/dbx-ai-provider/src/ai.rs:4096 — dbx_ai_provider::ai::stream_responses_api has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::measure_first_stream_chunk (cognitive 28) crates/dbx-ai-provider/src/ai.rs:3094 — dbx_ai_provider::ai::measure_first_stream_chunk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_claude_code_cli::parse_claude_code_models (cognitive 25) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:355 — dbx_ai_provider::ai_claude_code_cli::parse_claude_code_models has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::stream_gemini (cognitive 23) crates/dbx-ai-provider/src/ai.rs:4190 — dbx_ai_provider::ai::stream_gemini has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::resolve_endpoint (cognitive 21) crates/dbx-ai-provider/src/ai.rs:951 — dbx_ai_provider::ai::resolve_endpoint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::test_connection_core (cognitive 21) crates/dbx-ai-provider/src/ai.rs:3232 — dbx_ai_provider::ai::test_connection_core has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai_opencode_cli::parse_opencode_models (cognitive 21) crates/dbx-ai-provider/src/ai_opencode_cli.rs:444 — dbx_ai_provider::ai_opencode_cli::parse_opencode_models has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::list_claude_models (cognitive 18) crates/dbx-ai-provider/src/ai.rs:2079 — dbx_ai_provider::ai::list_claude_models has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::classify_error (cognitive 18) crates/dbx-ai-provider/src/ai.rs:3402 — dbx_ai_provider::ai::classify_error has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_ai_provider::ai::build_responses_input_with_tools_variant (cognitive 17) crates/dbx-ai-provider/src/ai.rs:1688 — dbx_ai_provider::ai::build_responses_input_with_tools_variant has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_ai_provider::ai::with_stream_retry (cognitive 17) crates/dbx-ai-provider/src/ai.rs:3648 — dbx_ai_provider::ai::with_stream_retry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×20
  • Duplicated block (14 lines × 2) agents/drivers/duckdb/src/sql.rs:82 — agents/drivers/duckdb/src/sql.rs:82-95 | crates/dbx-drivers/src/db/duckdb_sql.rs:98-111 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) REDACTED:4944 — REDACTED:4944-4957 | REDACTED:4984-4997 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:7579 — REDACTED:7579-7592 | REDACTED:7607-7620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:4667 — REDACTED:4667-4680 | REDACTED:4728-4741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer.rs:930 — crates/dbx-core/src/data/transfer.rs:930-943 | crates/dbx-core/src/data/transfer.rs:950-963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/data/transfer/oracle_table_contract.rs:39 — crates/dbx-core/src/data/transfer/oracle_table_contract.rs:39-52 | crates/dbx-core/src/data/transfer/oracle_table_contract.rs:76-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/persistence/cloud_sync.rs:2455 — crates/dbx-core/src/persistence/cloud_sync.rs:2455-2468 | REDACTED:3495-3508 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) REDACTED:1637 — REDACTED:1637-1650 | REDACTED:1671-1684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-core/src/query/mongo_ops.rs:1538 — crates/dbx-core/src/query/mongo_ops.rs:1538-1551 | crates/dbx-mcp/src/backend.rs:2827-2840 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:2856 — crates/dbx-driver-mysql/src/mysql.rs:2856-2869 | crates/dbx-types/src/models/connection.rs:2047-2060 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) crates/dbx-drivers/src/db/victoriametrics_driver.rs:355 — crates/dbx-drivers/src/db/victoriametrics_driver.rs:355-368 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:395-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1244 — crates/dbx-sql-data/src/query_result_sql.rs:1244-1257 | crates/dbx-sql-data/src/query_result_sql.rs:1383-1396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-types/src/models/connection.rs:1361 — crates/dbx-types/src/models/connection.rs:1361-1374 | crates/dbx-types/src/models/connection.rs:1552-1565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-web/src/routes/document_store.rs:473 — crates/dbx-web/src/routes/document_store.rs:473-486 | crates/dbx-web/src/routes/mongo.rs:800-813 — before extracting anything, compare `crates/dbx-web/src/routes/document_store.rs` and `crates/dbx-web/src/routes/mongo.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) src-tauri/src/commands/transfer.rs:63 — src-tauri/src/commands/transfer.rs:63-76 | src-tauri/src/commands/transfer.rs:119-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-driver-support/src/http_tunnel.rs:38 — crates/dbx-driver-support/src/http_tunnel.rs:38-51 | crates/dbx-driver-support/src/http_tunnel.rs:80-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/dbx-mcp/src/backend.rs:2228 — crates/dbx-mcp/src/backend.rs:2228-2241 | crates/dbx-mcp/src/backend.rs:2251-2264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:575 — agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:575-588 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:729-742 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:172 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:172-185 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:296-309 — before extracting anything, compare `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` and `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) REDACTED:2352 — REDACTED:2352-2365 | REDACTED:2383-2396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · dbx_driver_postgres · ×19
  • dbx_driver_postgres::postgres::completion_assistant_search_inner (cognitive 56) REDACTED:4080 — dbx_driver_postgres::postgres::completion_assistant_search_inner has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (33 pts), loops 6 (13 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::pg_ndim_array_element_json (cognitive 43) REDACTED:413 — dbx_driver_postgres::postgres::pg_ndim_array_element_json has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28 (42 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::postgres_connection_url (cognitive 35) REDACTED:3480 — dbx_driver_postgres::postgres::postgres_connection_url has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (26 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::classify_pg_type (cognitive 30) REDACTED:1035 — dbx_driver_postgres::postgres::classify_pg_type has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::build_custom_type_ddl (cognitive 27) REDACTED:7833 — dbx_driver_postgres::postgres::build_custom_type_ddl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::list_sequences (cognitive 26) REDACTED:10613 — dbx_driver_postgres::postgres::list_sequences has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_postgres::postgres::pg_temporal_array_text_to_json (cognitive 24) REDACTED:1284 — dbx_driver_postgres::postgres::pg_temporal_array_text_to_json has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (7 pts), match/switch 3 (5 pts) (nesting depth added 8). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (parse_array, parse_quoted, skip_whitespace, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • dbx_driver_postgres::postgres::execute_select_text (cognitive 24) REDACTED:2203 — dbx_driver_postgres::postgres::execute_select_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::cancel_postgres_query (cognitive 24) REDACTED:9710 — dbx_driver_postgres::postgres::cancel_postgres_query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (10 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::query_with_column_metadata_fallback (cognitive 21) REDACTED:1677 — dbx_driver_postgres::postgres::query_with_column_metadata_fallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::postgres_quoted_search_path_elements (cognitive 20) REDACTED:8643 — dbx_driver_postgres::postgres::postgres_quoted_search_path_elements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::decode_pg_numeric_bytes (cognitive 18) REDACTED:211 — dbx_driver_postgres::postgres::decode_pg_numeric_bytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::pg_array_to_json_value (cognitive 18) REDACTED:869 — dbx_driver_postgres::postgres::pg_array_to_json_value has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::list_indexes_for_relations_with_sql (cognitive 18) REDACTED:5408 — dbx_driver_postgres::postgres::list_indexes_for_relations_with_sql has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::custom_type_domain_attributes (cognitive 18) REDACTED:7664 — dbx_driver_postgres::postgres::custom_type_domain_attributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::decode_tsvector_bytes (cognitive 16) REDACTED:1478 — dbx_driver_postgres::postgres::decode_tsvector_bytes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::stream_select_query_text (cognitive 16) REDACTED:2450 — dbx_driver_postgres::postgres::stream_select_query_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::list_opengauss_constraints (cognitive 16) REDACTED:5932 — dbx_driver_postgres::postgres::list_opengauss_constraints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_postgres::postgres::list_opengauss_foreign_keys (cognitive 16) REDACTED:10214 — dbx_driver_postgres::postgres::list_opengauss_foreign_keys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_mysql · ×19
  • dbx_driver_mysql::mysql::find_if_not_exists_clause (cognitive 51) crates/dbx-driver-mysql/src/mysql.rs:6922 — dbx_driver_mysql::mysql::find_if_not_exists_clause has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 5 (13 pts), boolean chains 11 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn (cognitive 50) crates/dbx-driver-mysql/src/mysql.rs:5740 — dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (43 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::mysql_async_url (cognitive 33) crates/dbx-driver-mysql/src/mysql.rs:3015 — dbx_driver_mysql::mysql::mysql_async_url has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::list_objects (cognitive 30) crates/dbx-driver-mysql/src/mysql.rs:4488 — dbx_driver_mysql::mysql::list_objects has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 7 (17 pts), if/else 9 (12 pts), boolean chains 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_mysql::mysql::completion_assistant_search (cognitive 29) crates/dbx-driver-mysql/src/mysql.rs:3479 — dbx_driver_mysql::mysql::completion_assistant_search has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_non_result_batch_on_conn (cognitive 29) crates/dbx-driver-mysql/src/mysql.rs:6740 — dbx_driver_mysql::mysql::execute_non_result_batch_on_conn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql_compatible::indexes_from_create_table_ddl (cognitive 27) crates/dbx-driver-mysql/src/mysql_compatible.rs:283 — dbx_driver_mysql::mysql_compatible::indexes_from_create_table_ddl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::ssl_fallback_url (cognitive 26) crates/dbx-driver-mysql/src/mysql.rs:2772 — dbx_driver_mysql::mysql::ssl_fallback_url has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::parse_mysql_enum_values (cognitive 25) crates/dbx-driver-mysql/src/mysql.rs:4971 — dbx_driver_mysql::mysql::parse_mysql_enum_values has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (11 pts), loops 4 (7 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments (cognitive 25) crates/dbx-driver-mysql/src/mysql.rs:7087 — dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (12 pts), boolean chains 7, if/else 3 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • dbx_driver_mysql::mysql::resolve_doris_opaque_column_types (cognitive 21) crates/dbx-driver-mysql/src/mysql.rs:502 — dbx_driver_mysql::mysql::resolve_doris_opaque_column_types has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::mysql_column_type_name (cognitive 21) crates/dbx-driver-mysql/src/mysql.rs:912 — dbx_driver_mysql::mysql::mysql_column_type_name has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_mysql::mysql::split_mysql_session_variables (cognitive 19) crates/dbx-driver-mysql/src/mysql.rs:2563 — dbx_driver_mysql::mysql::split_mysql_session_variables has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::mysql_connection_time_zone (cognitive 18) crates/dbx-driver-mysql/src/mysql.rs:2628 — dbx_driver_mysql::mysql::mysql_connection_time_zone has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_result_set_with_text_protocol_on_conn (cognitive 18) crates/dbx-driver-mysql/src/mysql.rs:5552 — dbx_driver_mysql::mysql::execute_result_set_with_text_protocol_on_conn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mysql::mysql::execute_query_on_conn_with_limits_progress_resolved (cognitive 18) crates/dbx-driver-mysql/src/mysql.rs:6539 — dbx_driver_mysql::mysql::execute_query_on_conn_with_limits_progress_resolved has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode (cognitive 17) crates/dbx-driver-mysql/src/mysql.rs:2004 — dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback (cognitive 16) crates/dbx-driver-mysql/src/mysql.rs:1747 — dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_mysql::mysql::mysql_tls_url (cognitive 16) crates/dbx-driver-mysql/src/mysql.rs:2177 — dbx_driver_mysql::mysql::mysql_tls_url has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×19
  • Duplicated block (6 lines × 3) crates/dbx-core/src/data/docs/dbml.rs:238 — crates/dbx-core/src/data/docs/dbml.rs:238-244 | crates/dbx-core/src/data/docs/dbml.rs:286-291 | crates/dbx-core/src/data/docs/dbml.rs:307-313 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) REDACTED:1733 — REDACTED:1733-1738 | REDACTED:2029-2034 | REDACTED:2236-2241 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/data/transfer.rs:9180 — crates/dbx-core/src/data/transfer.rs:9180-9185 | crates/dbx-core/src/data/transfer.rs:9246-9251 | crates/dbx-core/src/data/transfer.rs:9269-9274 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/data/transfer.rs:10234 — crates/dbx-core/src/data/transfer.rs:10234-10239 | crates/dbx-core/src/data/transfer.rs:10382-10387 | crates/dbx-core/src/data/transfer.rs:10479-10484 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) REDACTED:869 — REDACTED:869-874 | REDACTED:906-911 | REDACTED:968-973 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/query/redis_ops.rs:18 — crates/dbx-core/src/query/redis_ops.rs:18-23 | crates/dbx-core/src/query/redis_ops.rs:64-69 | crates/dbx-core/src/query/redis_ops.rs:102-107 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:2580 — crates/dbx-driver-elasticsearch/src/lib.rs:2580-2585 | crates/dbx-drivers/src/db/couchdb_driver.rs:626-632 | crates/dbx-drivers/src/db/solr_driver.rs:1003-1009 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:494 — crates/dbx-driver-mongodb/src/mongo_shell.rs:494-499 | crates/dbx-web/src/routes/mcp_policy.rs:176-181 | src-tauri/src/commands/mcp_bridge.rs:1565-1570 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-sql-data/src/query_result_sql.rs:1511 — crates/dbx-sql-data/src/query_result_sql.rs:1511-1516 | crates/dbx-sql-data/src/query_result_sql.rs:1611-1616 | crates/dbx-sql-data/src/query_result_sql.rs:1761-1766 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:6657 — crates/dbx-sql-schema/src/schema_diff.rs:6657-6662 | crates/dbx-sql-schema/src/schema_diff.rs:6708-6713 | crates/dbx-sql-schema/src/schema_diff.rs:6735-6740 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-web/src/routes/database_export.rs:170 — crates/dbx-web/src/routes/database_export.rs:170-175 | crates/dbx-web/src/routes/query_result_export.rs:154-159 | crates/dbx-web/src/routes/table_export.rs:139-144 — before extracting anything, compare `crates/dbx-web/src/routes/query_result_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:77 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:77-82 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:154-159 | crates/dbx-ai-provider/src/ai_grok_cli.rs:124-129 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-ai-provider/src/ai_codex_cli.rs:434 — crates/dbx-ai-provider/src/ai_codex_cli.rs:434-439 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:411-416 | src-tauri/src/commands/mcp.rs:1647-1652 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:348 — crates/dbx-driver-mongodb/src/mongo_shell.rs:348-353 | crates/dbx-web/src/routes/mcp_policy.rs:30-35 | src-tauri/src/commands/mcp_bridge.rs:1419-1424 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/dbx-core/src/admin/consul/client.rs:42 — crates/dbx-core/src/admin/consul/client.rs:42-47 | crates/dbx-core/src/ai/agent_kv.rs:1243-1248 | crates/dbx-mcp/src/backend.rs:636-641 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) crates/dbx-sql-core/src/object_source_sql.rs:231 — crates/dbx-sql-core/src/object_source_sql.rs:231-236 | crates/dbx-sql-core/src/object_source_sql.rs:387-392 | crates/dbx-sql-core/src/object_source_sql.rs:1959-1964 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/dbx-driver-mongodb/src/mongo_driver.rs:2443 — crates/dbx-driver-mongodb/src/mongo_driver.rs:2443-2448 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2663-2668 | crates/dbx-driver-mongodb/src/mongo_driver.rs:2761-2766 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:326 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:326-331 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:356-361 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:385-390 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:326` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) REDACTED:91 — REDACTED:91-96 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:73-78 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:190-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · dbx_driver_agent · ×18
  • dbx_driver_agent::agent_service::download_with_progress (cognitive 78) crates/dbx-driver-agent/src/agent_service.rs:2177 — dbx_driver_agent::agent_service::download_with_progress has cognitive complexity 78 (threshold 15). Drivers by points: if/else 26 (53 pts), match/switch 5 (15 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::import_offline_zip (cognitive 73) crates/dbx-driver-agent/src/agent_service.rs:3186 — dbx_driver_agent::agent_service::import_offline_zip has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (53 pts), match/switch 6 (12 pts), loops 6, boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits (cognitive 58) crates/dbx-driver-agent/src/agent_offline_export.rs:695 — dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::backend_error::consume_sensitive_value (cognitive 37) crates/dbx-driver-agent/src/backend_error.rs:1098 — dbx_driver_agent::backend_error::consume_sensitive_value has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::open_agent_download_response (cognitive 34) crates/dbx-driver-agent/src/agent_service.rs:2419 — dbx_driver_agent::agent_service::open_agent_download_response has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 4 (13 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::validate_offline_zip_preflight (cognitive 34) crates/dbx-driver-agent/src/agent_service.rs:3554 — dbx_driver_agent::agent_service::validate_offline_zip_preflight has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 2, loops 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_agent::agent_offline_export::validate_managed_jre_tree (cognitive 30) crates/dbx-driver-agent/src/agent_offline_export.rs:926 — dbx_driver_agent::agent_offline_export::validate_managed_jre_tree has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::is_macho_binary_for_cpu (cognitive 26) crates/dbx-driver-agent/src/agent_service.rs:4454 — dbx_driver_agent::agent_service::is_macho_binary_for_cpu has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::collect_offline_entries (cognitive 25) crates/dbx-driver-agent/src/agent_service.rs:3441 — dbx_driver_agent::agent_service::collect_offline_entries has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::backend_error::next_sensitive_assignment (cognitive 25) crates/dbx-driver-agent/src/backend_error.rs:1040 — dbx_driver_agent::backend_error::next_sensitive_assignment has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_connection::agent_connect_params_with_role (cognitive 24) crates/dbx-driver-agent/src/agent_connection.rs:95 — dbx_driver_agent::agent_connection::agent_connect_params_with_role has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_agent::agent_service::install_agent_driver_from_registry (cognitive 21) crates/dbx-driver-agent/src/agent_service.rs:1719 — dbx_driver_agent::agent_service::install_agent_driver_from_registry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_driver_agent::agent_offline_export::export_agents_offline_unlocked (cognitive 19) crates/dbx-driver-agent/src/agent_offline_export.rs:313 — dbx_driver_agent::agent_offline_export::export_agents_offline_unlocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_service::upgrade_all_agent_drivers_with_registry (cognitive 18) crates/dbx-driver-agent/src/agent_service.rs:976 — dbx_driver_agent::agent_service::upgrade_all_agent_drivers_with_registry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_driver_agent::agent_driver::parse_agent_java_opts (cognitive 17) crates/dbx-driver-agent/src/agent_driver.rs:4040 — dbx_driver_agent::agent_driver::parse_agent_java_opts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_agent::agent_offline_export::snapshot_driver_source (cognitive 16) crates/dbx-driver-agent/src/agent_offline_export.rs:578 — dbx_driver_agent::agent_offline_export::snapshot_driver_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_driver_agent::agent_service::open_download_response (cognitive 16) crates/dbx-driver-agent/src/agent_service.rs:728 — dbx_driver_agent::agent_service::open_download_response has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_agent::backend_error::structured_entry (cognitive 16) crates/dbx-driver-agent/src/backend_error.rs:736 — dbx_driver_agent::backend_error::structured_entry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×16
  • Change-coupling hub: treeNodeIcon.ts → REDACTED, TreeItem.vue, REDACTED, REDACTED, ko.ts, REDACTED, REDACTED, connectionStore.ts apps/desktop/src/lib/sidebar/treeNodeIcon.ts — `apps/desktop/src/lib/sidebar/treeNodeIcon.ts` changes together with 8 other files — `REDACTED`, `apps/desktop/src/components/sidebar/TreeItem.vue`, `REDACTED`, `REDACTED`, `apps/desktop/src/i18n/locales/ko.ts`, `REDACTED`, `REDACTED`, `apps/desktop/src/stores/connectionStore.ts` — none of which declares a dependency on it: one file is the hub of 8 separate couplings, not 8 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 8.
  • Change-coupling hub: http.ts → redis_ops.rs, ai.rs, document_cmd.rs, mongo_cmd.rs, redis_cmd.rs apps/desktop/src/lib/backend/http.ts — `apps/desktop/src/lib/backend/http.ts` changes together with 5 other files — `crates/dbx-core/src/query/redis_ops.rs`, `crates/dbx-web/src/routes/ai.rs`, `src-tauri/src/commands/document_cmd.rs`, `src-tauri/src/commands/mongo_cmd.rs`, `src-tauri/src/commands/redis_cmd.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: REDACTED → EditorSettingsDialog.vue, sidebarTreeDialogState.ts, useExportTracker.ts, backend-errors.ts, tauri.ts, columnFormatter.ts, gridSelection.ts, keyboardShortcuts.ts, shortcutRegistry.ts, redisKeyTree.ts, editorSettingsDraft.ts, settingsSearch.ts, sidebarTreeItemLayout.ts, treeNodeIcon.ts, objectSourceEditor.ts, tableImport.ts, settingsStore.ts, ai_cli_agent.rs, connection_secrets.rs, cloud_sync.rs, redis_ops.rs, redis.rs, redis_cmd.rs, update.rs REDACTED — `REDACTED` changes together with 24 other files — `apps/desktop/src/components/editor/EditorSettingsDialog.vue`, `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/composables/useExportTracker.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/backend/tauri.ts`, `apps/desktop/src/lib/dataGrid/columnFormatter.ts`, `apps/desktop/src/lib/dataGrid/gridSelection.ts`, `apps/desktop/src/lib/editor/keyboardShortcuts.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/redis/redisKeyTree.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/lib/table/objectSourceEditor.ts`, `apps/desktop/src/lib/table/tableImport.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-core/src/connection/connection_secrets.rs`, `crates/dbx-core/src/persistence/cloud_sync.rs`, `crates/dbx-core/src/query/redis_ops.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/redis_cmd.rs`, `src-tauri/src/commands/update.rs` — none of which declares a dependency on it: one file is the hub of 24 separate couplings, not 24 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 24.
  • Change-coupling hub: REDACTED → SqlParameterDialog.vue, ExportProgressPopover.vue, AppDialogs.vue, VisibleDatabasesDialog.vue, sidebarTreeDialogState.ts, useAppUpdater.ts, useDialogSources.ts, useExportTracker.ts, useSidebarConnectionMutationRuntime.ts, backend-errors.ts, api.ts, columnFormatter.ts, gridSelection.ts, keyboardShortcuts.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, sidebarTreeItemLayout.ts, treeNodeIcon.ts, objectSourceEditor.ts, tableImport.ts, ai_cli_agent.rs, connection_secrets.rs, redis.rs, redis_cmd.rs, update.rs REDACTED — `REDACTED` changes together with 26 other files — `apps/desktop/src/components/editor/SqlParameterDialog.vue`, `apps/desktop/src/components/export/ExportProgressPopover.vue`, `apps/desktop/src/components/layout/AppDialogs.vue`, `apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue`, `apps/desktop/src/components/sidebar/sidebarTreeDialogState.ts`, `apps/desktop/src/composables/useAppUpdater.ts`, `apps/desktop/src/composables/useDialogSources.ts`, `apps/desktop/src/composables/useExportTracker.ts`, `apps/desktop/src/composables/useSidebarConnectionMutationRuntime.ts`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/backend/api.ts`, `apps/desktop/src/lib/dataGrid/columnFormatter.ts`, `apps/desktop/src/lib/dataGrid/gridSelection.ts`, `apps/desktop/src/lib/editor/keyboardShortcuts.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/sidebar/sidebarTreeItemLayout.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/lib/table/objectSourceEditor.ts`, `apps/desktop/src/lib/table/tableImport.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-core/src/connection/connection_secrets.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/redis_cmd.rs`, `src-tauri/src/commands/update.rs` — none of which declares a dependency on it: one file is the hub of 26 separate couplings, not 26 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 26.
  • Change-coupling hub: REDACTED → EditorSettingsDialog.vue, backend-errors.ts, keyboardShortcuts.ts, shortcutRegistry.ts, editorSettingsDraft.ts, settingsSearch.ts, treeNodeIcon.ts, objectSourceEditor.ts, settingsStore.ts, ai_cli_agent.rs, redis.rs REDACTED — `REDACTED` changes together with 11 other files — `apps/desktop/src/components/editor/EditorSettingsDialog.vue`, `apps/desktop/src/i18n/backend-errors.ts`, `apps/desktop/src/lib/editor/keyboardShortcuts.ts`, `apps/desktop/src/lib/editor/shortcutRegistry.ts`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/lib/settings/settingsSearch.ts`, `apps/desktop/src/lib/sidebar/treeNodeIcon.ts`, `apps/desktop/src/lib/table/objectSourceEditor.ts`, `apps/desktop/src/stores/settingsStore.ts`, `crates/dbx-ai-provider/src/ai_cli_agent.rs`, `crates/dbx-web/src/routes/redis.rs` — none of which declares a dependency on it: one file is the hub of 11 separate couplings, not 11 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 11.
  • Change-coupling hub: editorSettingsDraft.ts → REDACTED, REDACTED, ko.ts, REDACTED, REDACTED apps/desktop/src/lib/settings/editorSettingsDraft.ts — `apps/desktop/src/lib/settings/editorSettingsDraft.ts` changes together with 5 other files — `REDACTED`, `REDACTED`, `apps/desktop/src/i18n/locales/ko.ts`, `REDACTED`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: settingsSearch.ts → REDACTED, REDACTED, ko.ts, REDACTED, REDACTED, editorSettingsDraft.ts, settingsStore.ts apps/desktop/src/lib/settings/settingsSearch.ts — `apps/desktop/src/lib/settings/settingsSearch.ts` changes together with 7 other files — `REDACTED`, `REDACTED`, `apps/desktop/src/i18n/locales/ko.ts`, `REDACTED`, `REDACTED`, `apps/desktop/src/lib/settings/editorSettingsDraft.ts`, `apps/desktop/src/stores/settingsStore.ts` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: api.ts → main.rs, mongo.rs, redis.rs, external_sql.rs, mongo_cmd.rs, redis_cmd.rs, lib.rs apps/desktop/src/lib/backend/api.ts — `apps/desktop/src/lib/backend/api.ts` changes together with 7 other files — `crates/dbx-web/src/main.rs`, `crates/dbx-web/src/routes/mongo.rs`, `crates/dbx-web/src/routes/redis.rs`, `src-tauri/src/commands/external_sql.rs`, `src-tauri/src/commands/mongo_cmd.rs`, `src-tauri/src/commands/redis_cmd.rs`, `src-tauri/src/lib.rs` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: ai_cli_agent.rs → AiAssistant.vue, EditorSettingsDialog.vue, REDACTED, REDACTED, REDACTED, REDACTED crates/dbx-ai-provider/src/ai_cli_agent.rs — `crates/dbx-ai-provider/src/ai_cli_agent.rs` changes together with 6 other files — `apps/desktop/src/components/editor/AiAssistant.vue`, `apps/desktop/src/components/editor/EditorSettingsDialog.vue`, `REDACTED`, `REDACTED`, `REDACTED`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: ConnectionDialog.vue → TunnelProfileManager.vue, DatabaseIcon.vue, DatabaseSearchDialog.vue, VisibleDatabasesDialog.vue, connection_secrets.rs, agent_catalog.rs, database_capabilities.rs apps/desktop/src/components/connection/ConnectionDialog.vue — `apps/desktop/src/components/connection/ConnectionDialog.vue` changes together with 7 other files — `apps/desktop/src/components/connection/TunnelProfileManager.vue`, `apps/desktop/src/components/icons/DatabaseIcon.vue`, `apps/desktop/src/components/search/DatabaseSearchDialog.vue`, `apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue`, `crates/dbx-core/src/connection/connection_secrets.rs`, `crates/dbx-driver-agent/src/agent_catalog.rs`, `crates/dbx-driver-agent/src/database_capabilities.rs` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: shortcutRegistry.ts → REDACTED, REDACTED, REDACTED, REDACTED apps/desktop/src/lib/editor/shortcutRegistry.ts — `apps/desktop/src/lib/editor/shortcutRegistry.ts` changes together with 4 other files — `REDACTED`, `REDACTED`, `REDACTED`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: exportFormats.ts → DataGrid.vue, tauri.ts, REDACTED apps/desktop/src/lib/export/exportFormats.ts — `apps/desktop/src/lib/export/exportFormats.ts` changes together with 3 other files — `apps/desktop/src/components/grid/DataGrid.vue`, `apps/desktop/src/lib/backend/tauri.ts`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: AiAssistant.vue → ai_codex_cli.rs, agent_loop.rs, ai.rs, ai.rs apps/desktop/src/components/editor/AiAssistant.vue — `apps/desktop/src/components/editor/AiAssistant.vue` changes together with 4 other files — `crates/dbx-ai-provider/src/ai_codex_cli.rs`, `crates/dbx-core/src/ai/agent_loop.rs`, `crates/dbx-web/src/routes/ai.rs`, `src-tauri/src/commands/ai.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: backend-errors.ts → REDACTED, REDACTED, REDACTED, REDACTED apps/desktop/src/i18n/backend-errors.ts — `apps/desktop/src/i18n/backend-errors.ts` changes together with 4 other files — `REDACTED`, `REDACTED`, `REDACTED`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: lib.rs → useTauriEvents.ts, useWindowControls.ts, localeOptions.ts src-tauri/src/lib.rs — `src-tauri/src/lib.rs` changes together with 3 other files — `apps/desktop/src/composables/useTauriEvents.ts`, `apps/desktop/src/composables/useWindowControls.ts`, `apps/desktop/src/lib/app/localeOptions.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: settingsStore.ts → REDACTED, REDACTED, REDACTED apps/desktop/src/stores/settingsStore.ts — `apps/desktop/src/stores/settingsStore.ts` changes together with 3 other files — `REDACTED`, `REDACTED`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×16
  • Duplicated block (16 lines × 2) crates/dbx-core/src/admin/nacos/http.rs:1037 — crates/dbx-core/src/admin/nacos/http.rs:1037-1052 | crates/dbx-core/src/admin/nacos/http.rs:1066-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) REDACTED:3771 — REDACTED:3771-3786 | src-tauri/src/commands/connection.rs:2420-2435 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) REDACTED:3795 — REDACTED:3795-3810 | src-tauri/src/commands/connection.rs:2454-2469 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) REDACTED:1179 — REDACTED:1179-1194 | REDACTED:1222-1237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/dbx-core/src/schema/mod.rs:8964 — crates/dbx-core/src/schema/mod.rs:8964-8979 | crates/dbx-core/src/schema/normalization.rs:103-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:626 — crates/dbx-drivers/src/db/couchdb_driver.rs:626-641 | crates/dbx-drivers/src/db/solr_driver.rs:1003-1018 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1500 — crates/dbx-sql-data/src/query_result_sql.rs:1500-1515 | crates/dbx-sql-data/src/query_result_sql.rs:1600-1615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:649 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:649-664 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:895-910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:806 — crates/dbx-sql-schema/src/schema_diff.rs:806-821 | crates/dbx-sql-schema/src/schema_diff.rs:828-843 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/dbx-web/src/routes/agents.rs:473 — crates/dbx-web/src/routes/agents.rs:473-488 | src-tauri/src/commands/agents.rs:363-378 — before extracting anything, compare `crates/dbx-web/src/routes/agents.rs` and `src-tauri/src/commands/agents.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:389 — crates/dbx-web/src/routes/mongodb_import_export.rs:389-404 | crates/dbx-web/src/routes/table_import.rs:435-450 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) crates/dbx-core/src/ai/agent_tools.rs:466 — crates/dbx-core/src/ai/agent_tools.rs:466-482 | crates/dbx-core/src/ai/agent_tools.rs:630-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) REDACTED:4966 — REDACTED:4966-4981 | REDACTED:4996-5011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) REDACTED:905 — REDACTED:905-920 | REDACTED:1470-1485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) REDACTED:560 — REDACTED:560-575 | REDACTED:560-575 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:129 — agents/drivers/argo-go/bench/functional_probe.py:129-144 | agents/drivers/hive-go/bench/functional_probe.py:129-144 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · dbx_sql_data · ×15
  • dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote (cyclomatic 53) REDACTED:2776 — dbx_sql_data::data_grid_sql::format_grid_sql_literal_with_identifier_quote has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_sql::build_data_grid_save_statements (cyclomatic 39) REDACTED:1759 — dbx_sql_data::data_grid_sql::build_data_grid_save_statements has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::build_query_pagination_execution_plan (cyclomatic 38) crates/dbx-sql-data/src/query_result_sql.rs:143 — dbx_sql_data::query_result_sql::build_query_pagination_execution_plan has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::build_sorted_query_sql (cyclomatic 38) crates/dbx-sql-data/src/query_result_sql.rs:494 — dbx_sql_data::query_result_sql::build_sorted_query_sql has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements (cyclomatic 26) REDACTED:2016 — dbx_sql_data::data_grid_sql::build_data_grid_rollback_statements has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters (cyclomatic 24) REDACTED:612 — dbx_sql_data::data_grid_sql::build_data_grid_copy_insert_statements_with_formatters has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_sql_data::query_result_sql::top_level_sql_tokens (cyclomatic 24) crates/dbx-sql-data/src/query_result_sql.rs:2744 — dbx_sql_data::query_result_sql::top_level_sql_tokens has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements (cyclomatic 23) crates/dbx-sql-data/src/data_grid_salesforce_sql.rs:15 — dbx_sql_data::data_grid_salesforce_sql::build_salesforce_data_grid_save_statements has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::data_grid_sql::validate_data_grid_save (cyclomatic 23) REDACTED:1379 — dbx_sql_data::data_grid_sql::validate_data_grid_save has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::query_result_sql::iotdb_tree_count_sql (cyclomatic 21) crates/dbx-sql-data/src/query_result_sql.rs:1499 — dbx_sql_data::query_result_sql::iotdb_tree_count_sql has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_data::query_result_sql::build_paginated_query_sql (cyclomatic 18) crates/dbx-sql-data/src/query_result_sql.rs:341 — dbx_sql_data::query_result_sql::build_paginated_query_sql has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_sql_data::query_result_sql::build_count_query_sql (cyclomatic 17) crates/dbx-sql-data/src/query_result_sql.rs:404 — dbx_sql_data::query_result_sql::build_count_query_sql has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_data::query_result_sql::sql_server_count_sql (cyclomatic 17) crates/dbx-sql-data/src/query_result_sql.rs:1711 — dbx_sql_data::query_result_sql::sql_server_count_sql has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_sql_data::data_grid_sql::build_data_grid_column_distinct_values_sql (cyclomatic 16) REDACTED:1159 — dbx_sql_data::data_grid_sql::build_data_grid_column_distinct_values_sql has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dbx_sql_data::data_grid_sql::build_data_grid_context_filter_condition (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection (cyclomatic 16) crates/dbx-sql-data/src/query_result_sql.rs:1277 — dbx_sql_data::query_result_sql::is_simple_sqlserver_order_projection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · dbx_driver_mongodb · ×14
  • dbx_driver_mongodb::mongo_shell::parse (cognitive 222) crates/dbx-driver-mongodb/src/mongo_shell.rs:549 — dbx_driver_mongodb::mongo_shell::parse has cognitive complexity 222 (threshold 15). Drivers by points: if/else 93 (172 pts), boolean chains 33, loops 10 (12 pts), match/switch 2 (5 pts) (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson (cognitive 54) crates/dbx-driver-mongodb/src/mongo_driver.rs:3314 — dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (45 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments (cognitive 42) crates/dbx-driver-mongodb/src/mongo_shell.rs:1068 — dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 8, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_driver::bulk_write (cognitive 38) crates/dbx-driver-mongodb/src/mongo_driver.rs:2309 — dbx_driver_mongodb::mongo_driver::bulk_write has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::is_shell_regex_value_position (cognitive 28) crates/dbx-driver-mongodb/src/mongo_shell.rs:1419 — dbx_driver_mongodb::mongo_shell::is_shell_regex_value_position has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::read_shell_regex_literal (cognitive 22) crates/dbx-driver-mongodb/src/mongo_shell.rs:1300 — dbx_driver_mongodb::mongo_shell::read_shell_regex_literal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::matching_paren (cognitive 22) crates/dbx-driver-mongodb/src/mongo_shell.rs:1865 — dbx_driver_mongodb::mongo_shell::matching_paren has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::split_top_level (cognitive 22) crates/dbx-driver-mongodb/src/mongo_shell.rs:1943 — dbx_driver_mongodb::mongo_shell::split_top_level has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_oidc::wait_for_callback (cognitive 21) crates/dbx-driver-mongodb/src/mongo_oidc.rs:232 — dbx_driver_mongodb::mongo_oidc::wait_for_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation (cognitive 20) crates/dbx-driver-mongodb/src/mongo_shell.rs:228 — dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 7 (9 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::transform_shell_regex_literals (cognitive 19) crates/dbx-driver-mongodb/src/mongo_shell.rs:1359 — dbx_driver_mongodb::mongo_shell::transform_shell_regex_literals has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::transform_ejson_deserialize (cognitive 17) crates/dbx-driver-mongodb/src/mongo_shell.rs:1508 — dbx_driver_mongodb::mongo_shell::transform_ejson_deserialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::matching_bracket (cognitive 17) crates/dbx-driver-mongodb/src/mongo_shell.rs:1907 — dbx_driver_mongodb::mongo_shell::matching_bracket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_mongodb::mongo_shell::transform_shell_constructors (cognitive 16) crates/dbx-driver-mongodb/src/mongo_shell.rs:1561 — dbx_driver_mongodb::mongo_shell::transform_shell_constructors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×14
  • Duplicated block (10 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:262-271 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:336-345 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:754-763 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) REDACTED:3835 — REDACTED:3835-3844 | src-tauri/src/commands/connection.rs:1924-1933 | src-tauri/src/commands/connection.rs:2494-2503 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) REDACTED:6409 — REDACTED:6409-6418 | REDACTED:7516-7525 | REDACTED:7549-7558 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) REDACTED:1572 — REDACTED:1572-1581 | REDACTED:1766-1775 | REDACTED:2069-2078 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-core/src/data/transfer.rs:14738 — crates/dbx-core/src/data/transfer.rs:14738-14747 | crates/dbx-core/src/data/transfer.rs:14829-14838 | crates/dbx-core/src/data/transfer.rs:14887-14896 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:356 — crates/dbx-driver-mongodb/src/mongo_shell.rs:356-365 | crates/dbx-web/src/routes/mcp_policy.rs:38-47 | src-tauri/src/commands/mcp_bridge.rs:1427-1436 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:428 — crates/dbx-driver-mongodb/src/mongo_shell.rs:428-437 | crates/dbx-web/src/routes/mcp_policy.rs:110-119 | src-tauri/src/commands/mcp_bridge.rs:1499-1508 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) crates/dbx-driver-redis/src/lib.rs:729 — crates/dbx-driver-redis/src/lib.rs:729-738 | crates/dbx-driver-redis/src/lib.rs:1039-1048 | crates/dbx-driver-redis/src/lib.rs:1075-1084 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-sql-data/src/query_result_sql.rs:1138 — crates/dbx-sql-data/src/query_result_sql.rs:1138-1147 | crates/dbx-sql-data/src/query_result_sql.rs:1204-1213 | crates/dbx-sql-data/src/query_result_sql.rs:2572-2581 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:4045 — crates/dbx-sql-schema/src/schema_diff.rs:4045-4054 | crates/dbx-sql-schema/src/schema_diff.rs:4187-4196 | crates/dbx-sql-schema/src/schema_diff.rs:4234-4243 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/dbx-web/src/routes/query.rs:494 — crates/dbx-web/src/routes/query.rs:494-503 | crates/dbx-web/src/routes/query.rs:557-566 | crates/dbx-web/src/routes/query.rs:659-668 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:23 — agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:23-32 | REDACTED:1133-1142 | REDACTED:274-283 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:23` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/MetadataSqlSupport.java:22` calls `orNone` and `REDACTED:1132` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) REDACTED:3308 — REDACTED:3308-3317 | REDACTED:3330-3339 | REDACTED:5262-5271 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3308` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 3) REDACTED:4533 — REDACTED:4533-4542 | REDACTED:5260-5269 | REDACTED:6050-6059 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4533` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×14
  • Duplicated block (9 lines × 3) crates/dbx-core/src/connection/jdbc.rs:1233 — crates/dbx-core/src/connection/jdbc.rs:1233-1241 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1300-1308 | plugins/sdk/packager/src/main.rs:625-633 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) REDACTED:3598 — REDACTED:3598-3606 | src-tauri/src/commands/connection.rs:1970-1980 | src-tauri/src/commands/connection.rs:2537-2545 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) REDACTED:1219 — REDACTED:1219-1227 | crates/dbx-sql-core/src/sqlserver_temporal.rs:143-151 | REDACTED:3560-3568 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) REDACTED:4589 — REDACTED:4589-4597 | REDACTED:4678-4686 | REDACTED:4786-4794 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/dbx-core/src/schema/state_calibrator.rs:473 — crates/dbx-core/src/schema/state_calibrator.rs:473-481 | crates/dbx-core/src/schema/state_calibrator.rs:496-504 | crates/dbx-core/src/schema/state_calibrator.rs:507-515 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:541 — crates/dbx-driver-elasticsearch/src/lib.rs:541-549 | crates/dbx-drivers/src/db/solr_driver.rs:158-166 | crates/dbx-drivers/src/db/vector_driver.rs:1074-1082 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:2215 — crates/dbx-driver-mysql/src/mysql.rs:2215-2223 | crates/dbx-driver-mysql/src/mysql.rs:2822-2830 | REDACTED:3579-3587 — before extracting anything, compare `crates/dbx-driver-mysql/src/mysql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) REDACTED:238 — REDACTED:238-246 | crates/dbx-drivers/src/db/rqlite_driver.rs:117-125 | crates/dbx-drivers/src/db/turso_driver.rs:178-186 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/dbx-drivers/src/salesforce_oauth.rs:463 — crates/dbx-drivers/src/salesforce_oauth.rs:463-473 | crates/dbx-drivers/src/salesforce_oauth.rs:559-567 | crates/dbx-drivers/src/salesforce_oauth.rs:622-632 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) REDACTED:5664 — REDACTED:5664-5672 | REDACTED:5727-5737 | REDACTED:10689-10699 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:37 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:37-45 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:46-54 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:47-55 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) REDACTED:3290 — REDACTED:3290-3298 | REDACTED:5593-5601 | REDACTED:6002-6010 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:191 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:191-199 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:359-367 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:382-390 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) REDACTED:652 — REDACTED:652-660 | agents/drivers/cassandra-go/bench/agent_compare.py:325-333 | REDACTED:652-660 — before extracting anything, compare `REDACTED` and `agents/drivers/cassandra-go/bench/agent_compare.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×13
  • Duplicated block (8 lines × 3) agents/drivers/duckdb/src/sql.rs:396 — agents/drivers/duckdb/src/sql.rs:396-403 | crates/dbx-driver-mysql/src/mysql.rs:7102-7110 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4420-4428 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (8 lines × 3) crates/dbx-core/src/admin/nacos/access_control.rs:161 — crates/dbx-core/src/admin/nacos/access_control.rs:161-168 | crates/dbx-core/src/admin/nacos/access_control.rs:184-192 | crates/dbx-core/src/admin/nacos/access_control.rs:208-216 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) REDACTED:7560 — REDACTED:7560-7567 | REDACTED:7590-7597 | REDACTED:7618-7625 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:399 — crates/dbx-driver-mongodb/src/mongo_shell.rs:399-406 | crates/dbx-web/src/routes/mcp_policy.rs:81-88 | src-tauri/src/commands/mcp_bridge.rs:1470-1477 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/dbx-plugin-runtime/src/plugins/host.rs:193 — crates/dbx-plugin-runtime/src/plugins/host.rs:193-200 | crates/dbx-plugin-runtime/src/plugins/host.rs:236-243 | crates/dbx-plugin-runtime/src/plugins/host.rs:571-578 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/dbx-web/src/routes/cloud_sync.rs:411 — crates/dbx-web/src/routes/cloud_sync.rs:411-418 | crates/dbx-web/src/routes/cloud_sync.rs:465-472 | crates/dbx-web/src/routes/cloud_sync.rs:502-509 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/dbx-core/src/connection/connection_secrets.rs:947 — crates/dbx-core/src/connection/connection_secrets.rs:947-954 | crates/dbx-core/src/persistence/cloud_sync.rs:2951-2958 | REDACTED:3469-3476 — before extracting anything, compare `crates/dbx-core/src/connection/connection_secrets.rs` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/dbx-plugin-runtime/src/plugins/assets.rs:114 — crates/dbx-plugin-runtime/src/plugins/assets.rs:114-121 | crates/dbx-plugin-runtime/src/plugins/installer.rs:1316-1323 | plugins/sdk/packager/src/main.rs:637-644 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:187 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:187-194 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:213-221 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:227-235 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:187` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:186` calls `catalogBuiltinFunction`, `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:213` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:502 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:502-509 | REDACTED:2150-2157 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:417-424 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:502` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:818 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:818-825 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:887-894 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1415-1422 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:818` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:826` calls `put`, `partitions`, `size` and `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1423` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:71 — agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:71-78 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:141-148 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:75-82 — before extracting anything, compare `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` and `agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:137` calls `listTables`, `add`, `ObjectInfo` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:70` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) REDACTED:1448 — REDACTED:1448-1455 | REDACTED:2873-2880 | REDACTED:4703-4710 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D1 · Cyclomatic Complexity · dbx_driver_mysql · ×12
  • dbx_driver_mysql::mysql::mysql_column_type_name (cyclomatic 34) crates/dbx-driver-mysql/src/mysql.rs:912 — dbx_driver_mysql::mysql::mysql_column_type_name has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mysql::mysql::mysql_async_url (cyclomatic 27) crates/dbx-driver-mysql/src/mysql.rs:3015 — dbx_driver_mysql::mysql::mysql_async_url has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::find_if_not_exists_clause (cyclomatic 26) crates/dbx-driver-mysql/src/mysql.rs:6922 — dbx_driver_mysql::mysql::find_if_not_exists_clause has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::parse_mysql_enum_values (cyclomatic 23) crates/dbx-driver-mysql/src/mysql.rs:4971 — dbx_driver_mysql::mysql::parse_mysql_enum_values has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn (cyclomatic 21) crates/dbx-driver-mysql/src/mysql.rs:5740 — dbx_driver_mysql::mysql::execute_result_sets_with_text_protocol_on_conn has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode (cyclomatic 18) crates/dbx-driver-mysql/src/mysql.rs:2004 — dbx_driver_mysql::mysql::mysql_group_concat_setup_fallback_mode has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::ssl_fallback_url (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:2772 — dbx_driver_mysql::mysql::ssl_fallback_url has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::completion_assistant_search (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:3479 — dbx_driver_mysql::mysql::completion_assistant_search has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::list_objects (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:4488 — dbx_driver_mysql::mysql::list_objects has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::execute_non_result_batch_on_conn (cyclomatic 17) crates/dbx-driver-mysql/src/mysql.rs:6740 — dbx_driver_mysql::mysql::execute_non_result_batch_on_conn has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback (cyclomatic 16) crates/dbx-driver-mysql/src/mysql.rs:1747 — dbx_driver_mysql::mysql::verify_pool_connection_with_setup_fallback has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments (cyclomatic 16) crates/dbx-driver-mysql/src/mysql.rs:7087 — dbx_driver_mysql::mysql::skip_sql_whitespace_and_comments has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: dbx_driver_mysql::mysql::fix_potential_double_encoding (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D10 · Test Quality · Fixed-sleep synchronisation · ×12
  • Fixed-sleep synchronisation: compiled UI output waits for a successful build signal plugins/sdk/dev-host/tests/server.test.mjs:138 — This test starts work it did not wait for (`revision`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 650))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: clears sticky subtree loading when health-check reconnect bumps revision apps/desktop/src/stores/__tests__/connectionStore.metadataLoading.spec.ts:3235 — This test starts work it did not wait for (`store`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 2100))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: cancels source and target schema compares and drains metadata before disconnecting pools apps/desktop/src/stores/__tests__/connectionStore.oneTimeCleanup.spec.ts:75 — This test starts work it did not wait for (`disconnecting`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: waits for the other namespace when %s fails apps/desktop/src/lib/metadata/__tests__/objectDdlCache.spec.ts:337 — This test starts work it did not wait for (`outcome`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: reports an in-flight DDL outcome as unknown after its generation changes apps/desktop/src/lib/database/__tests__/oracleConstraints.spec.ts:617 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: reports an in-flight DDL outcome as unknown after the generation changes apps/desktop/src/lib/database/__tests__/oracleForeignKeys.spec.ts:387 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: keeps a resolved DDL committed when only the UI target changes in flight apps/desktop/src/lib/database/__tests__/oracleForeignKeys.spec.ts:428 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: preflights self-reference before CREATE and executes each statement once apps/desktop/src/lib/database/__tests__/oracleForeignKeys.spec.ts:631 — This test starts work it did not wait for (`pendingLateCreate`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: stops queued metadata after cancellation and waits for every issued request apps/desktop/src/lib/__tests__/schema/schemaDiffMetadataLoad.spec.ts:21 — This test starts work it did not wait for (`rejection`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: disconnecting either side stops the compare after its issued table-list requests settle apps/desktop/src/composables/__tests__/useSchemaDiffSession.spec.ts:26 — This test starts work it did not wait for (`cancellation`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: detaches a reused tab only after the fresh reload settles, not on its stale errored result apps/desktop/src/composables/__tests__/useSidebarDataOpenRuntime.spec.ts:591 — This test starts work it did not wait for (`opened`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: retains search filter results after editing a cell on a paginated table apps/desktop/src/components/grid/__tests__/DataGridSearchCellEditRetention.spec.ts:71 — This test starts work it did not wait for (`gridRef`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 100))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×12
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:121 — crates/dbx-core/src/admin/consul/blocking.rs:121-137 | crates/dbx-core/src/admin/consul/blocking.rs:176-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:277 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:277-293 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:446-462 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:505 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:505-521 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:756-772 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:764 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:764-780 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:1062-1078 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/data/mongodb_import_export.rs:1872 — crates/dbx-core/src/data/mongodb_import_export.rs:1872-1888 | crates/dbx-core/src/data/mongodb_import_export.rs:1947-1963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:549 — crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:549-565 | crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition.rs:581-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:207 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:207-223 | crates/dbx-drivers/src/salesforce_oauth.rs:284-300 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/dbx-sql-core/src/query_execution_sql.rs:1156 — crates/dbx-sql-core/src/query_execution_sql.rs:1156-1172 | crates/dbx-sql-core/src/query_execution_sql.rs:1238-1254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:158 — crates/dbx-web/src/routes/mongodb_import_export.rs:158-174 | crates/dbx-web/src/routes/table_import.rs:158-174 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) REDACTED:1704 — REDACTED:1704-1720 | agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:139-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (17 lines × 2) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1138 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1138-1154 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1307-1323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1138` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) REDACTED:113 — REDACTED:113-129 | REDACTED:113-129 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · dbx · ×11
  • dbx::commands::connection::test_connection_with_info_impl (cyclomatic 81) src-tauri/src/commands/connection.rs:1567 — dbx::commands::connection::test_connection_with_info_impl has cyclomatic complexity 81 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx::commands::connection::connect_db_inner (cyclomatic 66) src-tauri/src/commands/connection.rs:2229 — dbx::commands::connection::connect_db_inner has cyclomatic complexity 66 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx::run (cyclomatic 60) src-tauri/src/lib.rs:1801 — dbx::run has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::mcp_bridge::start (cyclomatic 31) src-tauri/src/commands/mcp_bridge.rs:311 — dbx::commands::mcp_bridge::start has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::commands::mcp_bridge::handle_sql_approval (cyclomatic 24) src-tauri/src/commands/mcp_bridge.rs:1683 — dbx::commands::mcp_bridge::handle_sql_approval has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::commands::global_search::search_root (cyclomatic 19) src-tauri/src/commands/global_search.rs:150 — dbx::commands::global_search::search_root has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::list_sql_files::scan_sql_files_with_diagnostics (cyclomatic 19) src-tauri/src/commands/list_sql_files.rs:239 — dbx::commands::list_sql_files::scan_sql_files_with_diagnostics has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::commands::mcp_bridge::mongo_pure_field_predicate (cyclomatic 19) src-tauri/src/commands/mcp_bridge.rs:1510 — dbx::commands::mcp_bridge::mongo_pure_field_predicate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx::commands::plugin_file::drop::open_dropped_plugin_files (cyclomatic 17) src-tauri/src/commands/plugin_file/drop.rs:31 — dbx::commands::plugin_file::drop::open_dropped_plugin_files has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx::locale_family (cyclomatic 16) src-tauri/src/lib.rs:846 — dbx::locale_family has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx::background_backup::run_if_requested (cyclomatic 16) src-tauri/src/background_backup.rs:369 — dbx::background_backup::run_if_requested has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · Storage · ×11
  • Storage::inspect_data_migration_with_error_cache (cognitive 49) REDACTED:1797 — Storage::inspect_data_migration_with_error_cache has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 16, match/switch 4 (7 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Storage::load_connections (cognitive 35) REDACTED:7693 — Storage::load_connections has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 5 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Storage::cleanup_migration_backups (cognitive 25) REDACTED:2227 — Storage::cleanup_migration_backups has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::start_data_migration (cognitive 20) REDACTED:2116 — Storage::start_data_migration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::apply_sync_import_transaction (cognitive 20) REDACTED:7040 — Storage::apply_sync_import_transaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::verify_migration (cognitive 19) REDACTED:2452 — Storage::verify_migration has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (6 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::load_ai_configs (cognitive 19) REDACTED:4731 — Storage::load_ai_configs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::append_mqtt_history_messages (cognitive 19) REDACTED:7471 — Storage::append_mqtt_history_messages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::finalize_legacy_json_files (cognitive 17) REDACTED:2526 — Storage::finalize_legacy_json_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::load_ai_provider_configs (cognitive 17) REDACTED:4639 — Storage::load_ai_provider_configs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Storage::prune_tab_runtime_cache (cognitive 16) REDACTED:9000 — Storage::prune_tab_runtime_cache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_sqlserver · ×11
  • dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens (cognitive 38) crates/dbx-driver-sqlserver/src/sqlserver.rs:1794 — dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::try_connect (cognitive 31) crates/dbx-driver-sqlserver/src/sqlserver.rs:511 — dbx_driver_sqlserver::sqlserver::try_connect has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::collect_ordered_result_sets_limited (cognitive 26) crates/dbx-driver-sqlserver/src/sqlserver.rs:2037 — dbx_driver_sqlserver::sqlserver::collect_ordered_result_sets_limited has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::stream_first_result_set (cognitive 26) crates/dbx-driver-sqlserver/src/sqlserver.rs:2106 — dbx_driver_sqlserver::sqlserver::stream_first_result_set has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (8 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::first_sql_tokens (cognitive 26) crates/dbx-driver-sqlserver/src/sqlserver.rs:4409 — dbx_driver_sqlserver::sqlserver::first_sql_tokens has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 8, if/else 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql (cognitive 25) crates/dbx-driver-sqlserver/src/sqlserver.rs:2727 — dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_driver_sqlserver::sqlserver::build_sqlserver_unsafe_type_query (cognitive 24) crates/dbx-driver-sqlserver/src/sqlserver.rs:1460 — dbx_driver_sqlserver::sqlserver::build_sqlserver_unsafe_type_query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json (cognitive 20) crates/dbx-driver-sqlserver/src/sqlserver.rs:2203 — dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_sqlserver::sqlserver::sqlserver_balanced_transaction_batch_can_use_execute (cognitive 18) crates/dbx-driver-sqlserver/src/sqlserver.rs:4168 — dbx_driver_sqlserver::sqlserver::sqlserver_balanced_transaction_batch_can_use_execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::collect_first_result_limited (cognitive 16) crates/dbx-driver-sqlserver/src/sqlserver.rs:909 — dbx_driver_sqlserver::sqlserver::collect_first_result_limited has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_sqlserver::sqlserver::describe_sqlserver_result_set_with_mode (cognitive 16) crates/dbx-driver-sqlserver/src/sqlserver.rs:1131 — dbx_driver_sqlserver::sqlserver::describe_sqlserver_result_set_with_mode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×11
  • Duplicated block (10–11 lines × 2) crates/dbx-core/src/data/transfer.rs:9294 — crates/dbx-core/src/data/transfer.rs:9294-9304 | crates/dbx-core/src/data/transfer.rs:9363-9372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:2186 — crates/dbx-driver-mysql/src/mysql.rs:2186-2196 | crates/dbx-driver-mysql/src/mysql.rs:2789-2798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1462 — crates/dbx-sql-data/src/query_result_sql.rs:1462-1471 | crates/dbx-sql-data/src/query_result_sql.rs:1745-1755 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:915 — crates/dbx-sql-schema/src/schema_diff.rs:915-925 | crates/dbx-sql-schema/src/schema_diff.rs:993-1002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:1031 — crates/dbx-sql-schema/src/schema_diff.rs:1031-1040 | crates/dbx-sql-schema/src/schema_diff.rs:1043-1053 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/dbx-web/src/routes/connection.rs:1008 — crates/dbx-web/src/routes/connection.rs:1008-1018 | crates/dbx-web/src/routes/connection.rs:1139-1148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) src-tauri/src/commands/connection.rs:2358 — src-tauri/src/commands/connection.rs:2358-2367 | src-tauri/src/commands/connection.rs:2692-2702 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:494 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:494-503 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:748-758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:494` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) REDACTED:726 — REDACTED:726-735 | REDACTED:769-779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:736` calls `contains` and `REDACTED:780` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10–11 lines × 2) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:257 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:257-267 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:417-426 — before extracting anything, compare `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` and `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:257` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:122 — agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:122-131 | REDACTED:2654-2664 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:132` calls `logger`, `warn` and `REDACTED:2665` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×11
  • Outbound HTTP without resilience REDACTED:158 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:204 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:390 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:211 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:222 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience agents/scripts/build_driver_zips.py:114 — `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-core/src/persistence/cloud_sync.rs:1880 — `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-core/src/persistence/cloud_sync.rs:1990 — `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-core/src/persistence/cloud_sync.rs:1999 — `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-driver-agent/src/agent_manager.rs:1588 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:67 — `Client::builder()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D2 · Cognitive Complexity · dbx_web · ×10
  • dbx_web::routes::mongodb_dump::receive_source (cognitive 65) crates/dbx-web/src/routes/mongodb_dump.rs:87 — dbx_web::routes::mongodb_dump::receive_source has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (51 pts), boolean chains 7, loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_web::credentials::restore (cognitive 37) crates/dbx-web/src/credentials.rs:196 — dbx_web::credentials::restore has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_web::routes::mongodb_import_export::preview_import (cognitive 31) crates/dbx-web/src/routes/mongodb_import_export.rs:112 — dbx_web::routes::mongodb_import_export::preview_import has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (20 pts), if/else 5 (10 pts), loops 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::routes::table_import::preview_import (cognitive 31) crates/dbx-web/src/routes/table_import.rs:108 — dbx_web::routes::table_import::preview_import has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (20 pts), if/else 5 (10 pts), loops 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::routes::connection::run_prepared_temporary_connection_test (cognitive 29) crates/dbx-web/src/routes/connection.rs:354 — dbx_web::routes::connection::run_prepared_temporary_connection_test has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 5 (12 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_web::routes::connection::plan_connection_config_sync (cognitive 27) crates/dbx-web/src/routes/connection.rs:1190 — dbx_web::routes::connection::plan_connection_config_sync has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2, match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_web::serve (cognitive 23) crates/dbx-web/src/main.rs:519 — dbx_web::serve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (17 pts), match/switch 5, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_web::routes::redis_pubsub_ws::handle_monitor_socket (cognitive 19) crates/dbx-web/src/routes/redis_pubsub_ws.rs:76 — dbx_web::routes::redis_pubsub_ws::handle_monitor_socket has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (8 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::credentials::restore_value (cognitive 17) crates/dbx-web/src/credentials.rs:71 — dbx_web::credentials::restore_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_web::routes::transfer::start_transfer (cognitive 16) crates/dbx-web/src/routes/transfer.rs:85 — dbx_web::routes::transfer::start_transfer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · dbx_driver_redis · ×10
  • dbx_driver_redis::parse_command_argv (cognitive 56) crates/dbx-driver-redis/src/lib.rs:2565 — dbx_driver_redis::parse_command_argv has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (47 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_redis::scan_keys_batch_inner (cognitive 52) crates/dbx-driver-redis/src/lib.rs:3156 — dbx_driver_redis::scan_keys_batch_inner has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 4 (12 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::get_slowlog (cognitive 25) crates/dbx-driver-redis/src/lib.rs:2938 — dbx_driver_redis::get_slowlog has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (6 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::list_keyspace_databases (cognitive 23) crates/dbx-driver-redis/src/lib.rs:1609 — dbx_driver_redis::list_keyspace_databases has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_redis::scan_cluster_values_page_with (cognitive 23) crates/dbx-driver-redis/src/lib.rs:2149 — dbx_driver_redis::scan_cluster_values_page_with has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::scan_values_page_inner (cognitive 20) crates/dbx-driver-redis/src/lib.rs:3310 — dbx_driver_redis::scan_values_page_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::connect_cluster (cognitive 17) crates/dbx-driver-redis/src/lib.rs:959 — dbx_driver_redis::connect_cluster has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::attach_hash_field_ttls (cognitive 17) crates/dbx-driver-redis/src/lib.rs:5444 — dbx_driver_redis::attach_hash_field_ttls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, match/switch 2 (3 pts), loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_driver_redis::scan_cluster_keys_batch_on_session (cognitive 16) crates/dbx-driver-redis/src/lib.rs:2041 — dbx_driver_redis::scan_cluster_keys_batch_on_session has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_redis::load_more_collection_scoped (cognitive 16) crates/dbx-driver-redis/src/lib.rs:4923 — dbx_driver_redis::load_more_collection_scoped has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyFields · ×10
  • TooManyFields: KvPrometheusMetrics crates/dbx-core/src/ai/agent_kv.rs:369 — TooManyFields — 89 stored fields. The bar is 30 stored fields; this is 59 over it, 2.97× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: ConnectionConfig crates/dbx-types/src/models/connection.rs:156 — TooManyFields — 70 stored fields beside 38 methods. The bar is 30 stored fields; this is 40 over it, 2.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: ConnectionConfigData crates/dbx-types/src/models/connection.rs:732 — TooManyFields — 70 stored fields. The bar is 30 stored fields; this is 40 over it, 2.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: DdlDialectProfile crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:100 — TooManyFields — 48 stored fields beside 6 methods. The bar is 30 stored fields; this is 18 over it, 1.60× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: QueryResultExportRequest REDACTED:75 — TooManyFields — 37 stored fields. The bar is 30 stored fields; this is 7 over it, 1.23× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: AppState REDACTED:444 — TooManyFields — 35 stored fields beside 179 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: SchemaDiffPreparationOptions crates/dbx-sql-schema/src/schema_diff.rs:500 — TooManyFields — 35 stored fields beside 10 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: AiConfig crates/dbx-ai-provider/src/ai.rs:410 — TooManyFields — 34 stored fields. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: DdlCapabilitiesYaml REDACTED:86 — TooManyFields — 33 stored fields beside 1 method. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: MqCapabilities crates/dbx-core/src/admin/mq/types.rs:37 — TooManyFields — 32 stored fields. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×10
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:441 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:441-468 | crates/dbx-ai-provider/src/ai_codex_cli.rs:975-999 | crates/dbx-ai-provider/src/ai_grok_cli.rs:650-688 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:533-543 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:574-584 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:6373 — REDACTED:6373-6433 | REDACTED:7507-7536 | REDACTED:7539-7567 | REDACTED:7569-7597 | REDACTED:7599-7625 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:1094 — REDACTED:1094-1538 | REDACTED:1547-1738 | REDACTED:1747-2034 | REDACTED:2043-2241 | REDACTED:2250-2438 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:5357 — REDACTED:5357-5377 | REDACTED:6151-6172 | REDACTED:6174-6195 | REDACTED:6197-6217 | REDACTED:6228-6250 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:430 — crates/dbx-core/src/schema/mod.rs:430-460 | crates/dbx-core/src/schema/mod.rs:500-513 | crates/dbx-core/src/schema/mod.rs:535-548 | crates/dbx-core/src/schema/mod.rs:570-582 | crates/dbx-core/src/schema/mod.rs:604-616 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-core/src/schema/mod.rs:1070 — crates/dbx-core/src/schema/mod.rs:1070-1086 | crates/dbx-core/src/schema/mod.rs:1094-1110 | crates/dbx-core/src/schema/mod.rs:1112-1122 | crates/dbx-core/src/schema/mod.rs:1129-1139 | crates/dbx-core/src/schema/mod.rs:1147-1157 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-driver-sqlserver/src/sqlserver.rs:1861 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1861-1873 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1875-1887 | crates/dbx-sql-data/src/query_result_sql.rs:2025-2040 | crates/dbx-sql-data/src/query_result_sql.rs:2042-2060 | crates/dbx-sql-data/src/query_result_sql.rs:2717-2729 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/dbx-mcp/src/server.rs:2239 — crates/dbx-mcp/src/server.rs:2239-2308 | crates/dbx-mcp/src/server.rs:2483-2562 | crates/dbx-mcp/src/server.rs:3044-3120 | crates/dbx-mcp/src/server.rs:3130-3150 | crates/dbx-mcp/src/server.rs:3160-3237 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:34 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:34-45 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:43-54 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:38-50 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:95-113 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:44-55 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:190 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:190-203 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:148-161 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:268-281 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:292-305 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:158-171 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×10
  • Duplicated block (19 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:524 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:524-542 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:775-793 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) REDACTED:1552 — REDACTED:1552-1570 | REDACTED:2049-2067 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) REDACTED:1696 — REDACTED:1696-1714 | REDACTED:2402-2420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) REDACTED:1313 — REDACTED:1313-1331 | REDACTED:1343-1361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:262 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:262-280 | crates/dbx-drivers/src/salesforce_oauth.rs:339-357 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) crates/dbx-drivers/src/db/dynamodb_driver.rs:586 — crates/dbx-drivers/src/db/dynamodb_driver.rs:586-604 | REDACTED:1214-1232 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (19 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1529 — crates/dbx-sql-data/src/query_result_sql.rs:1529-1547 | crates/dbx-sql-data/src/query_result_sql.rs:1622-1640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:732 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:732-750 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:1020-1038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/dbx-types/src/models/connection.rs:1335 — crates/dbx-types/src/models/connection.rs:1335-1353 | crates/dbx-types/src/models/connection.rs:1518-1536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:123 — crates/dbx-web/src/routes/mongodb_import_export.rs:123-141 | crates/dbx-web/src/routes/table_import.rs:121-139 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
R11 · Import Boundaries · Boundary violation [package · ×10
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/diagram/elk-layout.ts:1 — apps/desktop/src/lib/diagram/elk-layout.ts:1 imports elkjs/lib/elk.bundled.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:60 — apps/desktop/src/lib/sql/layout/internals.ts:60 imports sql-formatter/dist/esm/parser/createParser.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:61 — apps/desktop/src/lib/sql/layout/internals.ts:61 imports sql-formatter/dist/esm/dialect.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:62 — apps/desktop/src/lib/sql/layout/internals.ts:62 imports sql-formatter/dist/esm/allDialects.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:63 — apps/desktop/src/lib/sql/layout/internals.ts:63 imports sql-formatter/dist/esm/formatter/ExpressionFormatter.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:64 — apps/desktop/src/lib/sql/layout/internals.ts:64 imports sql-formatter/dist/esm/formatter/InlineLayout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:65 — apps/desktop/src/lib/sql/layout/internals.ts:65 imports sql-formatter/dist/esm/formatter/Params.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:66 — apps/desktop/src/lib/sql/layout/internals.ts:66 imports sql-formatter/dist/esm/formatter/Layout.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] apps/desktop/src/lib/sql/layout/internals.ts:67 — apps/desktop/src/lib/sql/layout/internals.ts:67 imports sql-formatter/dist/esm/formatter/Indentation.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:test-cross-package-internals] packages/app-tests/mongoShellCommand.test.ts:43 — packages/app-tests/mongoShellCommand.test.ts:43 reaches past another workspace package's public entry into its internals with a relative path (../mongo-shell/src/json.ts) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
D1 · Cyclomatic Complexity · dbx_driver_mongodb · ×9
  • dbx_driver_mongodb::mongo_shell::parse (cyclomatic 144) crates/dbx-driver-mongodb/src/mongo_shell.rs:549 — dbx_driver_mongodb::mongo_shell::parse has cyclomatic complexity 144 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation (cyclomatic 26) crates/dbx-driver-mongodb/src/mongo_shell.rs:228 — dbx_driver_mongodb::mongo_shell::parse_bulk_write_operation has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments (cyclomatic 26) crates/dbx-driver-mongodb/src/mongo_shell.rs:1068 — dbx_driver_mongodb::mongo_shell::trim_mongo_outer_comments has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson (cyclomatic 21) crates/dbx-driver-mongodb/src/mongo_driver.rs:3314 — dbx_driver_mongodb::mongo_driver::json_filter_value_to_bson has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::mongo_pure_field_predicate (cyclomatic 19) crates/dbx-driver-mongodb/src/mongo_shell.rs:439 — dbx_driver_mongodb::mongo_shell::mongo_pure_field_predicate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mongodb::mongo_shell::shell_constructor_to_extended_json (cyclomatic 17) crates/dbx-driver-mongodb/src/mongo_shell.rs:1661 — dbx_driver_mongodb::mongo_shell::shell_constructor_to_extended_json has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_mongodb::mongo_driver::bulk_write (cyclomatic 16) crates/dbx-driver-mongodb/src/mongo_driver.rs:2309 — dbx_driver_mongodb::mongo_driver::bulk_write has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::read_shell_regex_literal (cyclomatic 16) crates/dbx-driver-mongodb/src/mongo_shell.rs:1300 — dbx_driver_mongodb::mongo_shell::read_shell_regex_literal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_mongodb::mongo_shell::split_top_level (cyclomatic 16) crates/dbx-driver-mongodb/src/mongo_shell.rs:1943 — dbx_driver_mongodb::mongo_shell::split_top_level has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · AppState · ×9
  • AppState::get_or_create_pool_for_session_inner_with_receipt (cognitive 169) REDACTED:3456 — AppState::get_or_create_pool_for_session_inner_with_receipt has cognitive complexity 169 (threshold 15). Drivers by points: if/else 55 (115 pts), match/switch 9 (29 pts), loops 5 (18 pts), boolean chains 7 (nesting depth added 93). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • AppState::refresh_connections (cognitive 103) REDACTED:6936 — AppState::refresh_connections has cognitive complexity 103 (threshold 15). Drivers by points: match/switch 24 (72 pts), if/else 12 (23 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 60). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • AppState::remove_stale_connection_pool (cognitive 61) REDACTED:5430 — AppState::remove_stale_connection_pool has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 25 (53 pts), if/else 6 (8 pts) (nesting depth added 30). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • AppState::start_keepalive_task (cognitive 52) REDACTED:2823 — AppState::start_keepalive_task has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (41 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::insert_connection_pool_inner (cognitive 45) REDACTED:2505 — AppState::insert_connection_pool_inner has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::prepare_connection_transport_with_claimant (cognitive 32) REDACTED:4480 — AppState::prepare_connection_transport_with_claimant has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • AppState::mq_admin_config_for_connection (cognitive 22) REDACTED:5176 — AppState::mq_admin_config_for_connection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::restore_reclaimed_agent_pool (cognitive 17) REDACTED:6313 — AppState::restore_reclaimed_agent_pool has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AppState::sweep_idle_connections (cognitive 17) REDACTED:7330 — AppState::sweep_idle_connections has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_elasticsearch · ×9
  • dbx_driver_elasticsearch::parse_aggregations (cognitive 58) crates/dbx-driver-elasticsearch/src/lib.rs:3195 — dbx_driver_elasticsearch::parse_aggregations has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 5 (15 pts), match/switch 2 (7 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • dbx_driver_elasticsearch::adapt_elasticsearch_sql_query (cognitive 27) crates/dbx-driver-elasticsearch/src/lib.rs:2888 — dbx_driver_elasticsearch::adapt_elasticsearch_sql_query has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::normalize_elasticsearch_rest_path (cognitive 25) crates/dbx-driver-elasticsearch/src/lib.rs:2069 — dbx_driver_elasticsearch::normalize_elasticsearch_rest_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::es_send_page (cognitive 23) crates/dbx-driver-elasticsearch/src/lib.rs:1233 — dbx_driver_elasticsearch::es_send_page has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 7 (9 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::execute_sql_query (cognitive 23) crates/dbx-driver-elasticsearch/src/lib.rs:2807 — dbx_driver_elasticsearch::execute_sql_query has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::collect_mapping_columns (cognitive 21) crates/dbx-driver-elasticsearch/src/lib.rs:805 — dbx_driver_elasticsearch::collect_mapping_columns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::es_execute_paged_search (cognitive 21) crates/dbx-driver-elasticsearch/src/lib.rs:1357 — dbx_driver_elasticsearch::es_execute_paged_search has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::translate_field_operator_filter (cognitive 20) crates/dbx-driver-elasticsearch/src/lib.rs:1762 — dbx_driver_elasticsearch::translate_field_operator_filter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_elasticsearch::parse_select_star_search_query (cognitive 20) crates/dbx-driver-elasticsearch/src/lib.rs:2669 — dbx_driver_elasticsearch::parse_select_star_search_query has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×9
  • Duplicated block (18 lines × 2) REDACTED:1203 — REDACTED:1203-1220 | REDACTED:1254-1271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) REDACTED:1331 — REDACTED:1331-1348 | REDACTED:6647-6664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-driver-mongodb/src/mongo_shell.rs:1866 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1866-1883 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1908-1925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-driver-mongodb/src/mongo_shell.rs:1875 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1875-1892 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1958-1975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:554 — crates/dbx-drivers/src/db/ssh_tunnel.rs:554-571 | crates/dbx-drivers/src/db/ssh_tunnel.rs:648-665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-web/src/routes/query.rs:495 — crates/dbx-web/src/routes/query.rs:495-512 | crates/dbx-web/src/routes/query.rs:660-677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/dbx-web/src/routes/tunnel_profiles.rs:88 — crates/dbx-web/src/routes/tunnel_profiles.rs:88-105 | src-tauri/src/commands/tunnel_profiles.rs:58-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (18 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:6119 — crates/dbx-sql-schema/src/schema_diff.rs:6119-6139 | crates/dbx-sql-schema/src/schema_diff.rs:6164-6181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) REDACTED:26 — REDACTED:26-43 | REDACTED:26-43 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×9
  • Duplicated block (6 lines × 4) crates/dbx-ai-provider/src/ai_codex_cli.rs:989 — crates/dbx-ai-provider/src/ai_codex_cli.rs:989-994 | crates/dbx-ai-provider/src/ai_grok_cli.rs:679-684 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:537-543 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:578-584 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_grok_cli.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) REDACTED:3643 — REDACTED:3643-3648 | REDACTED:3657-3662 | REDACTED:4390-4395 | REDACTED:4401-4406 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) crates/dbx-drivers/src/db/sqlite.rs:1555 — crates/dbx-drivers/src/db/sqlite.rs:1555-1560 | crates/dbx-drivers/src/db/sqlite.rs:1632-1637 | crates/dbx-drivers/src/db/sqlite.rs:2644-2649 | crates/dbx-drivers/src/db/sqlite.rs:2741-2746 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) crates/dbx-drivers/src/db/sqlite.rs:1597 — crates/dbx-drivers/src/db/sqlite.rs:1597-1602 | crates/dbx-drivers/src/db/sqlite.rs:2539-2544 | crates/dbx-drivers/src/db/sqlite.rs:2622-2627 | crates/dbx-drivers/src/db/sqlite.rs:2696-2701 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) crates/dbx-web/src/routes/consul.rs:252 — crates/dbx-web/src/routes/consul.rs:252-257 | crates/dbx-web/src/routes/consul.rs:282-287 | crates/dbx-web/src/routes/consul.rs:292-297 | crates/dbx-web/src/routes/etcd.rs:197-202 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:153 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:153-158 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:233-238 | crates/dbx-ai-provider/src/ai_grok_cli.rs:203-208 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:85-90 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:133 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:133-138 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:72-78 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:142-148 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:76-82 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:130 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:130-135 | REDACTED:3450-3455 | REDACTED:3464-3469 | REDACTED:5509-5514 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:508 — agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:508-513 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:318-323 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:250-255 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:271-276 — before extracting anything, compare `agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:325` calls `buildUrl`, `getHost`, `getPort` and `agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:515` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D5 · Coupling · Off the main sequence · ×9
  • Off the main sequence: dbx-formats — dbx-formats: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-platform — dbx-platform: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: dbx-plugin-packager — dbx-plugin-packager: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-sqlite-worker — dbx-sqlite-worker: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: dbx-types — dbx-types: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
  • Off the main sequence: dbx-sql-core — dbx-sql-core: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: dbx-sql-dialect — dbx-sql-dialect: abstractness 0.02, instability 0.17, distance 0.81 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: dbx-driver-support — dbx-driver-support: abstractness 0.00, instability 0.22, distance 0.78 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: dbx-mcp — dbx-mcp: abstractness 0.03, instability 0.25, distance 0.72 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×9
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/table/oracleTypeManagementRecord.ts:5 — `typeManagementRecordsEqual` is exported, takes a document from its caller (line 3) and hands it to `canonical`, which calls itself at line 5 (`canonical`) with a piece of `value` (and at line 11) — and nowhere in `canonical` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonical` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/redis/redisCommandDocs.ts:195 — `parseRedisCommandDocumentation` is exported, takes a document from its caller (line 176) and hands it to `collect`, which calls itself at line 195 (`collect`) with a piece of `rawDocs` — and nowhere in `collect` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collect` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/redis/redisCommandDocs.ts:225 — `parseRedisCommandDocumentation` is exported, takes a document from its caller (line 176) and hands it to `collect`, which calls itself at line 225 (`collect`) with a piece of `rawValue` (and at line 229, line 235, line 237) — and nowhere in `collect` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collect` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/redis/codec/pickle.ts:615 — `toJsonable` is exported and takes `value: unknown` from its caller, and it calls itself at line 615 (`toJsonable`) with a piece of `value` (and at line 617, line 622) — and nowhere in `toJsonable` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `toJsonable` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/mongo/mongoDocumentValues.ts:213 — `mongoDocumentDisplayText` is exported and takes `value: unknown` from its caller, and it calls itself at line 213 (`mongoDocumentDisplayText`) with a piece of `value` (and at line 219) — and nowhere in `mongoDocumentDisplayText` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `mongoDocumentDisplayText` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/mongo/mongoDocumentValues.ts:275 — `mongoDocumentRelaxedExtendedJson` is exported and takes `value: unknown` from its caller, and it calls itself at line 275 (`mongoDocumentRelaxedExtendedJson`) with a piece of `value` (and at line 277) — and nowhere in `mongoDocumentRelaxedExtendedJson` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `mongoDocumentRelaxedExtendedJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/mongo/mongoDocumentValues.ts:688 — `formatMongoShellLiteral` is exported and takes `value: unknown` from its caller, and it calls itself at line 688 (`formatMongoShellLiteral`) with a piece of `value` (and at line 704) — and nowhere in `formatMongoShellLiteral` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `formatMongoShellLiteral` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/lib/dataGrid/dataGridDetail.ts:237 — `jsonDetailDisplayValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 237 (`jsonDetailDisplayValue`) with a piece of `value` (and at line 239) — and nowhere in `jsonDetailDisplayValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `jsonDetailDisplayValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap apps/desktop/src/components/transfer/queryResultTransferValues.ts:366 — `queryResultTransferSqlLiteral` is exported, takes a document from its caller (line 412) and hands it to `postgresArrayLiteral`, which calls itself at line 366 (`postgresArrayLiteral`) with a piece of `value` — and nowhere in `postgresArrayLiteral` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `postgresArrayLiteral` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D1 · Cyclomatic Complexity · dbx_ai_provider · ×8
  • dbx_ai_provider::ai::stream_claude_with_tools (cyclomatic 38) crates/dbx-ai-provider/src/ai.rs:4403 — dbx_ai_provider::ai::stream_claude_with_tools has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai::stream_openai_with_tools (cyclomatic 31) crates/dbx-ai-provider/src/ai.rs:4628 — dbx_ai_provider::ai::stream_openai_with_tools has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai_pi_agent_cli::emit_pi_event (cyclomatic 22) crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:655 — dbx_ai_provider::ai_pi_agent_cli::emit_pi_event has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai::stream_openai (cyclomatic 20) crates/dbx-ai-provider/src/ai.rs:3939 — dbx_ai_provider::ai::stream_openai has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent (cyclomatic 20) crates/dbx-ai-provider/src/ai_cli_agent.rs:1073 — dbx_ai_provider::ai_cli_agent::run_cli_jsonl_agent has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_ai_provider::ai::stream_responses_with_tools (cyclomatic 19) crates/dbx-ai-provider/src/ai.rs:4821 — dbx_ai_provider::ai::stream_responses_with_tools has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_ai_provider::ai::classify_error (cyclomatic 18) crates/dbx-ai-provider/src/ai.rs:3402 — dbx_ai_provider::ai::classify_error has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • dbx_ai_provider::ai::build_gemini_contents (cyclomatic 17) crates/dbx-ai-provider/src/ai.rs:4980 — dbx_ai_provider::ai::build_gemini_contents has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiProvider::as_str (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dbx_driver_agent · ×8
  • dbx_driver_agent::agent_service::download_with_progress (cyclomatic 37) crates/dbx-driver-agent/src/agent_service.rs:2177 — dbx_driver_agent::agent_service::download_with_progress has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_service::import_offline_zip (cyclomatic 37) crates/dbx-driver-agent/src/agent_service.rs:3186 — dbx_driver_agent::agent_service::import_offline_zip has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits (cyclomatic 26) crates/dbx-driver-agent/src/agent_offline_export.rs:695 — dbx_driver_agent::agent_offline_export::append_jre_tree_with_limits has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_service::is_macho_binary_for_cpu (cyclomatic 21) crates/dbx-driver-agent/src/agent_service.rs:4454 — dbx_driver_agent::agent_service::is_macho_binary_for_cpu has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_connection::agent_connect_params_with_role (cyclomatic 20) crates/dbx-driver-agent/src/agent_connection.rs:95 — dbx_driver_agent::agent_connection::agent_connect_params_with_role has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_agent::backend_error::consume_sensitive_value (cyclomatic 19) crates/dbx-driver-agent/src/backend_error.rs:1098 — dbx_driver_agent::backend_error::consume_sensitive_value has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_agent::agent_service::install_agent_driver_from_registry (cyclomatic 16) crates/dbx-driver-agent/src/agent_service.rs:1719 — dbx_driver_agent::agent_service::install_agent_driver_from_registry has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_agent::agent_service::open_agent_download_response (cyclomatic 16) crates/dbx-driver-agent/src/agent_service.rs:2419 — dbx_driver_agent::agent_service::open_agent_download_response has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_postgres · ×8
  • dbx_driver_postgres::postgres::pg_ndim_array_element_json (cyclomatic 30) REDACTED:413 — dbx_driver_postgres::postgres::pg_ndim_array_element_json has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::completion_assistant_search_inner (cyclomatic 30) REDACTED:4080 — dbx_driver_postgres::postgres::completion_assistant_search_inner has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::classify_pg_type (cyclomatic 29) REDACTED:1035 — dbx_driver_postgres::postgres::classify_pg_type has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_postgres::postgres::pg_value_to_json_classified (cyclomatic 29) REDACTED:1119 — dbx_driver_postgres::postgres::pg_value_to_json_classified has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_postgres::postgres::postgres_connection_url (cyclomatic 23) REDACTED:3480 — dbx_driver_postgres::postgres::postgres_connection_url has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::build_custom_type_ddl (cyclomatic 22) REDACTED:7833 — dbx_driver_postgres::postgres::build_custom_type_ddl has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_postgres::postgres::pg_temporal_array_text_to_json (cyclomatic 20) REDACTED:1284 — dbx_driver_postgres::postgres::pg_temporal_array_text_to_json has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (parse_array, parse_quoted, normalize_array_value, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • dbx_driver_postgres::postgres::pg_array_to_json_value (cyclomatic 19) REDACTED:869 — dbx_driver_postgres::postgres::pg_array_to_json_value has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D3 · God Classes · TooManyFunctions · ×8
  • TooManyFunctions: dbx::commands::app_settings src-tauri/src/commands/app_settings.rs:23 — TooManyFunctions — 59 free functions. The bar is 30 free functions; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_core::admin::nacos::service crates/dbx-core/src/admin/nacos/service.rs:7 — TooManyFunctions — 48 free functions. The bar is 30 free functions; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx::commands::nacos_cmd src-tauri/src/commands/nacos_cmd.rs:10 — TooManyFunctions — 45 free functions. The bar is 30 free functions; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_formats::csv_export crates/dbx-formats/src/csv_export.rs:22 — TooManyFunctions — 41 free functions. The bar is 30 free functions; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx::commands::document_cmd src-tauri/src/commands/document_cmd.rs:9 — TooManyFunctions — 40 free functions. The bar is 30 free functions; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_ai_provider::ai_opencode_cli crates/dbx-ai-provider/src/ai_opencode_cli.rs:36 — TooManyFunctions — 39 free functions. The bar is 30 free functions; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx_core::admin::nacos::namespace_access crates/dbx-core/src/admin/nacos/namespace_access.rs:34 — TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: dbx::commands::agents src-tauri/src/commands/agents.rs:31 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×8
  • Duplicated block (5 lines × 4) REDACTED:1531 — REDACTED:1531-1536 | REDACTED:1732-1736 | REDACTED:2028-2032 | REDACTED:2235-2239 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) REDACTED:1592 — REDACTED:1592-1596 | REDACTED:1797-1801 | REDACTED:2089-2093 | REDACTED:2277-2281 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) REDACTED:2743 — REDACTED:2743-2747 | REDACTED:2903-2907 | REDACTED:2918-2922 | REDACTED:2928-2932 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) crates/dbx-driver-sqlserver/src/sqlserver.rs:3212 — crates/dbx-driver-sqlserver/src/sqlserver.rs:3212-3216 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3218-3222 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3224-3228 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3230-3234 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) crates/dbx-sql-core/src/object_source_sql.rs:225 — crates/dbx-sql-core/src/object_source_sql.rs:225-229 | crates/dbx-sql-core/src/object_source_sql.rs:382-386 | crates/dbx-sql-core/src/object_source_sql.rs:752-756 | crates/dbx-sql-core/src/object_source_sql.rs:1953-1957 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) REDACTED:56 — REDACTED:56-60 | crates/dbx-drivers/src/db/influxdb3_driver.rs:77-81 | crates/dbx-drivers/src/db/influxdb_driver.rs:102-106 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:141-145 — before extracting anything, compare `crates/dbx-drivers/src/db/influxdb3_driver.rs` and `crates/dbx-drivers/src/db/influxdb_driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:108 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:108-112 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:111-115 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:115-119 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:119-123 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) REDACTED:2648 — REDACTED:2648-2652 | REDACTED:2677-2681 | REDACTED:2764-2768 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:386-390 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2648` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×8
  • Swallowed exception (caught, then discarded) REDACTED:381 — `if err := json.Unmarshal(body, &payload); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:720 — `if err := json.Unmarshal(body, &payload); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1498 — `catch (RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:4147 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:4156 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:6412 — `catch (SQLException | RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:6447 — `catch (SQLException | RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:88 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D1 · Cyclomatic Complexity · dbx_web · ×7
  • dbx_web::routes::mongodb_dump::receive_source (cyclomatic 36) crates/dbx-web/src/routes/mongodb_dump.rs:87 — dbx_web::routes::mongodb_dump::receive_source has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_web::serve (cyclomatic 19) crates/dbx-web/src/main.rs:519 — dbx_web::serve has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_web::routes::mcp_policy::mongo_pure_field_predicate (cyclomatic 19) crates/dbx-web/src/routes/mcp_policy.rs:121 — dbx_web::routes::mcp_policy::mongo_pure_field_predicate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_web::routes::table_import::preview_import (cyclomatic 18) crates/dbx-web/src/routes/table_import.rs:108 — dbx_web::routes::table_import::preview_import has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_web::routes::connection::run_prepared_temporary_connection_test (cyclomatic 16) crates/dbx-web/src/routes/connection.rs:354 — dbx_web::routes::connection::run_prepared_temporary_connection_test has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_web::routes::connection::plan_connection_config_sync (cyclomatic 16) crates/dbx-web/src/routes/connection.rs:1190 — dbx_web::routes::connection::plan_connection_config_sync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_web::routes::mongodb_import_export::preview_import (cyclomatic 16) crates/dbx-web/src/routes/mongodb_import_export.rs:112 — dbx_web::routes::mongodb_import_export::preview_import has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · dbx_plugin_runtime · ×7
  • dbx_plugin_runtime::plugins::manifest::validate_contributions (cognitive 145) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1339 — dbx_plugin_runtime::plugins::manifest::validate_contributions has cognitive complexity 145 (threshold 15). Drivers by points: if/else 42 (115 pts), loops 10 (18 pts), boolean chains 7, match/switch 2 (5 pts) (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::manifest::validate_form_fields (cognitive 48) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1874 — dbx_plugin_runtime::plugins::manifest::validate_form_fields has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 4 (9 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog (cognitive 36) crates/dbx-plugin-runtime/src/plugins/marketplace.rs:565 — dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::manifest::validate_localizations (cognitive 27) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1228 — dbx_plugin_runtime::plugins::manifest::validate_localizations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::installer::prune_plugin_history (cognitive 20) crates/dbx-plugin-runtime/src/plugins/installer.rs:998 — dbx_plugin_runtime::plugins::installer::prune_plugin_history has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::installer::extract_package (cognitive 18) crates/dbx-plugin-runtime/src/plugins/installer.rs:801 — dbx_plugin_runtime::plugins::installer::extract_package has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_runtime::plugins::host::plugin_connection_action_result (cognitive 16) crates/dbx-plugin-runtime/src/plugins/host.rs:787 — dbx_plugin_runtime::plugins::host::plugin_connection_action_result has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxMcpServer · ×7
  • DbxMcpServer::execute_batch_request (cognitive 70) crates/dbx-mcp/src/server.rs:1854 — DbxMcpServer::execute_batch_request has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (36 pts), match/switch 12 (19 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::execute_query (cognitive 67) crates/dbx-mcp/src/server.rs:1518 — DbxMcpServer::execute_query has cognitive complexity 67 (threshold 15). Drivers by points: if/else 26 (36 pts), match/switch 14 (26 pts), boolean chains 5 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::execute_and_show (cognitive 21) crates/dbx-mcp/src/server.rs:3044 — DbxMcpServer::execute_and_show has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 5 (7 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • DbxMcpServer::get_schema_context (cognitive 19) crates/dbx-mcp/src/server.rs:2707 — DbxMcpServer::get_schema_context has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • DbxMcpServer::execute_redis_command (cognitive 18) crates/dbx-mcp/src/server.rs:2480 — DbxMcpServer::execute_redis_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 6, match/switch 4. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::resolve_connection (cognitive 17) crates/dbx-mcp/src/server.rs:3578 — DbxMcpServer::resolve_connection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DbxMcpServer::call_plugin_tool_dispatch (cognitive 17) crates/dbx-mcp/src/server.rs:3715 — DbxMcpServer::call_plugin_tool_dispatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×7
  • Duplicated block (20 lines × 2) REDACTED:3888 — REDACTED:3888-3907 | src-tauri/src/commands/connection.rs:2589-2608 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) REDACTED:3275 — REDACTED:3275-3294 | REDACTED:3468-3487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:6241 — crates/dbx-driver-mysql/src/mysql.rs:6241-6260 | crates/dbx-driver-mysql/src/mysql.rs:6289-6308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/dbx-driver-sqlserver/src/sqlserver.rs:3871 — crates/dbx-driver-sqlserver/src/sqlserver.rs:3871-3890 | crates/dbx-driver-sqlserver/src/sqlserver.rs:3993-4012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:604 — crates/dbx-drivers/src/db/couchdb_driver.rs:604-623 | crates/dbx-drivers/src/db/solr_driver.rs:981-1000 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) crates/dbx-sql-core/src/sql_analysis.rs:294 — crates/dbx-sql-core/src/sql_analysis.rs:294-313 | crates/dbx-sql-core/src/sql_analysis.rs:502-521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:279 — agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:279-298 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:598-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×7
  • Duplicated block (11 lines × 3) REDACTED:3326 — REDACTED:3326-3336 | REDACTED:3353-3363 | REDACTED:3533-3543 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) crates/dbx-driver-elasticsearch/src/lib.rs:2587 — crates/dbx-driver-elasticsearch/src/lib.rs:2587-2597 | crates/dbx-drivers/src/db/couchdb_driver.rs:634-644 | crates/dbx-drivers/src/db/solr_driver.rs:1011-1021 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:516 — crates/dbx-driver-mongodb/src/mongo_shell.rs:516-526 | crates/dbx-web/src/routes/mcp_policy.rs:198-208 | src-tauri/src/commands/mcp_bridge.rs:1587-1597 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:7089 — crates/dbx-driver-mysql/src/mysql.rs:7089-7099 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4415-4425 | crates/dbx-sql-core/src/sql.rs:3203-3213 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (11 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:678 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:678-688 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:856-866 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:948-958 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:741 — crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:741-751 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:901-911 | crates/dbx-sql-dialect/src/sql_dialect/descriptor.rs:1029-1039 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) crates/dbx-tauri-schema/src/commands.rs:85 — crates/dbx-tauri-schema/src/commands.rs:85-95 | src-tauri/src/commands/document_cmd.rs:19-29 | src-tauri/src/commands/mongo_cmd.rs:19-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×7
  • Duplicated block (9–10 lines × 2) crates/dbx-driver-agent/src/agent_service.rs:1257 — crates/dbx-driver-agent/src/agent_service.rs:1257-1266 | crates/dbx-driver-agent/src/agent_service.rs:1293-1301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/dbx-driver-support/src/ddl_scan.rs:54 — crates/dbx-driver-support/src/ddl_scan.rs:54-62 | crates/dbx-sql-data/src/query_result_sql.rs:2835-2844 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9–10 lines × 2) crates/dbx-sql-core/src/sql.rs:1723 — crates/dbx-sql-core/src/sql.rs:1723-1731 | crates/dbx-sql-core/src/sql.rs:1836-1845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/dbx-web/src/routes/connection.rs:488 — crates/dbx-web/src/routes/connection.rs:488-496 | crates/dbx-web/src/routes/connection.rs:676-685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) REDACTED:438 — REDACTED:438-447 | REDACTED:1050-1058 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) REDACTED:836 — REDACTED:836-844 | REDACTED:1811-1820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:836` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) REDACTED:3900 — REDACTED:3900-3909 | REDACTED:5297-5305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3900` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×7
  • Duplicated block (8–9 lines × 2) agents/drivers/duckdb/src/sql.rs:395 — agents/drivers/duckdb/src/sql.rs:395-402 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4419-4427 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8–9 lines × 2) REDACTED:7281 — REDACTED:7281-7288 | REDACTED:7307-7315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) crates/dbx-driver-support/src/http_tunnel.rs:58 — crates/dbx-driver-support/src/http_tunnel.rs:58-66 | crates/dbx-driver-support/src/http_tunnel.rs:105-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:12 — crates/dbx-sql-data/src/data_grid_neo4j_sql.rs:12-20 | REDACTED:1808-1815 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8–9 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:911 — crates/dbx-sql-schema/src/schema_diff.rs:911-918 | crates/dbx-sql-schema/src/schema_diff.rs:935-943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) REDACTED:3598 — REDACTED:3598-3605 | REDACTED:2310-2318 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3598` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) REDACTED:3216 — REDACTED:3216-3223 | REDACTED:5333-5341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×7
  • Low cohesion: MqAdminConfig (LCOM4 6) crates/dbx-core/src/admin/mq/config.rs:48 — MqAdminConfig's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ConnectionConfig (LCOM4 6) crates/dbx-types/src/models/connection.rs:156 — ConnectionConfig's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MqttOptions (LCOM4 6) vendor/rumqttc/src/v5/mod.rs:64 — MqttOptions's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AgentManager (LCOM4 4) crates/dbx-driver-agent/src/agent_manager.rs:881 — AgentManager's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Connection (LCOM4 4) vendor/tiberius/src/client/connection.rs:52 — Connection's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TlsStream (LCOM4 4) vendor/tiberius/src/client/tls_stream/rustls_tls_stream.rs:34 — TlsStream's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: QueryStream (LCOM4 4) vendor/tiberius/src/tds/stream/query.rs:91 — QueryStream's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D1 · Cyclomatic Complexity · AppState · ×6
  • AppState::get_or_create_pool_for_session_inner_with_receipt (cyclomatic 98) REDACTED:3456 — AppState::get_or_create_pool_for_session_inner_with_receipt has cyclomatic complexity 98 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • AppState::refresh_connections (cyclomatic 70) REDACTED:6936 — AppState::refresh_connections has cyclomatic complexity 70 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • AppState::remove_stale_connection_pool (cyclomatic 61) REDACTED:5430 — AppState::remove_stale_connection_pool has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • AppState::prepare_connection_transport_with_claimant (cyclomatic 29) REDACTED:4480 — AppState::prepare_connection_transport_with_claimant has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dbx_core::connection::close_pool_kind_inner (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • AppState::insert_connection_pool_inner (cyclomatic 26) REDACTED:2505 — AppState::insert_connection_pool_inner has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_core::connection::close_pool_kind_inner (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • AppState::start_keepalive_task (cyclomatic 23) REDACTED:2823 — AppState::start_keepalive_task has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: dbx_core::connection::close_pool_kind_inner (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · dbx_sql_dialect · ×6
  • dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database (cognitive 54) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:283 — dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38 (46 pts), boolean chains 7, match/switch 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind (cognitive 28) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:50 — dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7, match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_column_type (cognitive 20) crates/dbx-sql-dialect/src/sql_dialect/type_rewrite.rs:314 — dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_column_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items (cognitive 19) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:131 — dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_dialect::sql_dialect::table_select::build_select_columns (cognitive 19) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:886 — dbx_sql_dialect::sql_dialect::table_select::build_select_columns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_sql_dialect::sql_dialect::identifiers::qualified_table_name (cognitive 16) crates/dbx-sql-dialect/src/sql_dialect/identifiers.rs:39 — dbx_sql_dialect::sql_dialect::identifiers::qualified_table_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_types · ×6
  • dbx_types::models::connection::normalize_postgres_url_params (cognitive 38) crates/dbx-types/src/models/connection.rs:2427 — dbx_types::models::connection::normalize_postgres_url_params has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 4, match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_types::models::connection::normalize_sqlserver_host_port (cognitive 28) crates/dbx-types/src/models/connection.rs:3144 — dbx_types::models::connection::normalize_sqlserver_host_port has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_types::models::connection::parse_as400_jdbc_endpoint (cognitive 21) crates/dbx-types/src/models/connection.rs:2776 — dbx_types::models::connection::parse_as400_jdbc_endpoint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_types::models::connection::normalize_mysql_url_params (cognitive 19) crates/dbx-types/src/models/connection.rs:2159 — dbx_types::models::connection::normalize_mysql_url_params has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_types::models::connection::migrate_legacy_transport_layers (cognitive 18) crates/dbx-types/src/models/connection.rs:988 — dbx_types::models::connection::migrate_legacy_transport_layers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_types::models::connection::as400_jdbc_properties (cognitive 16) crates/dbx-types/src/models/connection.rs:2882 — dbx_types::models::connection::as400_jdbc_properties has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, loops 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NacosOpenApiAdmin · ×6
  • NacosOpenApiAdmin::list_instances (cognitive 26) crates/dbx-core/src/admin/nacos/http.rs:3074 — NacosOpenApiAdmin::list_instances has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 4 (9 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::get_config (cognitive 25) crates/dbx-core/src/admin/nacos/http.rs:2607 — NacosOpenApiAdmin::get_config has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::list_services (cognitive 20) crates/dbx-core/src/admin/nacos/http.rs:2932 — NacosOpenApiAdmin::list_services has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::test_connection (cognitive 19) crates/dbx-core/src/admin/nacos/http.rs:1800 — NacosOpenApiAdmin::test_connection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • NacosOpenApiAdmin::access_token (cognitive 17) crates/dbx-core/src/admin/nacos/http.rs:306 — NacosOpenApiAdmin::access_token has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NacosOpenApiAdmin::list_configs_by_client_filters (cognitive 16) crates/dbx-core/src/admin/nacos/http.rs:1145 — NacosOpenApiAdmin::list_configs_by_client_filters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×6
  • Duplicated block (24 lines × 2) agents/drivers/duckdb/src/sql.rs:128 — agents/drivers/duckdb/src/sql.rs:128-151 | crates/dbx-drivers/src/db/duckdb_sql.rs:166-189 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) REDACTED:7897 — REDACTED:7897-7920 | REDACTED:8390-8413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:372 — crates/dbx-drivers/src/db/rqlite_driver.rs:372-395 | crates/dbx-drivers/src/db/turso_driver.rs:615-638 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 229 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) crates/dbx-sql-core/src/sql.rs:3485 — crates/dbx-sql-core/src/sql.rs:3485-3508 | crates/dbx-sql-core/src/sql.rs:3580-3603 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:155 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:155-178 | src-tauri/src/commands/redis_pubsub_server.rs:186-209 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) REDACTED:1041 — REDACTED:1041-1064 | REDACTED:1082-1105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1041` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×6
  • Duplicated block (18–19 lines × 2) REDACTED:1428 — REDACTED:1428-1445 | REDACTED:1481-1499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/dbx-core/src/data/transfer.rs:14076 — crates/dbx-core/src/data/transfer.rs:14076-14093 | crates/dbx-core/src/data/transfer.rs:14114-14132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/dbx-drivers/src/db/rqlite_driver.rs:321 — crates/dbx-drivers/src/db/rqlite_driver.rs:321-339 | crates/dbx-drivers/src/db/turso_driver.rs:414-431 — before extracting anything, compare `crates/dbx-drivers/src/db/rqlite_driver.rs` and `crates/dbx-drivers/src/db/turso_driver.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 229 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18–19 lines × 2) crates/dbx-sql-schema/src/schema_diff.rs:940 — crates/dbx-sql-schema/src/schema_diff.rs:940-958 | crates/dbx-sql-schema/src/schema_diff.rs:1007-1024 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/dbx-web/src/routes/mongodb_import_export.rs:254 — crates/dbx-web/src/routes/mongodb_import_export.rs:254-271 | crates/dbx-web/src/routes/table_import.rs:270-288 — before extracting anything, compare `crates/dbx-web/src/routes/mongodb_import_export.rs` and `crates/dbx-web/src/routes/table_import.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18–19 lines × 2) crates/dbx-web/src/routes/query.rs:1655 — crates/dbx-web/src/routes/query.rs:1655-1672 | src-tauri/src/commands/query.rs:1273-1291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×6
  • Duplicated block (14 lines × 3) REDACTED:3819 — REDACTED:3819-3832 | src-tauri/src/commands/connection.rs:1907-1920 | src-tauri/src/commands/connection.rs:2478-2491 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 3) REDACTED:3870 — REDACTED:3870-3883 | src-tauri/src/commands/connection.rs:1951-1964 | src-tauri/src/commands/connection.rs:2519-2532 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 3) crates/dbx-core/src/data/transfer.rs:13444 — crates/dbx-core/src/data/transfer.rs:13444-13457 | crates/dbx-core/src/data/transfer.rs:13523-13536 | crates/dbx-core/src/data/transfer.rs:13824-13837 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:1872 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1872-1885 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1914-1927 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1955-1968 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:5646 — crates/dbx-driver-mysql/src/mysql.rs:5646-5659 | crates/dbx-driver-mysql/src/mysql.rs:5805-5818 | crates/dbx-driver-mysql/src/mysql.rs:5998-6011 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) REDACTED:247 — REDACTED:247-260 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:509-522 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:658-671 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×6
  • Duplicated block (7 lines × 4) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:807 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:807-813 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:932-938 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1147-1153 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1202-1208 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:122-128 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:199-205 | crates/dbx-ai-provider/src/ai_grok_cli.rs:172-178 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:54-60 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:627 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:627-633 | REDACTED:459-465 | REDACTED:781-789 | REDACTED:796-802 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:794` calls `contains` and `REDACTED:458` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 4) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:278 — agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:278-284 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:918-924 | REDACTED:3031-3037 | REDACTED:6500-6506 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:278` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 4) REDACTED:1381 — REDACTED:1381-1387 | REDACTED:2874-2880 | REDACTED:3261-3267 | REDACTED:4704-4710 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1381` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) REDACTED:3315 — REDACTED:3315-3321 | REDACTED:3337-3343 | REDACTED:5366-5372 | REDACTED:5381-5387 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · dbx_duckdb_driver · ×5
  • dbx_duckdb_driver::query::duckdb_logical_type_to_string (cyclomatic 50) agents/drivers/duckdb/src/query.rs:580 — dbx_duckdb_driver::query::duckdb_logical_type_to_string has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic (cyclomatic 26) agents/drivers/duckdb/src/sql.rs:202 — dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_duckdb_driver::sql::split_sql_statements (cyclomatic 25) agents/drivers/duckdb/src/sql.rs:1 — dbx_duckdb_driver::sql::split_sql_statements has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_duckdb_driver::sql::contains_unquoted_sql_keyword (cyclomatic 23) agents/drivers/duckdb/src/sql.rs:330 — dbx_duckdb_driver::sql::contains_unquoted_sql_keyword has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • dbx_duckdb_driver::sql::first_executable_sql_token (cyclomatic 17) agents/drivers/duckdb/src/sql.rs:384 — dbx_duckdb_driver::sql::first_executable_sql_token has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · dbx_driver_elasticsearch · ×5
  • dbx_driver_elasticsearch::es_send_page (cyclomatic 22) crates/dbx-driver-elasticsearch/src/lib.rs:1233 — dbx_driver_elasticsearch::es_send_page has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_elasticsearch::normalize_elasticsearch_rest_path (cyclomatic 20) crates/dbx-driver-elasticsearch/src/lib.rs:2069 — dbx_driver_elasticsearch::normalize_elasticsearch_rest_path has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_elasticsearch::adapt_elasticsearch_sql_query (cyclomatic 19) crates/dbx-driver-elasticsearch/src/lib.rs:2888 — dbx_driver_elasticsearch::adapt_elasticsearch_sql_query has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_elasticsearch::translate_field_operator_filter (cyclomatic 18) crates/dbx-driver-elasticsearch/src/lib.rs:1762 — dbx_driver_elasticsearch::translate_field_operator_filter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_elasticsearch::parse_aggregations (cyclomatic 17) crates/dbx-driver-elasticsearch/src/lib.rs:3195 — dbx_driver_elasticsearch::parse_aggregations has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_sqlserver · ×5
  • dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens (cyclomatic 22) crates/dbx-driver-sqlserver/src/sqlserver.rs:1794 — dbx_driver_sqlserver::sqlserver::top_level_sqlserver_tokens has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql (cyclomatic 20) crates/dbx-driver-sqlserver/src/sqlserver.rs:2727 — dbx_driver_sqlserver::sqlserver::sqlserver_completion_assistant_sql has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json (cyclomatic 19) crates/dbx-driver-sqlserver/src/sqlserver.rs:2203 — dbx_driver_sqlserver::sqlserver::sqlserver_cell_to_json has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_sqlserver::sqlserver::sqlserver_column_metadata_from_row (cyclomatic 17) crates/dbx-driver-sqlserver/src/sqlserver.rs:3210 — dbx_driver_sqlserver::sqlserver::sqlserver_column_metadata_from_row has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_driver_sqlserver::sqlserver::first_sql_tokens (cyclomatic 17) crates/dbx-driver-sqlserver/src/sqlserver.rs:4409 — dbx_driver_sqlserver::sqlserver::first_sql_tokens has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · DependencyGraph · ×5
  • DependencyGraph::build_with_functions_and_options (cognitive 121) crates/dbx-sql-schema/src/schema_diff.rs:745 — DependencyGraph::build_with_functions_and_options has cognitive complexity 121 (threshold 15). Drivers by points: if/else 23 (100 pts), loops 9 (21 pts) (nesting depth added 89). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • DependencyGraph::collect_uncovered_edges (cognitive 22) crates/dbx-sql-schema/src/schema_diff.rs:1028 — DependencyGraph::collect_uncovered_edges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DependencyGraph::coverage_score_level2 (cognitive 21) crates/dbx-sql-schema/src/schema_diff.rs:934 — DependencyGraph::coverage_score_level2 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DependencyGraph::topological_sort (cognitive 19) crates/dbx-sql-schema/src/schema_diff.rs:862 — DependencyGraph::topological_sort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DependencyGraph::count_transitive_edges (cognitive 18) crates/dbx-sql-schema/src/schema_diff.rs:1006 — DependencyGraph::count_transitive_edges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupService · ×5
  • BackupService::export_job (cognitive 115) crates/dbx-core/src/scheduled_backup/engine.rs:154 — BackupService::export_job has cognitive complexity 115 (threshold 15). Drivers by points: if/else 39 (93 pts), loops 5 (11 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::tick (cognitive 28) crates/dbx-core/src/scheduled_backup/engine.rs:58 — BackupService::tick has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::serve (cognitive 25) crates/dbx-core/src/scheduled_backup/engine.rs:15 — BackupService::serve has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (9 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::cleanup (cognitive 18) crates/dbx-core/src/scheduled_backup/service.rs:230 — BackupService::cleanup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BackupService::import_files (cognitive 17) crates/dbx-core/src/scheduled_backup/service.rs:115 — BackupService::import_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_duckdb_driver · ×5
  • dbx_duckdb_driver::sql::split_sql_statements (cognitive 33) agents/drivers/duckdb/src/sql.rs:1 — dbx_duckdb_driver::sql::split_sql_statements has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 9, loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic (cognitive 33) agents/drivers/duckdb/src/sql.rs:202 — dbx_duckdb_driver::sql::rewrite_duckdb_current_date_literal_arithmetic has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 11, loops 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_duckdb_driver::sql::contains_unquoted_sql_keyword (cognitive 31) agents/drivers/duckdb/src/sql.rs:330 — dbx_duckdb_driver::sql::contains_unquoted_sql_keyword has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 10, loops 4 (10 pts), if/else 3 (9 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_duckdb_driver::query::duckdb_logical_type_to_string (cognitive 29) agents/drivers/duckdb/src/query.rs:580 — dbx_duckdb_driver::query::duckdb_logical_type_to_string has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_duckdb_driver::sql::first_executable_sql_token (cognitive 24) agents/drivers/duckdb/src/sql.rs:384 — dbx_duckdb_driver::sql::first_executable_sql_token has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (10 pts), boolean chains 8, if/else 3 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_driver_support · ×5
  • dbx_driver_support::ssh_config::apply_host_entry (cognitive 27) crates/dbx-driver-support/src/ssh_config.rs:198 — dbx_driver_support::ssh_config::apply_host_entry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_support::execution::await_stream_with_progress_timeout (cognitive 19) crates/dbx-driver-support/src/execution.rs:125 — dbx_driver_support::execution::await_stream_with_progress_timeout has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (5 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • dbx_driver_support::navicat_mysql_tunnel::serve_client (cognitive 18) crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:190 — dbx_driver_support::navicat_mysql_tunnel::serve_client has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_driver_support::navicat_mysql_tunnel::parse_navicat_response (cognitive 18) crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:359 — dbx_driver_support::navicat_mysql_tunnel::parse_navicat_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_driver_support::db::parse_connect_timeout_with_fallback (cognitive 16) crates/dbx-driver-support/src/db.rs:344 — dbx_driver_support::db::parse_connect_timeout_with_fallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×5
  • Duplicated block (21 lines × 2) crates/dbx-core/src/data/transfer.rs:11772 — crates/dbx-core/src/data/transfer.rs:11772-11792 | crates/dbx-core/src/data/transfer.rs:13676-13696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:5704 — crates/dbx-driver-mysql/src/mysql.rs:5704-5724 | crates/dbx-driver-mysql/src/mysql.rs:6056-6076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) REDACTED:758 — REDACTED:758-778 | REDACTED:1090-1110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:69 — agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:69-89 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:73-93 — before extracting anything, compare `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` and `agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:12 — agents/drivers/argo-go/bench/functional_probe.py:12-32 | agents/drivers/hive-go/bench/functional_probe.py:12-32 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×5
  • Duplicated block (10 lines × 4) REDACTED:1225 — REDACTED:1225-1234 | REDACTED:1336-1345 | REDACTED:1351-1360 | REDACTED:1483-1492 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) crates/dbx-core/src/data/transfer.rs:14449 — crates/dbx-core/src/data/transfer.rs:14449-14458 | crates/dbx-core/src/data/transfer.rs:14473-14482 | crates/dbx-core/src/data/transfer.rs:14497-14506 | crates/dbx-core/src/data/transfer.rs:14526-14535 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) crates/dbx-sql-schema/src/schema_diff.rs:3755 — crates/dbx-sql-schema/src/schema_diff.rs:3755-3764 | crates/dbx-sql-schema/src/schema_diff.rs:4027-4036 | crates/dbx-sql-schema/src/schema_diff.rs:4150-4159 | crates/dbx-sql-schema/src/schema_diff.rs:4219-4228 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:209 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:209-218 | REDACTED:1026-1035 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:341-350 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:293-302 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 4) REDACTED:5292 — REDACTED:5292-5301 | REDACTED:5315-5324 | REDACTED:5346-5355 | REDACTED:5401-5410 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:5289` calls `oracleListObjects`, `createArrayNode` and `REDACTED:5344` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×5
  • Duplicated block (7–8 lines × 2) crates/dbx-core/src/ai/agent_kv.rs:1009 — crates/dbx-core/src/ai/agent_kv.rs:1009-1015 | crates/dbx-core/src/ai/agent_kv.rs:1737-1744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) REDACTED:1066 — REDACTED:1066-1072 | REDACTED:1179-1186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) crates/dbx-formats/src/temporal_format.rs:288 — crates/dbx-formats/src/temporal_format.rs:288-295 | crates/dbx-formats/src/temporal_format.rs:317-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:671 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:671-677 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:781-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:423 — agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:423-429 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:1089-1096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:423` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×5
  • Duplicated block (7 lines × 5) REDACTED:6419 — REDACTED:6419-6425 | REDACTED:7527-7533 | REDACTED:7559-7565 | REDACTED:7589-7595 | REDACTED:7617-7623 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 5) crates/dbx-core/src/schema/mod.rs:1076 — crates/dbx-core/src/schema/mod.rs:1076-1084 | crates/dbx-core/src/schema/mod.rs:1100-1108 | crates/dbx-core/src/schema/mod.rs:1114-1120 | crates/dbx-core/src/schema/mod.rs:1131-1137 | crates/dbx-core/src/schema/mod.rs:1149-1155 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 5) crates/dbx-driver-sqlserver/src/sqlserver.rs:1865 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1865-1871 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1879-1885 | crates/dbx-sql-data/src/query_result_sql.rs:2032-2038 | crates/dbx-sql-data/src/query_result_sql.rs:2052-2058 | crates/dbx-sql-data/src/query_result_sql.rs:2721-2727 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 5) crates/dbx-mcp/src/server.rs:2241 — crates/dbx-mcp/src/server.rs:2241-2247 | crates/dbx-mcp/src/server.rs:2485-2491 | crates/dbx-mcp/src/server.rs:3046-3052 | crates/dbx-mcp/src/server.rs:3132-3138 | crates/dbx-mcp/src/server.rs:3162-3168 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 5) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:219 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:219-225 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:233-239 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:136-142 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:256-262 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:146-152 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC3 · Page structure · Data table has no header cells · ×4
  • Data table has no header cells apps/desktop/src/components/admin/MySqlDashboard.vue:247 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells apps/desktop/src/components/debug/DebuggeeSqlPanel.vue:52 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells apps/desktop/src/components/redis/RedisDashboard.vue:510 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells apps/desktop/src/components/solr/SolrAdmin.vue:718 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC6 · Visual & motion safety · Focus outline removed inline · ×4
  • Focus outline removed inline apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:302 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline apps/desktop/src/components/admin/AuthorizationScopeEditor.vue:355 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline apps/desktop/src/components/admin/DatabaseUserAdmin.vue:1227 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline apps/desktop/src/components/admin/MySqlDashboard.vue:244 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D1 · Cyclomatic Complexity · dbx_sql_dialect · ×4
  • dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_cross_dialect_to_sqlserver (cyclomatic 68) crates/dbx-sql-dialect/src/sql_dialect/type_rewrite.rs:211 — dbx_sql_dialect::sql_dialect::type_rewrite::rewrite_cross_dialect_to_sqlserver has cyclomatic complexity 68 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database (cyclomatic 44) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:283 — dbx_sql_dialect::sql_dialect::table_select::build_table_data_select_sql_with_database has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind (cyclomatic 24) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:50 — dbx_sql_dialect::sql_dialect::table_select::large_value_preview_kind has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items (cyclomatic 23) crates/dbx-sql-dialect/src/sql_dialect/table_select.rs:131 — dbx_sql_dialect::sql_dialect::table_select::build_large_value_preview_items has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DbxMcpServer · ×4
  • DbxMcpServer::execute_batch_request (cyclomatic 50) crates/dbx-mcp/src/server.rs:1854 — DbxMcpServer::execute_batch_request has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::execute_query (cyclomatic 47) crates/dbx-mcp/src/server.rs:1518 — DbxMcpServer::execute_query has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • DbxMcpServer::execute_redis_command (cyclomatic 19) crates/dbx-mcp/src/server.rs:2480 — DbxMcpServer::execute_redis_command has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • DbxMcpServer::get_schema_context (cyclomatic 16) crates/dbx-mcp/src/server.rs:2707 — DbxMcpServer::get_schema_context has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Analysis · ×4
  • Analysis::parse (cyclomatic 35) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:421 — Analysis::parse has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analysis::select (cyclomatic 30) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:633 — Analysis::select has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analysis::statement (cyclomatic 23) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:544 — Analysis::statement has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analysis::package_reference (cyclomatic 18) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis/package.rs:579 — Analysis::package_reference has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×4
  • Duplicated block (27 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:476 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:476-502 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:727-753 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (27 lines × 2) crates/dbx-core/src/data/transfer.rs:12974 — crates/dbx-core/src/data/transfer.rs:12974-13000 | crates/dbx-core/src/data/transfer/structure_plan.rs:571-597 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (27 lines × 2) REDACTED:282 — REDACTED:282-308 | REDACTED:282-308 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (27 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:158 — agents/drivers/argo-go/bench/functional_probe.py:158-184 | agents/drivers/hive-go/bench/functional_probe.py:158-184 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×4
  • Duplicated block (23 lines × 2) agents/drivers/duckdb/src/sql.rs:43 — agents/drivers/duckdb/src/sql.rs:43-65 | crates/dbx-drivers/src/db/duckdb_sql.rs:55-77 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) crates/dbx-core/src/admin/mq/adapters/kafka.rs:441 — crates/dbx-core/src/admin/mq/adapters/kafka.rs:441-463 | crates/dbx-core/src/admin/mq/adapters/rocketmq.rs:692-714 — before extracting anything, compare `crates/dbx-core/src/admin/mq/adapters/kafka.rs` and `crates/dbx-core/src/admin/mq/adapters/rocketmq.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) crates/dbx-mcp/src/server.rs:1577 — crates/dbx-mcp/src/server.rs:1577-1599 | crates/dbx-mcp/src/server.rs:1882-1904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) REDACTED:49 — REDACTED:49-71 | REDACTED:49-71 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×4
  • Duplicated block (12 lines × 3) agents/drivers/duckdb/src/sql.rs:90 — agents/drivers/duckdb/src/sql.rs:90-101 | crates/dbx-core/src/data/transfer.rs:6111-6122 | crates/dbx-drivers/src/db/duckdb_sql.rs:106-117 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:379 — crates/dbx-driver-mongodb/src/mongo_shell.rs:379-390 | crates/dbx-web/src/routes/mcp_policy.rs:61-72 | src-tauri/src/commands/mcp_bridge.rs:1450-1461 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:105 — agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:105-116 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:652-663 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:116-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) REDACTED:3449 — REDACTED:3449-3460 | REDACTED:3463-3474 | REDACTED:5508-5519 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×4
  • Duplicated block (9 lines × 4) crates/dbx-driver-mysql/src/mysql.rs:6249 — crates/dbx-driver-mysql/src/mysql.rs:6249-6257 | crates/dbx-driver-mysql/src/mysql.rs:6297-6305 | REDACTED:2665-2673 | REDACTED:2697-2705 — before extracting anything, compare `crates/dbx-driver-mysql/src/mysql.rs` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) crates/dbx-driver-sqlserver/src/sqlserver.rs:1863 — crates/dbx-driver-sqlserver/src/sqlserver.rs:1863-1871 | crates/dbx-driver-sqlserver/src/sqlserver.rs:1877-1885 | crates/dbx-sql-data/src/query_result_sql.rs:2030-2038 | crates/dbx-sql-data/src/query_result_sql.rs:2050-2058 — before extracting anything, compare `crates/dbx-driver-sqlserver/src/sqlserver.rs` and `crates/dbx-sql-data/src/query_result_sql.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:234 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:234-242 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:137-145 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:257-265 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:147-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:234` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:224 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:224-232 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:179-187 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:303-311 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:188-196 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:178` calls `appendRoutineTypePredicate` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:187` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×4
  • Duplicated block (8–9 lines × 3) crates/dbx-drivers/src/db/sqlite.rs:1595 — crates/dbx-drivers/src/db/sqlite.rs:1595-1602 | crates/dbx-drivers/src/db/sqlite.rs:2620-2628 | crates/dbx-drivers/src/db/sqlite.rs:2694-2702 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8–9 lines × 3) crates/dbx-web/src/routes/database_export.rs:189 — crates/dbx-web/src/routes/database_export.rs:189-196 | crates/dbx-web/src/routes/query_result_export.rs:170-178 | crates/dbx-web/src/routes/table_export.rs:158-166 — before extracting anything, compare `crates/dbx-web/src/routes/query_result_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8–9 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:327 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:327-334 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:676-683 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1088-1096 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:674` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1088` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457-464 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:277-285 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×4
  • Duplicated block (8 lines × 4) REDACTED:5966 — REDACTED:5966-5973 | REDACTED:6299-6306 | REDACTED:7692-7699 | REDACTED:7727-7734 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 4) crates/dbx-driver-mysql/src/mysql.rs:7102 — crates/dbx-driver-mysql/src/mysql.rs:7102-7109 | crates/dbx-sql-core/src/sql.rs:3216-3223 | crates/dbx-sql-core/src/sql.rs:3315-3322 | crates/dbx-sql-core/src/sql.rs:3363-3370 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 4) crates/dbx-core/src/admin/consul/agent.rs:604 — crates/dbx-core/src/admin/consul/agent.rs:604-611 | crates/dbx-core/src/admin/consul/health.rs:165-172 | crates/dbx-core/src/admin/consul/kv.rs:448-455 | crates/dbx-core/src/admin/consul/session.rs:213-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (8 lines × 4) crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:264 — crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:264-271 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:348-355 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:374-381 | crates/dbx-core/src/admin/mq/adapters/rabbitmq.rs:396-403 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×4
  • Duplicated block (5 lines × 6) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457-461 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594-598 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1847-1851 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1902-1906 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2085-2089 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:531-535 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 6) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594-598 | REDACTED:3332-3336 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:435-439 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:498-502 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2085-2089 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:531-535 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 6) agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255 — agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255-259 | REDACTED:4539-4543 | REDACTED:4623-4627 | REDACTED:5457-5462 | REDACTED:5860-5864 | REDACTED:6056-6061 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:255` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:5463` calls `getString`, `createArrayNode`, `add` and `REDACTED:4628` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 6) REDACTED:4510 — REDACTED:4510-4514 | REDACTED:5267-5271 | REDACTED:5295-5299 | REDACTED:5318-5322 | REDACTED:5349-5353 | REDACTED:5404-5408 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:5266` calls `setString` and `REDACTED:5317` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
AC1 · Text alternatives · <canvas> without a text alternative · ×3
  • <canvas> without a text alternative apps/desktop/src/components/grid/DataGridCellDetailDialog.vue:226 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative apps/desktop/src/components/grid/DataGridCellDetailPanel.vue:199 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative docs/components/landing/Starfield.tsx:192 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC3 · Page structure · Page without a main landmark · ×3
  • Page without a main landmark apps/desktop/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark dbx-er-diagram-architecture.html:3 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark docs/app/(root)/layout.tsx:34 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · dbx_plugin_runtime · ×3
  • dbx_plugin_runtime::plugins::manifest::validate_contributions (cyclomatic 67) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1339 — dbx_plugin_runtime::plugins::manifest::validate_contributions has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_plugin_runtime::plugins::manifest::validate_form_fields (cyclomatic 24) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1874 — dbx_plugin_runtime::plugins::manifest::validate_form_fields has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog (cyclomatic 19) crates/dbx-plugin-runtime/src/plugins/marketplace.rs:565 — dbx_plugin_runtime::plugins::marketplace::validate_and_resolve_catalog has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Storage · ×3
  • Storage::inspect_data_migration_with_error_cache (cyclomatic 51) REDACTED:1797 — Storage::inspect_data_migration_with_error_cache has cyclomatic complexity 51 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Storage::load_connections (cyclomatic 17) REDACTED:7693 — Storage::load_connections has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Storage::cleanup_migration_backups (cyclomatic 16) REDACTED:2227 — Storage::cleanup_migration_backups has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupService · ×3
  • BackupService::export_job (cyclomatic 48) crates/dbx-core/src/scheduled_backup/engine.rs:154 — BackupService::export_job has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • BackupService::command (cyclomatic 17) crates/dbx-core/src/scheduled_backup/service.rs:54 — BackupService::command has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • BackupService::tick (cyclomatic 16) crates/dbx-core/src/scheduled_backup/engine.rs:58 — BackupService::tick has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_redis · ×3
  • dbx_driver_redis::parse_command_argv (cyclomatic 30) crates/dbx-driver-redis/src/lib.rs:2565 — dbx_driver_redis::parse_command_argv has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_redis::scan_keys_batch_inner (cyclomatic 21) crates/dbx-driver-redis/src/lib.rs:3156 — dbx_driver_redis::scan_keys_batch_inner has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_driver_redis::attach_hash_field_ttls (cyclomatic 17) crates/dbx-driver-redis/src/lib.rs:5444 — dbx_driver_redis::attach_hash_field_ttls has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: dbx_driver_redis::redis_command_raw_to_json (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Analyzer · ×3
  • Analyzer::visit_expr (cyclomatic 28) crates/dbx-sql-core/src/sql_analysis.rs:1513 — Analyzer::visit_expr has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Analyzer::visit_select (cyclomatic 18) crates/dbx-sql-core/src/sql_analysis.rs:1273 — Analyzer::visit_select has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Analyzer::finish_group_by_check (cyclomatic 18) crates/dbx-sql-core/src/sql_analysis.rs:1360 — Analyzer::finish_group_by_check has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_types · ×3
  • dbx_types::models::connection::normalize_postgres_url_params (cyclomatic 27) crates/dbx-types/src/models/connection.rs:2427 — dbx_types::models::connection::normalize_postgres_url_params has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • dbx_types::models::connection::parse_as400_jdbc_endpoint (cyclomatic 21) crates/dbx-types/src/models/connection.rs:2776 — dbx_types::models::connection::parse_as400_jdbc_endpoint has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • dbx_types::models::connection::normalize_mysql_url_params (cyclomatic 20) crates/dbx-types/src/models/connection.rs:2159 — dbx_types::models::connection::normalize_mysql_url_params has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D12 · Dependency Hygiene · Dependency pinned to a stale untagged commit · ×3
  • Dependency pinned to a stale untagged commit: github.com/jcmturner/krb5test — Direct dependency `github.com/jcmturner/krb5test` is required at `v0.0.0-20201230140143-102e4b78cdb8` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-12-30, 5.8 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/jcmturner/krb5test` and has not moved this requirement in 5.8 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/jcmturner/krb5test` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
  • Dependency pinned to a stale untagged commit: github.com/jcmturner/krb5test — Direct dependency `github.com/jcmturner/krb5test` is required at `v0.0.0-20201230140143-102e4b78cdb8` in agents/drivers/hive-go/go.mod — a pseudo-version, which pins an UNTAGGED commit from 2020-12-30, 5.8 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/jcmturner/krb5test` and has not moved this requirement in 5.8 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/jcmturner/krb5test` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
  • Dependency pinned to a stale untagged commit: gitea.com/kingbase/gokb — Direct dependency `gitea.com/kingbase/gokb` is required at `v0.0.0-20201021123113-29bd62a876c3` in agents/drivers/kingbase-go/go.mod — a pseudo-version, which pins an UNTAGGED commit from 2020-10-21, 6 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `gitea.com/kingbase/gokb` and has not moved this requirement in 6 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `gitea.com/kingbase/gokb` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
D17 · Explicit Debt · TodoComment · ×3
  • TodoComment crates/dbx-ai-provider/src/ai.rs:926 — /// TODO(Agens, tracked by #8144 and #8658): Remove `is_agens_endpoint` and all
  • TodoComment agents/go-common/go-gssapi/krb5/krb5.go:1102 — // TODO: fix GenerateEncryptionKey at some point to cope with different — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment agents/go-common/go-gssapi/krb5/krb5_test.go:7 — // TODO: testing this stuff really needs a KDC or a mock — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · Analysis · ×3
  • Analysis::parse (cognitive 57) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:421 — Analysis::parse has cognitive complexity 57 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 7, loops 4 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analysis::select (cognitive 37) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:633 — Analysis::select has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 6, match/switch 2 (4 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analysis::statement (cognitive 31) crates/dbx-sql-core/src/object_source_sql/oracle_routines/analysis.rs:544 — Analysis::statement has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 4, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_plugin_cli · ×3
  • dbx_plugin_cli::dev::build_config (cognitive 37) plugins/sdk/cli/src/dev.rs:52 — dbx_plugin_cli::dev::build_config has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_cli::create_project (cognitive 17) plugins/sdk/cli/src/lib.rs:797 — dbx_plugin_cli::create_project has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_plugin_cli::package_project (cognitive 17) plugins/sdk/cli/src/lib.rs:866 — dbx_plugin_cli::package_project has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Analyzer · ×3
  • Analyzer::finish_group_by_check (cognitive 32) crates/dbx-sql-core/src/sql_analysis.rs:1360 — Analyzer::finish_group_by_check has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analyzer::visit_select (cognitive 23) crates/dbx-sql-core/src/sql_analysis.rs:1273 — Analyzer::visit_select has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 6 (7 pts), match/switch 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Analyzer::visit_expr (cognitive 23) crates/dbx-sql-core/src/sql_analysis.rs:1513 — Analyzer::visit_expr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/dbx-ai-provider/src/ai.rs:3840 — crates/dbx-ai-provider/src/ai.rs:3840-3937 | crates/dbx-ai-provider/src/ai.rs:3945-4094 | crates/dbx-ai-provider/src/ai.rs:4102-4188 | crates/dbx-ai-provider/src/ai.rs:4196-4282 | crates/dbx-ai-provider/src/ai.rs:4410-4625 | crates/dbx-ai-provider/src/ai.rs:4635-4819 | crates/dbx-ai-provider/src/ai.rs:4828-4978 | crates/dbx-ai-provider/src/ai.rs:5092-5196 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) REDACTED:2737 — REDACTED:2737-2791 | REDACTED:2897-2984 | REDACTED:3358-3410 | REDACTED:4905-4929 | REDACTED:5189-5206 | REDACTED:6981-7009 | REDACTED:9398-9472 | REDACTED:9490-9550 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:10 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:10-16 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:83-89 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:205-242 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:169-187 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:126-145 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:244-265 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:278-289 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:134-155 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs:973 — crates/dbx-core/src/query/redis_ops.rs:973-991 | crates/dbx-core/src/query/redis_ops.rs:1157-1205 | crates/dbx-core/src/query/redis_ops.rs:1207-1224 | crates/dbx-core/src/query/redis_ops.rs:1232-1254 | crates/dbx-core/src/query/redis_ops.rs:1338-1356 | crates/dbx-core/src/query/redis_ops.rs:1400-1423 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/dbx-mcp/src/server.rs:1292 — crates/dbx-mcp/src/server.rs:1292-1358 | crates/dbx-mcp/src/server.rs:1365-1425 | crates/dbx-mcp/src/server.rs:1432-1460 | crates/dbx-mcp/src/server.rs:1467-1503 | crates/dbx-mcp/src/server.rs:2707-2803 | crates/dbx-mcp/src/server.rs:3003-3037 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:131 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:131-144 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:88-101 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:205-218 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:238-251 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:92-105 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:96-109 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) crates/dbx-driver-mongodb/src/mongo_oidc.rs:236 — crates/dbx-driver-mongodb/src/mongo_oidc.rs:236-261 | crates/dbx-drivers/src/salesforce_oauth.rs:313-338 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_oidc.rs` and `crates/dbx-drivers/src/salesforce_oauth.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:194 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:194-219 | src-tauri/src/commands/redis_pubsub_server.rs:225-250 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:50 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:50-75 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:70-95 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×3
  • Duplicated block (17–18 lines × 2) agents/drivers/duckdb/src/sql.rs:177 — agents/drivers/duckdb/src/sql.rs:177-194 | crates/dbx-drivers/src/db/duckdb_sql.rs:215-231 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17–18 lines × 2) REDACTED:5228 — REDACTED:5228-5244 | REDACTED:5342-5359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–18 lines × 2) REDACTED:4503 — REDACTED:4503-4519 | REDACTED:4541-4558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×3
  • Duplicated block (16–17 lines × 2) crates/dbx-core/src/admin/consul/blocking.rs:142 — crates/dbx-core/src/admin/consul/blocking.rs:142-158 | crates/dbx-core/src/admin/consul/blocking.rs:196-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16–17 lines × 2) REDACTED:1941 — REDACTED:1941-1957 | REDACTED:2176-2191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16–17 lines × 2) REDACTED:5591 — REDACTED:5591-5607 | REDACTED:9636-9651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:422 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:422-437 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:712-726 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15–16 lines × 2) REDACTED:7946 — REDACTED:7946-7961 | REDACTED:8435-8449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15–16 lines × 2) crates/dbx-driver-elasticsearch/src/lib.rs:2381 — crates/dbx-driver-elasticsearch/src/lib.rs:2381-2395 | crates/dbx-driver-elasticsearch/src/lib.rs:2410-2425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–15 lines × 3) · ×3
  • Duplicated block (13–15 lines × 3) REDACTED:3771 — REDACTED:3771-3783 | src-tauri/src/commands/connection.rs:1845-1859 | src-tauri/src/commands/connection.rs:2420-2432 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13–15 lines × 3) REDACTED:3787 — REDACTED:3787-3799 | src-tauri/src/commands/connection.rs:1873-1887 | src-tauri/src/commands/connection.rs:2446-2458 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13–15 lines × 3) REDACTED:3803 — REDACTED:3803-3815 | src-tauri/src/commands/connection.rs:1890-1904 | src-tauri/src/commands/connection.rs:2462-2474 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×3
  • Duplicated block (12–15 lines × 2) crates/dbx-core/src/data/transfer.rs:6757 — crates/dbx-core/src/data/transfer.rs:6757-6768 | crates/dbx-core/src/data/transfer.rs:6948-6962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–15 lines × 2) crates/dbx-driver-agent/src/agent_driver.rs:2709 — crates/dbx-driver-agent/src/agent_driver.rs:2709-2723 | crates/dbx-driver-agent/src/agent_driver.rs:2772-2783 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–15 lines × 2) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:655 — agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:655-669 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:119-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:655` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×3
  • Duplicated block (13–14 lines × 2) crates/dbx-core/src/admin/nacos/service.rs:34 — crates/dbx-core/src/admin/nacos/service.rs:34-47 | crates/dbx-core/src/admin/nacos/service.rs:569-581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:3092 — crates/dbx-driver-mysql/src/mysql.rs:3092-3104 | crates/dbx-types/src/models/connection.rs:2185-2198 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13–14 lines × 2) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:344 — agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:344-357 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:657-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×3
  • Duplicated block (12–13 lines × 2) crates/dbx-core/src/data/transfer.rs:5508 — crates/dbx-core/src/data/transfer.rs:5508-5520 | crates/dbx-core/src/data/transfer.rs:5661-5672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) crates/dbx-drivers/src/db/sqlite_worker.rs:676 — crates/dbx-drivers/src/db/sqlite_worker.rs:676-687 | crates/dbx-drivers/src/db/sqlite_worker.rs:697-709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) REDACTED:1690 — REDACTED:1690-1701 | REDACTED:1825-1837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1690` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×3
  • Duplicated block (12 lines × 4) crates/dbx-driver-elasticsearch/src/lib.rs:2020 — crates/dbx-driver-elasticsearch/src/lib.rs:2020-2031 | crates/dbx-drivers/src/db/couchdb_driver.rs:494-505 | crates/dbx-drivers/src/db/solr_driver.rs:858-869 | crates/dbx-sql-core/src/query_execution_sql.rs:804-815 — before extracting anything, compare `crates/dbx-driver-elasticsearch/src/lib.rs` and `crates/dbx-drivers/src/db/couchdb_driver.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) crates/dbx-mcp/src/server.rs:1294 — crates/dbx-mcp/src/server.rs:1294-1305 | crates/dbx-mcp/src/server.rs:1367-1378 | crates/dbx-mcp/src/server.rs:1434-1445 | crates/dbx-mcp/src/server.rs:1469-1480 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 4) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:249 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:249-261 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:268-281 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:358-371 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:389-400 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:356 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:356-367 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:453-463 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11–12 lines × 2) REDACTED:4664 — REDACTED:4664-4675 | REDACTED:4766-4776 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) REDACTED:177 — REDACTED:177-187 | REDACTED:376-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:177` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×3
  • Duplicated block (11 lines × 4) crates/dbx-core/src/data/transfer.rs:9959 — crates/dbx-core/src/data/transfer.rs:9959-9969 | crates/dbx-core/src/data/transfer.rs:10207-10217 | crates/dbx-core/src/data/transfer.rs:10356-10366 | crates/dbx-core/src/data/transfer.rs:10453-10463 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 4) REDACTED:5269 — REDACTED:5269-5280 | REDACTED:5973-5984 | REDACTED:6306-6317 | REDACTED:9805-9815 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (11 lines × 4) agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:106 — agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:106-116 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:653-663 | agents/drivers/yashandb/src/main/java/com/dbx/agent/yashandb/YashandbAgent.java:117-127 | REDACTED:5860-5870 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oscar/src/main/java/com/dbx/agent/oscar/OscarAgent.java:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×3
  • Duplicated block (7–9 lines × 2) crates/dbx-core/src/persistence/cloud_sync.rs:3136 — crates/dbx-core/src/persistence/cloud_sync.rs:3136-3144 | crates/dbx-core/src/persistence/cloud_sync.rs:3156-3162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–9 lines × 2) crates/dbx-sql-core/src/object_source_sql.rs:222 — crates/dbx-sql-core/src/object_source_sql.rs:222-228 | crates/dbx-sql-core/src/object_source_sql.rs:377-385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–9 lines × 2) crates/dbx-types/src/models/connection.rs:2569 — crates/dbx-types/src/models/connection.rs:2569-2575 | crates/dbx-types/src/models/connection.rs:2589-2597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×3
  • Duplicated block (6–8 lines × 2) REDACTED:2498 — REDACTED:2498-2505 | REDACTED:4780-4785 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–8 lines × 2) crates/dbx-core/src/schema/native_jobs/operations/scheduler.rs:167 — crates/dbx-core/src/schema/native_jobs/operations/scheduler.rs:167-174 | crates/dbx-core/src/schema/native_jobs/operations/scheduler.rs:211-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–8 lines × 2) crates/dbx-formats/src/temporal_format.rs:237 — crates/dbx-formats/src/temporal_format.rs:237-244 | crates/dbx-formats/src/temporal_format.rs:266-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (4–7 lines × 3) · ×3
  • Duplicated block (4–7 lines × 3) REDACTED:1919 — REDACTED:1919-1925 | REDACTED:2076-2082 | crates/dbx-sql-data/src/data_grid_tdengine_sql.rs:245-248 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (4–7 lines × 3) crates/dbx-web/src/routes/mcp_policy.rs:388 — crates/dbx-web/src/routes/mcp_policy.rs:388-394 | crates/dbx-web/src/routes/mcp_policy.rs:420-423 | crates/dbx-web/src/routes/mcp_policy.rs:461-467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (4–7 lines × 3) crates/dbx-ai-provider/src/ai_cli_agent.rs:685 — crates/dbx-ai-provider/src/ai_cli_agent.rs:685-691 | crates/dbx-ai-provider/src/ai_cli_agent.rs:813-816 | crates/dbx-ai-provider/src/ai_cli_agent.rs:945-951 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–6 lines × 3) · ×3
  • Duplicated block (3–6 lines × 3) crates/dbx-web/src/routes/plugins.rs:240 — crates/dbx-web/src/routes/plugins.rs:240-242 | crates/dbx-web/src/routes/plugins.rs:319-324 | crates/dbx-web/src/routes/plugins.rs:338-343 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (3–6 lines × 3) crates/dbx-web/src/routes/database_export.rs:177 — crates/dbx-web/src/routes/database_export.rs:177-179 | crates/dbx-web/src/routes/query_result_export.rs:162-167 | crates/dbx-web/src/routes/table_export.rs:148-153 — before extracting anything, compare `crates/dbx-web/src/routes/query_result_export.rs` and `crates/dbx-web/src/routes/table_export.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (3–6 lines × 3) crates/dbx-core/src/schema/oracle_ddl_indexes.rs:835 — crates/dbx-core/src/schema/oracle_ddl_indexes.rs:835-840 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:857-862 | crates/dbx-core/src/schema/oracle_ddl_indexes.rs:874-876 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×3
  • Duplicated block (5 lines × 5) REDACTED:5359 — REDACTED:5359-5363 | REDACTED:6153-6157 | REDACTED:6176-6180 | REDACTED:6199-6203 | REDACTED:6230-6234 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 5) crates/dbx-drivers/src/db/couchdb_driver.rs:274 — crates/dbx-drivers/src/db/couchdb_driver.rs:274-278 | crates/dbx-drivers/src/db/couchdb_driver.rs:326-330 | crates/dbx-drivers/src/db/couchdb_driver.rs:387-391 | crates/dbx-drivers/src/db/couchdb_driver.rs:410-414 | crates/dbx-drivers/src/db/vector_driver.rs:664-668 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 5) REDACTED:2263 — REDACTED:2263-2267 | REDACTED:3170-3174 | REDACTED:3332-3336 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:435-439 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:498-502 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×3
  • Duplicated block (8 lines × 5) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:451 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:451-459 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:497-504 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:525-532 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:752-759 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:788-795 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:451` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:35 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:35-42 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:44-51 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:39-46 | agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:96-103 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:45-52 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:47` calls `sort`, `comparing` and `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:43` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 5) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:281 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:281-288 | agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:102-109 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:116-123 | agents/drivers/kylin/src/main/java/com/dbx/agent/kylin/KylinAgent.java:81-88 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:258-265 — before extracting anything, compare `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block with local edits (49 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (49 matched lines × 2 locations) apps/desktop/src/components/plugins/PluginFileManager.vue:190 — apps/desktop/src/components/plugins/PluginFileManager.vue:190 · apps/desktop/src/composables/usePluginShortcutHeight.ts:64 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (49 matched lines × 2 locations) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38 — apps/desktop/src/lib/table/oraclePackageSaveAs.ts:38 · apps/desktop/src/lib/table/oracleRoutineRename.ts:53 — the two spans are one implementation copied and then locally edited — 541 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (49 matched lines × 2 locations) apps/desktop/src/stores/savedSqlStore.ts:1017 — apps/desktop/src/stores/savedSqlStore.ts:1017 · apps/desktop/src/stores/transferTaskStore.ts:397 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
D1 · Cyclomatic Complexity · ConnectionConfig · ×2
  • ConnectionConfig::connection_url_with_host (cyclomatic 98) crates/dbx-types/src/models/connection.rs:1465 — ConnectionConfig::connection_url_with_host has cyclomatic complexity 98 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ConnectionConfig::redacted_connection_url_with_host (cyclomatic 87) crates/dbx-types/src/models/connection.rs:1294 — ConnectionConfig::redacted_connection_url_with_host has cyclomatic complexity 87 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MqttClient · ×2
  • MqttClient::spawn_v4_event_loop (cyclomatic 33) crates/dbx-core/src/admin/mqtt/client.rs:432 — MqttClient::spawn_v4_event_loop has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MqttClient::spawn_v5_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • MqttClient::spawn_v5_event_loop (cyclomatic 33) crates/dbx-core/src/admin/mqtt/client.rs:550 — MqttClient::spawn_v5_event_loop has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MqttClient::spawn_v4_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · dbx_mcp · ×2
  • dbx_mcp::transaction::handle_command (cyclomatic 23) crates/dbx-mcp/src/transaction.rs:503 — dbx_mcp::transaction::handle_command has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • dbx_mcp::server::validate_transaction_sql_shape (cyclomatic 18) crates/dbx-mcp/src/server.rs:4656 — dbx_mcp::server::validate_transaction_sql_shape has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.executeTabSql · ×2
  • queryStore.useQueryStore.executeTabSql::bindLargeValueContext (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:9244 — queryStore.useQueryStore.executeTabSql::bindLargeValueContext has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:9297 — queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::bindLargeValueContext) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · MqttClient · ×2
  • MqttClient::spawn_v4_event_loop (cognitive 74) crates/dbx-core/src/admin/mqtt/client.rs:432 — MqttClient::spawn_v4_event_loop has cognitive complexity 74 (threshold 15). Drivers by points: if/else 16 (64 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MqttClient::spawn_v5_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • MqttClient::spawn_v5_event_loop (cognitive 74) crates/dbx-core/src/admin/mqtt/client.rs:550 — MqttClient::spawn_v5_event_loop has cognitive complexity 74 (threshold 15). Drivers by points: if/else 16 (64 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MqttClient::spawn_v4_event_loop) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ConnectionConfig · ×2
  • ConnectionConfig::connection_url_with_host (cognitive 71) crates/dbx-types/src/models/connection.rs:1465 — ConnectionConfig::connection_url_with_host has cognitive complexity 71 (threshold 15). Drivers by points: if/else 42 (65 pts), boolean chains 5, match/switch 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ConnectionConfig::redacted_connection_url_with_host (cognitive 47) crates/dbx-types/src/models/connection.rs:1294 — ConnectionConfig::redacted_connection_url_with_host has cognitive complexity 47 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 2, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OraclePlSqlBlock · ×2
  • OraclePlSqlBlock::is_complete (cognitive 42) crates/dbx-sql-core/src/sql.rs:3700 — OraclePlSqlBlock::is_complete has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 6, match/switch 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • OraclePlSqlBlock::with_function_is_complete (cognitive 22) crates/dbx-sql-core/src/sql.rs:3814 — OraclePlSqlBlock::with_function_is_complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.executeTabSql · ×2
  • queryStore.useQueryStore.executeTabSql::bindLargeValueContext (cognitive 42) apps/desktop/src/stores/queryStore.ts:9244 — queryStore.useQueryStore.executeTabSql::bindLargeValueContext has cognitive complexity 42 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 6 (16 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction (cognitive 20) apps/desktop/src/stores/queryStore.ts:9297 — queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 5, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql, queryStore.useQueryStore.executeTabSql::bindLargeValueContext) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · dbx_cli · ×2
  • dbx_cli::run_query (cognitive 35) crates/dbx-cli/src/main.rs:303 — dbx_cli::run_query has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 9, match/switch 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • dbx_cli::run_context (cognitive 18) crates/dbx-cli/src/main.rs:407 — dbx_cli::run_context has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 3 (4 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · dbx_tdengine_driver · ×2
  • dbx_tdengine_driver::runtime::run (cognitive 32) agents/drivers/tdengine/src/runtime.rs:67 — dbx_tdengine_driver::runtime::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (11 pts), loops 5 (8 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_tdengine_driver::runtime::error_response (cognitive 17) agents/drivers/tdengine/src/runtime.rs:455 — dbx_tdengine_driver::runtime::error_response has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TextEncoding · ×2
  • TextEncoding::encode_copy_text (cognitive 29) crates/dbx-driver-postgres/src/text_encoding.rs:149 — TextEncoding::encode_copy_text has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (9 pts), match/switch 2 (8 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TextEncoding::encode_sql (cognitive 19) crates/dbx-driver-postgres/src/text_encoding.rs:75 — TextEncoding::encode_sql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_mcp · ×2
  • dbx_mcp::transaction::handle_command (cognitive 27) crates/dbx-mcp/src/transaction.rs:503 — dbx_mcp::transaction::handle_command has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 7 (10 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • dbx_mcp::server::validate_transaction_sql_shape (cognitive 18) crates/dbx-mcp/src/server.rs:4656 — dbx_mcp::server::validate_transaction_sql_shape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableColumnDefinitionPaste.validateDefaultExpression · ×2
  • tableColumnDefinitionPaste.validateDefaultExpression::operand (cognitive 27) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:99 — tableColumnDefinitionPaste.validateDefaultExpression::operand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (tableColumnDefinitionPaste.validateDefaultExpression::expression) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • tableColumnDefinitionPaste.validateDefaultExpression::expression (cognitive 18) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:131 — tableColumnDefinitionPaste.validateDefaultExpression::expression has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (tableColumnDefinitionPaste.validateDefaultExpression::operand) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · dbx_plugin_packager · ×2
  • dbx_plugin_packager::run_package_cli (cognitive 22) plugins/sdk/packager/src/main.rs:80 — dbx_plugin_packager::run_package_cli has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • dbx_plugin_packager::validate_unsigned_candidate (cognitive 21) plugins/sdk/packager/src/main.rs:316 — dbx_plugin_packager::validate_unsigned_candidate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegacyReader · ×2
  • LegacyReader::list_objects (cognitive 21) crates/dbx-core/src/schema/oracle_triggers.rs:262 — LegacyReader::list_objects has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (6 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LegacyReader::source (cognitive 20) crates/dbx-core/src/schema/oracle_triggers.rs:480 — LegacyReader::source has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitDiffScanner · ×2
  • GitDiffScanner::parse_diff_output (cognitive 18) crates/dbx-sql-schema/src/sql_parser/git.rs:117 — GitDiffScanner::parse_diff_output has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • GitDiffScanner::build_sql_filter (cognitive 17) crates/dbx-sql-schema/src/sql_parser/git.rs:89 — GitDiffScanner::build_sql_filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) crates/dbx-web/src/routes/schema.rs:715 — crates/dbx-web/src/routes/schema.rs:715-730 | crates/dbx-web/src/routes/schema.rs:735-750 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/dbx-driver-agent/src/agent_driver.rs:2706 — crates/dbx-driver-agent/src/agent_driver.rs:2706-2725 | crates/dbx-driver-agent/src/agent_driver.rs:2769-2786 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×2
  • Duplicated block (34 lines × 2) crates/dbx-drivers/src/db/couchdb_driver.rs:544 — crates/dbx-drivers/src/db/couchdb_driver.rs:544-577 | crates/dbx-drivers/src/db/solr_driver.rs:921-954 — before extracting anything, compare `crates/dbx-drivers/src/db/couchdb_driver.rs` and `crates/dbx-drivers/src/db/solr_driver.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 141 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (34 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:92 — agents/drivers/argo-go/bench/functional_probe.py:92-125 | agents/drivers/hive-go/bench/functional_probe.py:92-125 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) REDACTED:3658 — REDACTED:3658-3689 | REDACTED:4402-4433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (32 lines × 2) REDACTED:79 — REDACTED:79-110 | REDACTED:79-110 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×2
  • Duplicated block (18–21 lines × 2) crates/dbx-mcp/src/server.rs:1692 — crates/dbx-mcp/src/server.rs:1692-1712 | crates/dbx-mcp/src/server.rs:2019-2036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–21 lines × 2) crates/dbx-sql-data/src/query_result_sql.rs:1248 — crates/dbx-sql-data/src/query_result_sql.rs:1248-1265 | crates/dbx-sql-data/src/query_result_sql.rs:2792-2812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×2
  • Duplicated block (19 lines × 3) crates/dbx-core/src/data/transfer.rs:10213 — crates/dbx-core/src/data/transfer.rs:10213-10231 | crates/dbx-core/src/data/transfer.rs:10362-10380 | crates/dbx-core/src/data/transfer.rs:10459-10477 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (19 lines × 3) REDACTED:403 — REDACTED:403-421 | crates/dbx-drivers/src/db/rqlite_driver.rs:285-303 | crates/dbx-drivers/src/db/turso_driver.rs:346-364 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×2
  • Duplicated block (16–19 lines × 2) REDACTED:3598 — REDACTED:3598-3613 | src-tauri/src/commands/connection.rs:2537-2555 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16–19 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/dialect.rs:184 — crates/dbx-sql-schema/src/table_structure_sql/dialect.rs:184-199 | crates/dbx-sql-schema/src/table_structure_sql/dialect.rs:264-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×2
  • Duplicated block (16–18 lines × 2) crates/dbx-core/src/data/transfer.rs:11189 — crates/dbx-core/src/data/transfer.rs:11189-11204 | crates/dbx-core/src/data/transfer.rs:12459-12476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16–18 lines × 2) src-tauri/src/commands/connection.rs:1950 — src-tauri/src/commands/connection.rs:1950-1967 | src-tauri/src/commands/connection.rs:2518-2533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×2
  • Duplicated block (17 lines × 3) crates/dbx-ai-provider/src/ai.rs:3921 — crates/dbx-ai-provider/src/ai.rs:3921-3937 | crates/dbx-ai-provider/src/ai.rs:4172-4188 | crates/dbx-ai-provider/src/ai.rs:4266-4282 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (17 lines × 3) REDACTED:132 — REDACTED:132-148 | agents/drivers/cassandra-go/bench/agent_compare.py:104-120 | REDACTED:132-148 — before extracting anything, compare `REDACTED` and `agents/drivers/cassandra-go/bench/agent_compare.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) crates/dbx-mcp/src/server.rs:2812 — crates/dbx-mcp/src/server.rs:2812-2827 | crates/dbx-mcp/src/server.rs:2870-2885 | crates/dbx-mcp/src/server.rs:2936-2951 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (16 lines × 3) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:207 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:207-222 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:339-354 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:291-306 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×2
  • Duplicated block (14–16 lines × 2) agents/drivers/duckdb/src/sql.rs:405 — agents/drivers/duckdb/src/sql.rs:405-418 | crates/dbx-sql-core/src/sql.rs:3381-3396 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-sql-core/src/sql.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14–16 lines × 2) REDACTED:245 — REDACTED:245-260 | plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:385-398 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:245` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–16 lines × 2) · ×2
  • Duplicated block (12–16 lines × 2) REDACTED:1346 — REDACTED:1346-1357 | REDACTED:2226-2241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–16 lines × 2) crates/dbx-mcp/src/server.rs:1722 — crates/dbx-mcp/src/server.rs:1722-1737 | crates/dbx-mcp/src/server.rs:2044-2055 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×2
  • Duplicated block (15 lines × 3) crates/dbx-mcp/src/server.rs:2327 — crates/dbx-mcp/src/server.rs:2327-2341 | crates/dbx-mcp/src/server.rs:2371-2385 | crates/dbx-mcp/src/server.rs:2412-2426 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) crates/dbx-web/src/routes/document_store.rs:15 — crates/dbx-web/src/routes/document_store.rs:15-29 | crates/dbx-web/src/routes/mongo.rs:28-42 | crates/dbx-web/src/routes/schema.rs:45-59 — before extracting anything, compare `crates/dbx-web/src/routes/document_store.rs` and `crates/dbx-web/src/routes/mongo.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×2
  • Duplicated block (11–14 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:5427 — crates/dbx-driver-mysql/src/mysql.rs:5427-5437 | crates/dbx-driver-mysql/src/mysql.rs:5463-5476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–14 lines × 2) REDACTED:1403 — REDACTED:1403-1416 | REDACTED:1449-1459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1403` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) crates/dbx-mcp/src/server.rs:1301 — crates/dbx-mcp/src/server.rs:1301-1313 | crates/dbx-mcp/src/server.rs:1374-1384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–13 lines × 2) crates/dbx-web/src/routes/sql_file.rs:521 — crates/dbx-web/src/routes/sql_file.rs:521-533 | src-tauri/src/commands/sql_file.rs:348-358 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) REDACTED:4577 — REDACTED:4577-4588 | REDACTED:5021-5032 | REDACTED:5081-5092 | REDACTED:5141-5152 | REDACTED:5207-5218 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 5) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:261 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:261-272 | agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:300-311 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:172-183 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:242-253 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:281-292 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×2
  • Duplicated block (10–12 lines × 2) crates/dbx-core/src/admin/nacos/batch.rs:297 — crates/dbx-core/src/admin/nacos/batch.rs:297-308 | crates/dbx-core/src/admin/nacos/http.rs:1182-1191 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10–12 lines × 2) REDACTED:732 — REDACTED:732-741 | REDACTED:783-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×2
  • Duplicated block (8 lines × 6) crates/dbx-core/src/query/redis_ops.rs:181 — crates/dbx-core/src/query/redis_ops.rs:181-188 | crates/dbx-core/src/query/redis_ops.rs:211-218 | crates/dbx-core/src/query/redis_ops.rs:240-247 | crates/dbx-core/src/query/redis_ops.rs:268-275 | crates/dbx-core/src/query/redis_ops.rs:371-378 | crates/dbx-core/src/query/redis_ops.rs:403-410 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 6) crates/dbx-mcp/src/server.rs:1300 — crates/dbx-mcp/src/server.rs:1300-1307 | crates/dbx-mcp/src/server.rs:1373-1380 | crates/dbx-mcp/src/server.rs:1440-1447 | crates/dbx-mcp/src/server.rs:1475-1482 | crates/dbx-mcp/src/server.rs:2716-2723 | crates/dbx-mcp/src/server.rs:3012-3019 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×2
  • Duplicated block (7–8 lines × 3) REDACTED:7354 — REDACTED:7354-7361 | REDACTED:7384-7390 | REDACTED:7414-7421 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7–8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:427 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:427-434 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:581-588 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:672-678 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:590` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:680` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–8 lines × 3) · ×2
  • Duplicated block (6–8 lines × 3) crates/dbx-sql-schema/src/native_job_changes/dameng.rs:297 — crates/dbx-sql-schema/src/native_job_changes/dameng.rs:297-304 | crates/dbx-sql-schema/src/native_job_changes/dameng.rs:306-313 | crates/dbx-sql-schema/src/native_job_changes/dameng.rs:314-319 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6–8 lines × 3) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:432 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:432-437 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:585-591 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:743-750 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:430` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:583` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) crates/dbx-core/src/safety/production_safety.rs:150 — crates/dbx-core/src/safety/production_safety.rs:150-156 | crates/dbx-core/src/safety/production_safety.rs:169-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–7 lines × 2) REDACTED:128 — REDACTED:128-134 | REDACTED:150-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×2
  • Duplicated block (6 lines × 6) crates/dbx-core/src/query/redis_ops.rs:974 — crates/dbx-core/src/query/redis_ops.rs:974-979 | crates/dbx-core/src/query/redis_ops.rs:1158-1163 | crates/dbx-core/src/query/redis_ops.rs:1208-1213 | crates/dbx-core/src/query/redis_ops.rs:1233-1238 | crates/dbx-core/src/query/redis_ops.rs:1339-1344 | crates/dbx-core/src/query/redis_ops.rs:1401-1406 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 6) REDACTED:3313 — REDACTED:3313-3318 | REDACTED:3335-3340 | REDACTED:3380-3385 | REDACTED:5364-5369 | REDACTED:5379-5384 | REDACTED:5425-5430 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×2
  • Duplicated block (6 lines × 5) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:139 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:139-144 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:219-224 | crates/dbx-ai-provider/src/ai_codex_cli.rs:226-231 | crates/dbx-ai-provider/src/ai_grok_cli.rs:189-194 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:71-76 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:166 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:166-171 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:246-251 | crates/dbx-ai-provider/src/ai_codex_cli.rs:247-252 | crates/dbx-ai-provider/src/ai_grok_cli.rs:216-221 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:98-103 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×2
  • Duplicated block (9 lines × 7) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:177 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:177-185 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:257-265 | crates/dbx-ai-provider/src/ai_codex_cli.rs:478-486 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:148-156 | crates/dbx-ai-provider/src/ai_grok_cli.rs:227-235 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:219-227 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:109-117 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 7) crates/dbx-web/src/routes/consul.rs:14 — crates/dbx-web/src/routes/consul.rs:14-22 | crates/dbx-web/src/routes/document_store.rs:35-43 | crates/dbx-web/src/routes/etcd.rs:16-24 | crates/dbx-web/src/routes/hbase.rs:15-23 | crates/dbx-web/src/routes/mongo.rs:49-57 | crates/dbx-web/src/routes/redis.rs:17-25 | crates/dbx-web/src/routes/zookeeper.rs:14-22 — before extracting anything, compare `crates/dbx-web/src/routes/document_store.rs` and `crates/dbx-web/src/routes/mongo.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–8 lines × 4) · ×2
  • Duplicated block (6–8 lines × 4) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:207 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:207-214 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:165-170 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:289-294 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:175-180 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6–8 lines × 4) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:206 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:206-213 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:164-169 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:308-313 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:174-179 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
R10 · Code Duplication · Duplicated block with local edits (73 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (73 matched lines × 2 locations) apps/desktop/src/lib/app/documentJsonValues.ts:306 — apps/desktop/src/lib/app/documentJsonValues.ts:306 · apps/desktop/src/lib/common/safeJsonFormat.ts:462 — the two spans are one implementation copied and then locally edited — 596 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (73 matched lines × 2 locations) apps/desktop/src/lib/metadata/objectDdlCache.ts:193 — apps/desktop/src/lib/metadata/objectDdlCache.ts:193 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:131 — the two spans are one implementation copied and then locally edited — 569 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (57 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (57 matched lines × 2 locations) apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12 — apps/desktop/src/components/mq/ProducerConsumerPanel.vue:12 · apps/desktop/src/components/mq/SendMessagePanel.vue:12 — the two spans are one implementation copied and then locally edited — 390 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (57 matched lines × 2 locations) apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20 — apps/desktop/src/components/plugins/PluginFilesystemTab.vue:20 · apps/desktop/src/components/plugins/PluginWorkbenchTab.vue:27 — the two spans are one implementation copied and then locally edited — 408 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (50 lines × 2 locations) · ×2
  • Duplicated block (50 lines × 2 locations) apps/desktop/src/components/generate/params/IdNumberParams.vue:37 — apps/desktop/src/components/generate/params/IdNumberParams.vue:37 · apps/desktop/src/lib/dataGrid/dataGenerate.ts:704 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (50 lines × 2 locations) apps/desktop/src/lib/backend/tauri.ts:391 — apps/desktop/src/lib/backend/tauri.ts:391 · apps/desktop/src/stores/settingsStore.ts:88 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (48 matched lines × 2 locations) apps/desktop/src/components/objects/ObjectBrowser.vue:4738 — apps/desktop/src/components/objects/ObjectBrowser.vue:4738 · apps/desktop/src/components/objects/ObjectSourceDialog.vue:276 — the two spans are one implementation copied and then locally edited — 282 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (48 matched lines × 2 locations) apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20 — apps/desktop/src/components/sidebar/VisibleNacosNamespacesDialog.vue:20 · apps/desktop/src/components/sidebar/VisibleSchemasDialog.vue:33 — the two spans are one implementation copied and then locally edited — 334 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (47 matched lines × 2 locations) apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160 — apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:160 · apps/desktop/src/components/diff/SchemaDiffConfigStep.vue:370 — the two spans are one implementation copied and then locally edited — 343 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (47 matched lines × 2 locations) apps/desktop/src/components/editor/EditorSettingsDialog.vue:809 — apps/desktop/src/components/editor/EditorSettingsDialog.vue:809 · apps/desktop/src/components/editor/EditorSettingsDialog.vue:990 — the two spans are one implementation copied and then locally edited — 534 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×2
  • Duplicated block (45 lines × 2 locations) apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:860 — apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:860 · apps/desktop/src/components/diagram/SchemaDiagramDialog.vue:906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (45 lines × 2 locations) apps/desktop/src/lib/backend/http.ts:3742 — apps/desktop/src/lib/backend/http.ts:3742 · apps/desktop/src/lib/backend/http.ts:3815 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R7 · Dead Code · Dead file (~3 LoC) · ×2
  • Dead file (~3 LoC) deploy/database/mongodb/5.0/init/001-smoke.js — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~3 LoC) deploy/database/mongodb/8.2/init/001-smoke.js — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X15 · Unvalidated length from an untrusted reader · Length read from the parsed input is spent without ever being bounded · ×2
  • Length read from the parsed input is spent without ever being bounded crates/dbx-driver-support/src/navicat_mysql_tunnel.rs:406 — `column_count` is read from the bytes being parsed at line 390 (`u32::from_be_bytes`), then used to size a `Vec::with_capacity` at line 406 — and nowhere in its scope is `column_count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `column_count` against the bytes actually remaining and a maximum the format allows before allocating.
  • Length read from the parsed input is spent without ever being bounded REDACTED:3363 — `len` is read from the bytes being parsed at line 3361 (`u32::from_le_bytes`), then used to size a `vec![…; n]` at line 3363 — and nowhere in its scope is `len` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `len` against the bytes actually remaining and a maximum the format allows before allocating.
AC3 · Page structure · Empty <h3> heading · ×1
  • Empty <h3> heading apps/desktop/src/components/diagram/DiagramInspector.vue:420 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×1
  • Heading level jumps from h2 to h4 dbx-er-diagram-architecture.html:699 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus apps/desktop/src/components/ai/rich/AiHtmlPreview.vue:104 — This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-vuejs-accessibility) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 620 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.executeTabSql (cyclomatic 569) · ×1
  • queryStore.useQueryStore.executeTabSql (cyclomatic 569) apps/desktop/src/stores/queryStore.ts:8102 — queryStore.useQueryStore.executeTabSql has cyclomatic complexity 569 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql::bindLargeValueContext, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 278) · ×1
  • settingsStore.useSettingsStore.applyEditorSettingsPatch (cyclomatic 278) apps/desktop/src/stores/settingsStore.ts:3005 — settingsStore.useSettingsStore.applyEditorSettingsPatch has cyclomatic complexity 278 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.fetchCapturedTabResultForExport (cyclomatic 186) · ×1
  • queryStore.useQueryStore.fetchCapturedTabResultForExport (cyclomatic 186) apps/desktop/src/stores/queryStore.ts:10991 — queryStore.useQueryStore.fetchCapturedTabResultForExport has cyclomatic complexity 186 (threshold 15). Of this number, 155 points are the body's own statements and 31 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginHostBridge.dispatch (cyclomatic 174) · ×1
  • PluginHostBridge.dispatch (cyclomatic 174) REDACTED:648 — PluginHostBridge.dispatch has cyclomatic complexity 174 (threshold 15). Of this number, 173 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsStore.normalizeEditorSettings (cyclomatic 147) · ×1
  • settingsStore.normalizeEditorSettings (cyclomatic 147) apps/desktop/src/stores/settingsStore.ts:2014 — settingsStore.normalizeEditorSettings has cyclomatic complexity 147 (threshold 15). Of this number, 137 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cyclomatic 146) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cyclomatic 146) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1582 — useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult has cyclomatic complexity 146 (threshold 15). Of this number, 118 points are the body's own statements and 28 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTypeManagement.prepareOracleTypeManagement (cyclomatic 141) · ×1
  • oracleTypeManagement.prepareOracleTypeManagement (cyclomatic 141) apps/desktop/src/lib/table/oracleTypeManagement.ts:230 — oracleTypeManagement.prepareOracleTypeManagement has cyclomatic complexity 141 (threshold 15). Of this number, 118 points are the body's own statements and 23 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsonRpcServer.dispatch (cyclomatic 132) · ×1
  • JsonRpcServer.dispatch (cyclomatic 132) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:211 — JsonRpcServer.dispatch has cyclomatic complexity 132 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cyclomatic 132) · ×1
  • useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cyclomatic 132) apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38 — useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData has cyclomatic complexity 132 (threshold 15). Of this number, 104 points are the body's own statements and 28 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cyclomatic 117) · ×1
  • useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cyclomatic 117) apps/desktop/src/components/editor/useQueryEditorObjectNavigation.ts:91 — useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown has cyclomatic complexity 117 (threshold 15). Of this number, 16 points are the body's own statements and 101 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportLocalSnapshot (cyclomatic 117) · ×1
  • useDataGridExport.useDataGridExport.exportLocalSnapshot (cyclomatic 117) apps/desktop/src/composables/useDataGridExport.ts:1139 — useDataGridExport.useDataGridExport.exportLocalSnapshot has cyclomatic complexity 117 (threshold 15). Of this number, 49 points are the body's own statements and 68 belong to 13 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createMockHost (cyclomatic 117) · ×1
  • createMockHost (cyclomatic 117) plugins/sdk/dev-host/server.mjs:77 — createMockHost has cyclomatic complexity 117 (threshold 15). Of this number, 25 points are the body's own statements and 92 belong to 28 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.saveChanges (cyclomatic 113) · ×1
  • useDataGridEditor.useDataGridEditor.saveChanges (cyclomatic 113) apps/desktop/src/composables/useDataGridEditor.ts:2440 — useDataGridEditor.useDataGridEditor.saveChanges has cyclomatic complexity 113 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.splitSqlStatementRanges (cyclomatic 108) · ×1
  • sqlStatementRanges.splitSqlStatementRanges (cyclomatic 108) apps/desktop/src/lib/sql/sqlStatementRanges.ts:411 — sqlStatementRanges.splitSqlStatementRanges has cyclomatic complexity 108 (threshold 15). Of this number, 94 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTreeNodeChildren (cyclomatic 107) · ×1
  • connectionStore.useConnectionStore.loadTreeNodeChildren (cyclomatic 107) apps/desktop/src/stores/connectionStore.ts:8584 — connectionStore.useConnectionStore.loadTreeNodeChildren has cyclomatic complexity 107 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGenerate.buildDefaultGeneratorParams (cyclomatic 102) · ×1
  • dataGenerate.buildDefaultGeneratorParams (cyclomatic 102) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1259 — dataGenerate.buildDefaultGeneratorParams has cyclomatic complexity 102 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cyclomatic 99) · ×1
  • oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cyclomatic 99) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:111 — oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot has cyclomatic complexity 99 (threshold 15). Of this number, 98 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableColumnDefinitionPaste.parseColumn (cyclomatic 99) · ×1
  • tableColumnDefinitionPaste.parseColumn (cyclomatic 99) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:156 — tableColumnDefinitionPaste.parseColumn has cyclomatic complexity 99 (threshold 15). Of this number, 86 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferDdl.rewriteCreateTableName (cyclomatic 97) · ×1
  • queryResultTransferDdl.rewriteCreateTableName (cyclomatic 97) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:231 — queryResultTransferDdl.rewriteCreateTableName has cyclomatic complexity 97 (threshold 15). Of this number, 84 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.queryResultTransferTargetType (cyclomatic 95) · ×1
  • queryResultTransferValues.queryResultTransferTargetType (cyclomatic 95) apps/desktop/src/components/transfer/queryResultTransferValues.ts:158 — queryResultTransferValues.queryResultTransferTargetType has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.buildNativeJobDefinitionEdit (cyclomatic 95) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionEdit (cyclomatic 95) apps/desktop/src/lib/database/nativeJobAdmin.ts:147 — nativeJobAdmin.buildNativeJobDefinitionEdit has cyclomatic complexity 95 (threshold 15). Of this number, 78 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · treeNodeIcon.getTreeNodeIconInfo (cyclomatic 94) · ×1
  • treeNodeIcon.getTreeNodeIconInfo (cyclomatic 94) apps/desktop/src/lib/sidebar/treeNodeIcon.ts:10 — treeNodeIcon.getTreeNodeIconInfo has cyclomatic complexity 94 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.explainTabSql (cyclomatic 94) · ×1
  • queryStore.useQueryStore.explainTabSql (cyclomatic 94) apps/desktop/src/stores/queryStore.ts:10029 — queryStore.useQueryStore.explainTabSql has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cyclomatic 93) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cyclomatic 93) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:774 — useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions has cyclomatic complexity 93 (threshold 15). Of this number, 88 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.compressSqlText (cyclomatic 92) · ×1
  • sqlFormatter.compressSqlText (cyclomatic 92) apps/desktop/src/lib/sql/sqlFormatter.ts:982 — sqlFormatter.compressSqlText has cyclomatic complexity 92 (threshold 15). Of this number, 66 points are the body's own statements and 26 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.executeTargetSql (cyclomatic 90) · ×1
  • useSqlExecution.useSqlExecution.executeTargetSql (cyclomatic 90) apps/desktop/src/composables/useSqlExecution.ts:625 — useSqlExecution.useSqlExecution.executeTargetSql has cyclomatic complexity 90 (threshold 15). Of this number, 77 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.executeOracleConstraintPlan (cyclomatic 90) · ×1
  • oracleConstraints.executeOracleConstraintPlan (cyclomatic 90) apps/desktop/src/lib/database/oracleConstraints.ts:720 — oracleConstraints.executeOracleConstraintPlan has cyclomatic complexity 90 (threshold 15). Of this number, 88 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · starrocksAlterOptions.starRocksAlterOptionsFromDdl (cyclomatic 90) · ×1
  • starrocksAlterOptions.starRocksAlterOptionsFromDdl (cyclomatic 90) apps/desktop/src/lib/table/starrocksAlterOptions.ts:45 — starrocksAlterOptions.starRocksAlterOptionsFromDdl has cyclomatic complexity 90 (threshold 15). Of this number, 62 points are the body's own statements and 28 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlCompletionProvider.build (cyclomatic 89) · ×1
  • SqlCompletionProvider.build (cyclomatic 89) apps/desktop/src/lib/sql/sqlCompletion.ts:1997 — SqlCompletionProvider.build has cyclomatic complexity 89 (threshold 15). Of this number, 88 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cyclomatic 87) · ×1
  • useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cyclomatic 87) apps/desktop/src/components/editor/useQueryEditorHover.ts:83 — useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip has cyclomatic complexity 87 (threshold 15). Of this number, 74 points are the body's own statements and 13 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cyclomatic 87) · ×1
  • connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cyclomatic 87) apps/desktop/src/stores/connectionStore.ts:7604 — connectionStore.useConnectionStore.loadMoreObjectGroupChildren has cyclomatic complexity 87 (threshold 15). Most of this is not in the body itself: 13 of the 87 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 7647, searchIsCurrent, a function literal at line 7668, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DriversClient.DriversClient (cyclomatic 86) · ×1
  • DriversClient.DriversClient (cyclomatic 86) docs/app/[lang]/drivers/DriversClient.tsx:216 — DriversClient.DriversClient has cyclomatic complexity 86 (threshold 15). Of this number, 49 points are the body's own statements and 37 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.getSqlCompletionContext (cyclomatic 85) · ×1
  • sqlCompletion.getSqlCompletionContext (cyclomatic 85) apps/desktop/src/lib/sql/sqlCompletion.ts:2914 — sqlCompletion.getSqlCompletionContext has cyclomatic complexity 85 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.getFunctionDescriptions (cyclomatic 84) · ×1
  • sqlCompletion.getFunctionDescriptions (cyclomatic 84) apps/desktop/src/lib/sql/sqlCompletion.ts:1051 — sqlCompletion.getFunctionDescriptions has cyclomatic complexity 84 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SqlStatementSplitter · ×1
  • SqlStatementSplitter::push_chunk_with_control (cyclomatic 82) crates/dbx-sql-core/src/sql.rs:742 — SqlStatementSplitter::push_chunk_with_control has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.onReloadData (cyclomatic 82) · ×1
  • useDataGridActions.useDataGridActions.onReloadData (cyclomatic 82) apps/desktop/src/composables/useDataGridActions.ts:319 — useDataGridActions.useDataGridActions.onReloadData has cyclomatic complexity 82 (threshold 15). Of this number, 70 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.executeOracleForeignKeyPlan (cyclomatic 81) · ×1
  • oracleForeignKeys.executeOracleForeignKeyPlan (cyclomatic 81) apps/desktop/src/lib/database/oracleForeignKeys.ts:699 — oracleForeignKeys.executeOracleForeignKeyPlan has cyclomatic complexity 81 (threshold 15). Of this number, 73 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineBlockLayout.indentRoutineBlocks (cyclomatic 80) · ×1
  • routineBlockLayout.indentRoutineBlocks (cyclomatic 80) apps/desktop/src/lib/sql/routineBlockLayout.ts:90 — routineBlockLayout.indentRoutineBlocks has cyclomatic complexity 80 (threshold 15). Of this number, 77 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlParameters.findSqlParameterOccurrences (cyclomatic 80) · ×1
  • sqlParameters.findSqlParameterOccurrences (cyclomatic 80) apps/desktop/src/lib/sql/sqlParameters.ts:408 — sqlParameters.findSqlParameterOccurrences has cyclomatic complexity 80 (threshold 15). Of this number, 78 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cyclomatic 79) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cyclomatic 79) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:62 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions has cyclomatic complexity 79 (threshold 15). Of this number, 25 points are the body's own statements and 54 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cyclomatic 78) · ×1
  • oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cyclomatic 78) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:260 — oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.parseMongoWriteCommand (cyclomatic 78) · ×1
  • mongoShellCommand.parseMongoWriteCommand (cyclomatic 78) REDACTED:912 — mongoShellCommand.parseMongoWriteCommand has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarActiveTabTarget.matchesTarget (cyclomatic 75) · ×1
  • sidebarActiveTabTarget.matchesTarget (cyclomatic 75) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:312 — sidebarActiveTabTarget.matchesTarget has cyclomatic complexity 75 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Plan.read (cyclomatic 74) · ×1
  • Plan.read (cyclomatic 74) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:510 — Plan.read has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · openTabsPersistence.serializeOpenTabs (cyclomatic 73) · ×1
  • openTabsPersistence.serializeOpenTabs (cyclomatic 73) apps/desktop/src/lib/app/openTabsPersistence.ts:180 — openTabsPersistence.serializeOpenTabs has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 1 of the 73 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 181, 243). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · canvasDataGridRenderer.drawCanvasDataGrid (cyclomatic 73) · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid (cyclomatic 73) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:406 — canvasDataGridRenderer.drawCanvasDataGrid has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid::drawCell) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlFormatter.maskStringAndCommentSpans (cyclomatic 73) · ×1
  • sqlFormatter.maskStringAndCommentSpans (cyclomatic 73) apps/desktop/src/lib/sql/sqlFormatter.ts:613 — sqlFormatter.maskStringAndCommentSpans has cyclomatic complexity 73 (threshold 15). Of this number, 62 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.queryResultTransferSqlLiteral (cyclomatic 71) · ×1
  • queryResultTransferValues.queryResultTransferSqlLiteral (cyclomatic 71) apps/desktop/src/components/transfer/queryResultTransferValues.ts:412 — queryResultTransferValues.queryResultTransferSqlLiteral has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportMemoryDataFile (cyclomatic 71) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryDataFile (cyclomatic 71) apps/desktop/src/composables/useDataGridExport.ts:1373 — useDataGridExport.useDataGridExport.exportMemoryDataFile has cyclomatic complexity 71 (threshold 15). Of this number, 36 points are the body's own statements and 35 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · canvasDataGridRenderer.drawCanvasDataGrid · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid::drawCell (cyclomatic 71) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:610 — canvasDataGridRenderer.drawCanvasDataGrid::drawCell has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTables (cyclomatic 71) · ×1
  • connectionStore.useConnectionStore.loadTables (cyclomatic 71) apps/desktop/src/stores/connectionStore.ts:7212 — connectionStore.useConnectionStore.loadTables has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 15 of the 71 points are its own statements and the rest belongs to one function literal inside it that branches (line 7252). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · createMockHost.bridge (cyclomatic 71) · ×1
  • createMockHost.bridge (cyclomatic 71) plugins/sdk/dev-host/server.mjs:267 — createMockHost.bridge has cyclomatic complexity 71 (threshold 15). Of this number, 65 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadObjectGroupFirstPage (cyclomatic 70) · ×1
  • connectionStore.useConnectionStore.loadObjectGroupFirstPage (cyclomatic 70) apps/desktop/src/stores/connectionStore.ts:7378 — connectionStore.useConnectionStore.loadObjectGroupFirstPage has cyclomatic complexity 70 (threshold 15). Of this number, 17 points are the body's own statements and 53 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cyclomatic 69) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cyclomatic 69) apps/desktop/src/composables/useDataGridExport.ts:1929 — useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 13 of the 69 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 2025, resourcesCurrent, a function literal at line 2019, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · tokens.tokenizeSqlSemantic (cyclomatic 69) · ×1
  • tokens.tokenizeSqlSemantic (cyclomatic 69) apps/desktop/src/lib/sql/semantic/tokens.ts:106 — tokens.tokenizeSqlSemantic has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferSource.loadQueryResultTransferSourceDdl (cyclomatic 68) · ×1
  • queryResultTransferSource.loadQueryResultTransferSourceDdl (cyclomatic 68) apps/desktop/src/components/transfer/queryResultTransferSource.ts:23 — queryResultTransferSource.loadQueryResultTransferSourceDdl has cyclomatic complexity 68 (threshold 15). Of this number, 55 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineRename.executeOracleRoutineRename (cyclomatic 68) · ×1
  • oracleRoutineRename.executeOracleRoutineRename (cyclomatic 68) apps/desktop/src/lib/table/oracleRoutineRename.ts:470 — oracleRoutineRename.executeOracleRoutineRename has cyclomatic complexity 68 (threshold 15). Of this number, 66 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.createMockHost.bridge (cyclomatic 68) · ×1
  • server.createMockHost.bridge (cyclomatic 68) plugins/sdk/dev-host/server.mjs:267 — server.createMockHost.bridge has cyclomatic complexity 68 (threshold 15). Of this number, 62 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MysqlDumpBinaryLiteralNormalizer · ×1
  • MysqlDumpBinaryLiteralNormalizer::normalize (cyclomatic 67) REDACTED:1701 — MysqlDumpBinaryLiteralNormalizer::normalize has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.parse (cyclomatic 67) · ×1
  • PlDebugObjectConstructors.parse (cyclomatic 67) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:175 — PlDebugObjectConstructors.parse has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSchemaDiffSession.runSchemaDiffSession (cyclomatic 67) · ×1
  • useSchemaDiffSession.runSchemaDiffSession (cyclomatic 67) apps/desktop/src/composables/useSchemaDiffSession.ts:163 — useSchemaDiffSession.runSchemaDiffSession has cyclomatic complexity 67 (threshold 15). Of this number, 63 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabPresentation.tabDisplayTitle (cyclomatic 67) · ×1
  • tabPresentation.tabDisplayTitle (cyclomatic 67) apps/desktop/src/lib/tabs/tabPresentation.ts:270 — tabPresentation.tabDisplayTitle has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.buildRequest (cyclomatic 66) · ×1
  • useDataGridExtractor.useDataGridExtractor.buildRequest (cyclomatic 66) apps/desktop/src/composables/useDataGridExtractor.ts:181 — useDataGridExtractor.useDataGridExtractor.buildRequest has cyclomatic complexity 66 (threshold 15). Of this number, 59 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTableRename.prepareOracleTableRename (cyclomatic 66) · ×1
  • oracleTableRename.prepareOracleTableRename (cyclomatic 66) REDACTED:542 — oracleTableRename.prepareOracleTableRename has cyclomatic complexity 66 (threshold 15). Of this number, 55 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.doExecute (cyclomatic 65) · ×1
  • useSqlExecution.useSqlExecution.doExecute (cyclomatic 65) apps/desktop/src/composables/useSqlExecution.ts:489 — useSqlExecution.useSqlExecution.doExecute has cyclomatic complexity 65 (threshold 15). Of this number, 64 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oceanbaseTableClone.buildOceanbaseTableClone (cyclomatic 65) · ×1
  • oceanbaseTableClone.buildOceanbaseTableClone (cyclomatic 65) apps/desktop/src/lib/database/oceanbaseTableClone.ts:41 — oceanbaseTableClone.buildOceanbaseTableClone has cyclomatic complexity 65 (threshold 15). Of this number, 46 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Plan.render (cyclomatic 64) · ×1
  • Plan.render (cyclomatic 64) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:262 — Plan.render has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cyclomatic 64) · ×1
  • useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cyclomatic 64) apps/desktop/src/composables/useDatabaseTableEmpty.ts:40 — useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables has cyclomatic complexity 64 (threshold 15). Of this number, 57 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleConstraints.readOracleConstraintSnapshot (cyclomatic 64) · ×1
  • oracleConstraints.readOracleConstraintSnapshot (cyclomatic 64) apps/desktop/src/lib/database/oracleConstraints.ts:274 — oracleConstraints.readOracleConstraintSnapshot has cyclomatic complexity 64 (threshold 15). Of this number, 53 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plDebugComposite.compositeInputComplete (cyclomatic 64) · ×1
  • plDebugComposite.compositeInputComplete (cyclomatic 64) apps/desktop/src/lib/debug/plDebugComposite.ts:91 — plDebugComposite.compositeInputComplete has cyclomatic complexity 64 (threshold 15). Of this number, 43 points are the body's own statements and 21 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.validateOracleRoutineDeployment (cyclomatic 63) · ×1
  • oracleRoutineDeploy.validateOracleRoutineDeployment (cyclomatic 63) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:468 — oracleRoutineDeploy.validateOracleRoutineDeployment has cyclomatic complexity 63 (threshold 15). Of this number, 54 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsTransfer.parseSettingsTransferFile (cyclomatic 63) · ×1
  • settingsTransfer.parseSettingsTransferFile (cyclomatic 63) apps/desktop/src/lib/settings/settingsTransfer.ts:645 — settingsTransfer.parseSettingsTransferFile has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSource.rewriteOraclePackageSource (cyclomatic 63) · ×1
  • oraclePackageSource.rewriteOraclePackageSource (cyclomatic 63) apps/desktop/src/lib/table/oraclePackageSource.ts:103 — oraclePackageSource.rewriteOraclePackageSource has cyclomatic complexity 63 (threshold 15). Of this number, 57 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · database-env.validateRecipe (cyclomatic 63) · ×1
  • database-env.validateRecipe (cyclomatic 63) scripts/database-env.mjs:235 — database-env.validateRecipe has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync-connection-types.validateDescriptor (cyclomatic 63) · ×1
  • sync-connection-types.validateDescriptor (cyclomatic 63) scripts/sync-connection-types.mjs:97 — sync-connection-types.validateDescriptor has cyclomatic complexity 63 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cyclomatic 62) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cyclomatic 62) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1171 — useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cyclomatic 62) · ×1
  • useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cyclomatic 62) apps/desktop/src/composables/useQuickOpen.ts:612 — useQuickOpen.useQuickOpen.processDatabaseTreeNodes has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrlBuilder.buildSpecialJdbcUrl (cyclomatic 62) · ×1
  • connectionUrlBuilder.buildSpecialJdbcUrl (cyclomatic 62) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:367 — connectionUrlBuilder.buildSpecialJdbcUrl has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphCompletion.getGraphCompletionContext (cyclomatic 62) · ×1
  • graphCompletion.getGraphCompletionContext (cyclomatic 62) apps/desktop/src/lib/graph/graphCompletion.ts:23 — graphCompletion.getGraphCompletionContext has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableImport.importDataTypeForDatabase (cyclomatic 62) · ×1
  • tableImport.importDataTypeForDatabase (cyclomatic 62) apps/desktop/src/lib/table/tableImport.ts:321 — tableImport.importDataTypeForDatabase has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCopyExtractor.normalizeDataGridExtractorOptions (cyclomatic 61) · ×1
  • dataGridCopyExtractor.normalizeDataGridExtractorOptions (cyclomatic 61) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:230 — dataGridCopyExtractor.normalizeDataGridExtractorOptions has cyclomatic complexity 61 (threshold 15). Of this number, 58 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableTree.buildGroupedObjectTreeNodes (cyclomatic 61) · ×1
  • tableTree.buildGroupedObjectTreeNodes (cyclomatic 61) apps/desktop/src/lib/table/tableTree.ts:999 — tableTree.buildGroupedObjectTreeNodes has cyclomatic complexity 61 (threshold 15). Of this number, 23 points are the body's own statements and 38 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.resolve (cyclomatic 60) · ×1
  • PlDebugTarget.resolve (cyclomatic 60) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:803 — PlDebugTarget.resolve has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doltVersionControl.layoutDoltCommitGraph (cyclomatic 60) · ×1
  • doltVersionControl.layoutDoltCommitGraph (cyclomatic 60) apps/desktop/src/lib/dolt/doltVersionControl.ts:467 — doltVersionControl.layoutDoltCommitGraph has cyclomatic complexity 60 (threshold 15). Of this number, 39 points are the body's own statements and 21 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mysqlRoutineVariables.collectMysqlRoutineVariables (cyclomatic 60) · ×1
  • mysqlRoutineVariables.collectMysqlRoutineVariables (cyclomatic 60) apps/desktop/src/lib/sql/mysqlRoutineVariables.ts:34 — mysqlRoutineVariables.collectMysqlRoutineVariables has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.executeOracleTableRename (cyclomatic 60) · ×1
  • oracleTableRename.executeOracleTableRename (cyclomatic 60) REDACTED:825 — oracleTableRename.executeOracleTableRename has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.createMockHost.server (cyclomatic 60) · ×1
  • server.createMockHost.server (cyclomatic 60) plugins/sdk/dev-host/server.mjs:474 — server.createMockHost.server has cyclomatic complexity 60 (threshold 15). Of this number, 40 points are the body's own statements and 20 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.invalidateCompletionCache (cyclomatic 59) · ×1
  • connectionStore.useConnectionStore.invalidateCompletionCache (cyclomatic 59) apps/desktop/src/stores/connectionStore.ts:4491 — connectionStore.useConnectionStore.invalidateCompletionCache has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.handle (cyclomatic 58) · ×1
  • DbxJdbcPlugin.handle (cyclomatic 58) REDACTED:844 — DbxJdbcPlugin.handle has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cyclomatic 57) · ×1
  • oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cyclomatic 57) apps/desktop/src/lib/database/oracleForeignKeys.ts:312 — oracleForeignKeys.readOracleForeignKeyReferenceSnapshot has cyclomatic complexity 57 (threshold 15). Of this number, 52 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTypeManagement.executeOracleTypeManagement (cyclomatic 57) · ×1
  • oracleTypeManagement.executeOracleTypeManagement (cyclomatic 57) apps/desktop/src/lib/table/oracleTypeManagement.ts:572 — oracleTypeManagement.executeOracleTypeManagement has cyclomatic complexity 57 (threshold 15). Of this number, 52 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cyclomatic 56) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cyclomatic 56) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:342 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics has cyclomatic complexity 56 (threshold 15). Of this number, 54 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrl.parseConnectionUrl (cyclomatic 56) · ×1
  • connectionUrl.parseConnectionUrl (cyclomatic 56) REDACTED:698 — connectionUrl.parseConnectionUrl has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadDatabases (cyclomatic 56) · ×1
  • connectionStore.useConnectionStore.loadDatabases (cyclomatic 56) apps/desktop/src/stores/connectionStore.ts:6018 — connectionStore.useConnectionStore.loadDatabases has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 5 of the 56 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6036, 6178). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.publishSnapshot (cyclomatic 56) · ×1
  • plDebugStore.usePlDebugStore.publishSnapshot (cyclomatic 56) apps/desktop/src/stores/plDebugStore.ts:308 — plDebugStore.usePlDebugStore.publishSnapshot has cyclomatic complexity 56 (threshold 15). Of this number, 55 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useNavigationTargets.openTableTarget (cyclomatic 55) · ×1
  • useNavigationTargets.openTableTarget (cyclomatic 55) apps/desktop/src/composables/useNavigationTargets.ts:65 — useNavigationTargets.openTableTarget has cyclomatic complexity 55 (threshold 15). Of this number, 52 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.diagnoseMongoCommand (cyclomatic 55) · ×1
  • mongoShellCommand.diagnoseMongoCommand (cyclomatic 55) REDACTED:132 — mongoShellCommand.diagnoseMongoCommand has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.extractSelectList (cyclomatic 55) · ×1
  • sqlCompletion.extractSelectList (cyclomatic 55) apps/desktop/src/lib/sql/sqlCompletion.ts:4255 — sqlCompletion.extractSelectList has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cyclomatic 54) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cyclomatic 54) apps/desktop/src/composables/useDataGridLargeValues.ts:276 — useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGenerate.generateValue (cyclomatic 54) · ×1
  • dataGenerate.generateValue (cyclomatic 54) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1610 — dataGenerate.generateValue has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cyclomatic 54) · ×1
  • oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cyclomatic 54) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:33 — oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.topLevelSoftStatementLineStarts (cyclomatic 53) · ×1
  • sqlStatementRanges.topLevelSoftStatementLineStarts (cyclomatic 53) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1185 — sqlStatementRanges.topLevelSoftStatementLineStarts has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.preparePastedRows (cyclomatic 53) · ×1
  • useDataGridEditor.useDataGridEditor.preparePastedRows (cyclomatic 53) apps/desktop/src/composables/useDataGridEditor.ts:1535 — useDataGridEditor.useDataGridEditor.preparePastedRows has cyclomatic complexity 53 (threshold 15). Of this number, 50 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cyclomatic 53) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cyclomatic 53) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:549 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData has cyclomatic complexity 53 (threshold 15). Of this number, 34 points are the body's own statements and 19 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aliasHighlights.sqlAliasHighlightGroups (cyclomatic 53) · ×1
  • aliasHighlights.sqlAliasHighlightGroups (cyclomatic 53) apps/desktop/src/lib/sql/semantic/aliasHighlights.ts:34 — aliasHighlights.sqlAliasHighlightGroups has cyclomatic complexity 53 (threshold 15). Of this number, 49 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cyclomatic 53) · ×1
  • sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cyclomatic 53) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:46 — sqlDatabaseLinks.collectSqlDatabaseLinkStarts has cyclomatic complexity 53 (threshold 15). Of this number, 46 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.scalarInput (cyclomatic 52) · ×1
  • PlDebugTarget.scalarInput (cyclomatic 52) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:986 — PlDebugTarget.scalarInput has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_proof.main (cyclomatic 52) · ×1
  • run_proof.main (cyclomatic 52) scripts/ai-proxy-12277/run_proof.py:32 — run_proof.main has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiff.convertToSchemaDiffObjects (cyclomatic 52) · ×1
  • schemaDiff.convertToSchemaDiffObjects (cyclomatic 52) apps/desktop/src/lib/schema/schemaDiff.ts:686 — schemaDiff.convertToSchemaDiffObjects has cyclomatic complexity 52 (threshold 15). Of this number, 41 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableSelectSql.qualifiedTableName (cyclomatic 52) · ×1
  • tableSelectSql.qualifiedTableName (cyclomatic 52) apps/desktop/src/lib/table/tableSelectSql.ts:204 — tableSelectSql.qualifiedTableName has cyclomatic complexity 52 (threshold 15). Of this number, 50 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadAllObjectGroupChildren (cyclomatic 52) · ×1
  • connectionStore.useConnectionStore.loadAllObjectGroupChildren (cyclomatic 52) apps/desktop/src/stores/connectionStore.ts:7977 — connectionStore.useConnectionStore.loadAllObjectGroupChildren has cyclomatic complexity 52 (threshold 15). Of this number, 40 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · installBridge (cyclomatic 52) · ×1
  • installBridge (cyclomatic 52) REDACTED:2 — installBridge has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 1 of the 52 points is its own statement and the rest belongs to 51 function items inside it that branch (a function literal at line 165, stream::start::onEvent, applyTheme, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Loader.load (cyclomatic 51) · ×1
  • Loader.load (cyclomatic 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:66 — Loader.load has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.onPaginate (cyclomatic 51) · ×1
  • useDataGridActions.useDataGridActions.onPaginate (cyclomatic 51) apps/desktop/src/composables/useDataGridActions.ts:586 — useDataGridActions.useDataGridActions.onPaginate has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StarRocksAlter · ×1
  • StarRocksAlter::build (cyclomatic 50) crates/dbx-sql-schema/src/table_structure_sql/alter_dialect.rs:63 — StarRocksAlter::build has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cyclomatic 50) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cyclomatic 50) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:689 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 6 of the 50 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 715, 739, 733, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · oracleTriggerPlan.prepareOracleTriggerPlan (cyclomatic 50) · ×1
  • oracleTriggerPlan.prepareOracleTriggerPlan (cyclomatic 50) apps/desktop/src/lib/database/oracleTriggerPlan.ts:166 — oracleTriggerPlan.prepareOracleTriggerPlan has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarActiveTabTarget.activeTabSidebarTarget (cyclomatic 50) · ×1
  • sidebarActiveTabTarget.activeTabSidebarTarget (cyclomatic 50) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:125 — sidebarActiveTabTarget.activeTabSidebarTarget has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cellValueTransform.transformCellValue (cyclomatic 49) · ×1
  • cellValueTransform.transformCellValue (cyclomatic 49) apps/desktop/src/lib/dataGrid/cellValueTransform.ts:111 — cellValueTransform.transformCellValue has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.scanMongoCallArguments (cyclomatic 49) · ×1
  • mongoCompletion.scanMongoCallArguments (cyclomatic 49) REDACTED:871 — mongoCompletion.scanMongoCallArguments has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiff.injectColumnRenameSql (cyclomatic 49) · ×1
  • schemaDiff.injectColumnRenameSql (cyclomatic 49) apps/desktop/src/lib/schema/schemaDiff.ts:1025 — schemaDiff.injectColumnRenameSql has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarTableNameCopy.qualifiedNameForSidebarNode (cyclomatic 49) · ×1
  • sidebarTableNameCopy.qualifiedNameForSidebarNode (cyclomatic 49) apps/desktop/src/lib/sidebar/sidebarTableNameCopy.ts:96 — sidebarTableNameCopy.qualifiedNameForSidebarNode has cyclomatic complexity 49 (threshold 15). Of this number, 46 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableColumnDefinitionPaste.parseTableColumnDefinitions (cyclomatic 49) · ×1
  • tableColumnDefinitionPaste.parseTableColumnDefinitions (cyclomatic 49) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:321 — tableColumnDefinitionPaste.parseTableColumnDefinitions has cyclomatic complexity 49 (threshold 15). Of this number, 38 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main (cyclomatic 49) · ×1
  • main (cyclomatic 49) REDACTED:593 — main has cyclomatic complexity 49 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sqlStatementRanges.oraclePlSqlBlockEnd (cyclomatic 48) · ×1
  • sqlStatementRanges.oraclePlSqlBlockEnd (cyclomatic 48) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2589 — sqlStatementRanges.oraclePlSqlBlockEnd has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cyclomatic 47) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cyclomatic 47) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1335 — useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh has cyclomatic complexity 47 (threshold 15). Of this number, 38 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · triggerToggleSql.buildTriggerToggleSql (cyclomatic 47) · ×1
  • triggerToggleSql.buildTriggerToggleSql (cyclomatic 47) apps/desktop/src/lib/database/triggerToggleSql.ts:29 — triggerToggleSql.buildTriggerToggleSql has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildObjectItems (cyclomatic 47) · ×1
  • sqlCompletion.buildObjectItems (cyclomatic 47) apps/desktop/src/lib/sql/sqlCompletion.ts:5115 — sqlCompletion.buildObjectItems has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 7 of the 47 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5128, 5122). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PlDebugSession.mutateBreakpoint (cyclomatic 46) · ×1
  • PlDebugSession.mutateBreakpoint (cyclomatic 46) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:788 — PlDebugSession.mutateBreakpoint has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.splitStatementRangeAtSoftStarts (cyclomatic 46) · ×1
  • sqlStatementRanges.splitStatementRangeAtSoftStarts (cyclomatic 46) apps/desktop/src/lib/sql/sqlStatementRanges.ts:854 — sqlStatementRanges.splitStatementRangeAtSoftStarts has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiff.setSchemaDiffObjectSelectedWithDependencies · ×1
  • schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply (cyclomatic 46) apps/desktop/src/lib/schema/schemaDiff.ts:1203 — schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.ensureConnected (cyclomatic 46) · ×1
  • connectionStore.useConnectionStore.ensureConnected (cyclomatic 46) apps/desktop/src/stores/connectionStore.ts:5647 — connectionStore.useConnectionStore.ensureConnected has cyclomatic complexity 46 (threshold 15). Of this number, 28 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.child (cyclomatic 45) · ×1
  • PlDebugCompositeInput.child (cyclomatic 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:217 — PlDebugCompositeInput.child has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · graphCompletionScope.graphCompletionScope (cyclomatic 45) · ×1
  • graphCompletionScope.graphCompletionScope (cyclomatic 45) apps/desktop/src/lib/graph/graphCompletionScope.ts:41 — graphCompletionScope.graphCompletionScope has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandPreview.quoteRedisBytes (cyclomatic 45) · ×1
  • redisCommandPreview.quoteRedisBytes (cyclomatic 45) apps/desktop/src/lib/redis/redisCommandPreview.ts:67 — redisCommandPreview.quoteRedisBytes has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RedisKeyGroupIndex.project (cyclomatic 45) · ×1
  • RedisKeyGroupIndex.project (cyclomatic 45) apps/desktop/src/lib/redis/redisKeyGroupIndex.ts:124 — RedisKeyGroupIndex.project has cyclomatic complexity 45 (threshold 15). Of this number, 27 points are the body's own statements and 18 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisKeyTree.buildRedisKeySnapshotCooperatively (cyclomatic 45) · ×1
  • redisKeyTree.buildRedisKeySnapshotCooperatively (cyclomatic 45) apps/desktop/src/lib/redis/redisKeyTree.ts:303 — redisKeyTree.buildRedisKeySnapshotCooperatively has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlVariables.readValueEnd (cyclomatic 45) · ×1
  • sqlVariables.readValueEnd (cyclomatic 45) apps/desktop/src/lib/sql/sqlVariables.ts:175 — sqlVariables.readValueEnd has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionObjects (cyclomatic 45) · ×1
  • connectionStore.useConnectionStore.listCompletionObjects (cyclomatic 45) apps/desktop/src/stores/connectionStore.ts:10082 — connectionStore.useConnectionStore.listCompletionObjects has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 14 of the 45 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 10149, 10108). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.tokens (cyclomatic 44) · ×1
  • PlDebugObjectConstructors.tokens (cyclomatic 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:298 — PlDebugObjectConstructors.tokens has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.topLevelWordsInRange (cyclomatic 44) · ×1
  • sqlStatementRanges.topLevelWordsInRange (cyclomatic 44) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1442 — sqlStatementRanges.topLevelWordsInRange has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cyclomatic 44) · ×1
  • useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cyclomatic 44) apps/desktop/src/composables/useDataGridExport.ts:2247 — useDataGridExport.useDataGridExport.exportFullTableDataViaBackend has cyclomatic complexity 44 (threshold 15). Of this number, 41 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoFormatter.formatMongoShellText (cyclomatic 44) · ×1
  • mongoFormatter.formatMongoShellText (cyclomatic 44) apps/desktop/src/lib/mongo/mongoFormatter.ts:20 — mongoFormatter.formatMongoShellText has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoTopLevelCommandLineStarts (cyclomatic 44) · ×1
  • mongoShellCommand.mongoTopLevelCommandLineStarts (cyclomatic 44) REDACTED:1562 — mongoShellCommand.mongoTopLevelCommandLineStarts has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frontendPlugin.buildPluginConnectionConfig (cyclomatic 44) · ×1
  • frontendPlugin.buildPluginConnectionConfig (cyclomatic 44) apps/desktop/src/lib/plugins/frontendPlugin.ts:259 — frontendPlugin.buildPluginConnectionConfig has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.getSqlLexicalContext (cyclomatic 44) · ×1
  • sqlCompletion.getSqlLexicalContext (cyclomatic 44) apps/desktop/src/lib/sql/sqlCompletion.ts:2423 — sqlCompletion.getSqlLexicalContext has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTypeManagement.restoreOracleTypeManagementDraft (cyclomatic 44) · ×1
  • oracleTypeManagement.restoreOracleTypeManagementDraft (cyclomatic 44) apps/desktop/src/lib/table/oracleTypeManagement.ts:706 — oracleTypeManagement.restoreOracleTypeManagementDraft has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cyclomatic 44) · ×1
  • queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cyclomatic 44) apps/desktop/src/stores/queryStore.ts:7198 — queryStore.useQueryStore.resolveEditableSourceMetadataTarget has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IssueSubmissionClient.IssueSubmissionClient (cyclomatic 44) · ×1
  • IssueSubmissionClient.IssueSubmissionClient (cyclomatic 44) docs/components/issues/IssueSubmissionClient.tsx:168 — IssueSubmissionClient.IssueSubmissionClient has cyclomatic complexity 44 (threshold 15). Of this number, 16 points are the body's own statements and 28 belong to 11 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.createMockHost.api (cyclomatic 44) · ×1
  • server.createMockHost.api (cyclomatic 44) plugins/sdk/dev-host/server.mjs:374 — server.createMockHost.api has cyclomatic complexity 44 (threshold 15). Of this number, 16 points are the body's own statements and 28 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createMockHost.api (cyclomatic 44) · ×1
  • createMockHost.api (cyclomatic 44) plugins/sdk/dev-host/server.mjs:374 — createMockHost.api has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 15 of the 44 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 392, 381, 446, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoSql.tokenize (cyclomatic 43) · ×1
  • mongoSql.tokenize (cyclomatic 43) apps/desktop/src/lib/mongo/mongoSql.ts:577 — mongoSql.tokenize has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineRename.verifyBeforeDrop (cyclomatic 43) · ×1
  • oracleRoutineRename.verifyBeforeDrop (cyclomatic 43) apps/desktop/src/lib/table/oracleRoutineRename.ts:614 — oracleRoutineRename.verifyBeforeDrop has cyclomatic complexity 43 (threshold 15). Of this number, 34 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.prepareEditableQueryExecution (cyclomatic 43) · ×1
  • queryStore.useQueryStore.prepareEditableQueryExecution (cyclomatic 43) apps/desktop/src/stores/queryStore.ts:7492 — queryStore.useQueryStore.prepareEditableQueryExecution has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.exportQuerySqlDirect (cyclomatic 43) · ×1
  • queryStore.useQueryStore.exportQuerySqlDirect (cyclomatic 43) apps/desktop/src/stores/queryStore.ts:11552 — queryStore.useQueryStore.exportQuerySqlDirect has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 12 of the 43 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 11618, assertQueuedSourceAvailable, a function literal at line 11664, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TableRestoreFilter · ×1
  • TableRestoreFilter::classify (cyclomatic 42) REDACTED:67 — TableRestoreFilter::classify has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.runDebuggeeTarget (cyclomatic 42) · ×1
  • PlDebugSession.runDebuggeeTarget (cyclomatic 42) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2284 — PlDebugSession.runDebuggeeTarget has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · documentStoreProvider.buildDocumentFilterCondition (cyclomatic 42) · ×1
  • documentStoreProvider.buildDocumentFilterCondition (cyclomatic 42) apps/desktop/src/lib/app/documentStoreProvider.ts:555 — documentStoreProvider.buildDocumentFilterCondition has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarMenuLayout.buildSidebarMenuLayout (cyclomatic 42) · ×1
  • sidebarMenuLayout.buildSidebarMenuLayout (cyclomatic 42) apps/desktop/src/lib/sidebar/sidebarMenuLayout.ts:174 — sidebarMenuLayout.buildSidebarMenuLayout has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.currentLineBlockEnd (cyclomatic 42) · ×1
  • sqlCompletion.currentLineBlockEnd (cyclomatic 42) apps/desktop/src/lib/sql/sqlCompletion.ts:2677 — sqlCompletion.currentLineBlockEnd has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · starrocksDdlDisplay.formatStarRocksDdlForDisplay (cyclomatic 42) · ×1
  • starrocksDdlDisplay.formatStarRocksDdlForDisplay (cyclomatic 42) apps/desktop/src/lib/sql/starrocksDdlDisplay.ts:57 — starrocksDdlDisplay.formatStarRocksDdlForDisplay has cyclomatic complexity 42 (threshold 15). Of this number, 27 points are the body's own statements and 15 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.refreshDataTabInternal (cyclomatic 42) · ×1
  • queryStore.useQueryStore.refreshDataTabInternal (cyclomatic 42) apps/desktop/src/stores/queryStore.ts:5792 — queryStore.useQueryStore.refreshDataTabInternal has cyclomatic complexity 42 (threshold 15). Of this number, 37 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.buildQueryMetadataPatch (cyclomatic 42) · ×1
  • queryStore.useQueryStore.buildQueryMetadataPatch (cyclomatic 42) apps/desktop/src/stores/queryStore.ts:7712 — queryStore.useQueryStore.buildQueryMetadataPatch has cyclomatic complexity 42 (threshold 15). Of this number, 35 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureQueryResultExportRequest (cyclomatic 42) · ×1
  • queryStore.useQueryStore.captureQueryResultExportRequest (cyclomatic 42) apps/desktop/src/stores/queryStore.ts:11451 — queryStore.useQueryStore.captureQueryResultExportRequest has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 8 of the 42 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 11493, assertSourceAvailable). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PluginDetailClient.PluginDetailClient (cyclomatic 42) · ×1
  • PluginDetailClient.PluginDetailClient (cyclomatic 42) docs/app/[lang]/plugins/[id]/PluginDetailClient.tsx:107 — PluginDetailClient.PluginDetailClient has cyclomatic complexity 42 (threshold 15). Of this number, 22 points are the body's own statements and 20 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTemporalJson.temporal (cyclomatic 41) · ×1
  • PlDebugTemporalJson.temporal (cyclomatic 41) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:145 — PlDebugTemporalJson.temporal has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cyclomatic 41) · ×1
  • useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cyclomatic 41) apps/desktop/src/composables/useDataGridActions.ts:176 — useDataGridActions.useDataGridActions.refreshDataTabTableMeta has cyclomatic complexity 41 (threshold 15). Of this number, 23 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai.buildAiContext (cyclomatic 41) · ×1
  • ai.buildAiContext (cyclomatic 41) apps/desktop/src/lib/ai/ai.ts:905 — ai.buildAiContext has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridPaintTheme.resolveDataGridPaintTheme (cyclomatic 41) · ×1
  • dataGridPaintTheme.resolveDataGridPaintTheme (cyclomatic 41) apps/desktop/src/lib/dataGrid/dataGridPaintTheme.ts:270 — dataGridPaintTheme.resolveDataGridPaintTheme has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleForeignKeys.parseOracleForeignKeyDdl (cyclomatic 41) · ×1
  • oracleForeignKeys.parseOracleForeignKeyDdl (cyclomatic 41) apps/desktop/src/lib/database/oracleForeignKeys.ts:26 — oracleForeignKeys.parseOracleForeignKeyDdl has cyclomatic complexity 41 (threshold 15). Of this number, 27 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoSql.compileSelect (cyclomatic 41) · ×1
  • mongoSql.compileSelect (cyclomatic 41) apps/desktop/src/lib/mongo/mongoSql.ts:671 — mongoSql.compileSelect has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.acceptOraclePackageTransferApproval (cyclomatic 41) · ×1
  • oracleRoutineDeploy.acceptOraclePackageTransferApproval (cyclomatic 41) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:373 — oracleRoutineDeploy.acceptOraclePackageTransferApproval has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · objectSourceTabSave.saveObjectSourceTab (cyclomatic 41) · ×1
  • objectSourceTabSave.saveObjectSourceTab (cyclomatic 41) apps/desktop/src/lib/table/objectSourceTabSave.ts:18 — objectSourceTabSave.saveObjectSourceTab has cyclomatic complexity 41 (threshold 15). Of this number, 27 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableTree.buildSimpleObjectTreeNodes (cyclomatic 41) · ×1
  • tableTree.buildSimpleObjectTreeNodes (cyclomatic 41) apps/desktop/src/lib/table/tableTree.ts:685 — tableTree.buildSimpleObjectTreeNodes has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.recover (cyclomatic 41) · ×1
  • plDebugStore.usePlDebugStore.recover (cyclomatic 41) apps/desktop/src/stores/plDebugStore.ts:642 — plDebugStore.usePlDebugStore.recover has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 10 of the 41 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 650, isCurrent, a function literal at line 660, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · EwkbWktDecoder.parseGeometry (cyclomatic 40) · ×1
  • EwkbWktDecoder.parseGeometry (cyclomatic 40) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:300 — EwkbWktDecoder.parseGeometry has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.parseJdbcUrl (cyclomatic 40) · ×1
  • datagripImport.parseJdbcUrl (cyclomatic 40) REDACTED:135 — datagripImport.parseJdbcUrl has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsStore.normalizeMcpGlobalPolicy (cyclomatic 40) · ×1
  • settingsStore.normalizeMcpGlobalPolicy (cyclomatic 40) apps/desktop/src/stores/settingsStore.ts:203 — settingsStore.normalizeMcpGlobalPolicy has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 11 of the 40 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 208, 214, 245, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.listObjects (cyclomatic 39) · ×1
  • DbxJdbcPlugin.listObjects (cyclomatic 39) REDACTED:3128 — DbxJdbcPlugin.listObjects has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.commitEdit (cyclomatic 39) · ×1
  • useDataGridEditor.useDataGridEditor.commitEdit (cyclomatic 39) apps/desktop/src/composables/useDataGridEditor.ts:1098 — useDataGridEditor.useDataGridEditor.commitEdit has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cyclomatic 39) · ×1
  • useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cyclomatic 39) apps/desktop/src/composables/useDataGridExtractor.ts:413 — useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.classifyStageOptions (cyclomatic 39) · ×1
  • mongoCompletion.classifyStageOptions (cyclomatic 39) REDACTED:1644 — mongoCompletion.classifyStageOptions has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ddlDisplay.collectDdlStatementNameTargets (cyclomatic 39) · ×1
  • ddlDisplay.collectDdlStatementNameTargets (cyclomatic 39) apps/desktop/src/lib/sql/ddlDisplay.ts:207 — ddlDisplay.collectDdlStatementNameTargets has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · insertValueHints.selectProjectionStarts (cyclomatic 39) · ×1
  • insertValueHints.selectProjectionStarts (cyclomatic 39) apps/desktop/src/lib/sql/insertValueHints.ts:222 — insertValueHints.selectProjectionStarts has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.buildCursorIntent (cyclomatic 39) · ×1
  • model.buildCursorIntent (cyclomatic 39) apps/desktop/src/lib/sql/semantic/model.ts:974 — model.buildCursorIntent has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildColumnItems (cyclomatic 39) · ×1
  • sqlCompletion.buildColumnItems (cyclomatic 39) apps/desktop/src/lib/sql/sqlCompletion.ts:5922 — sqlCompletion.buildColumnItems has cyclomatic complexity 39 (threshold 15). Of this number, 28 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runStep (cyclomatic 39) · ×1
  • runStep (cyclomatic 39) REDACTED:482 — runStep has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.setBreakpoints (cyclomatic 38) · ×1
  • PlDebugSession.setBreakpoints (cyclomatic 38) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:893 — PlDebugSession.setBreakpoints has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.trimRangeEndBeforeNextBoundary (cyclomatic 38) · ×1
  • sqlStatementRanges.trimRangeEndBeforeNextBoundary (cyclomatic 38) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1880 — sqlStatementRanges.trimRangeEndBeforeNextBoundary has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGenerate.findGeneratorKey (cyclomatic 38) · ×1
  • dataGenerate.findGeneratorKey (cyclomatic 38) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1199 — dataGenerate.findGeneratorKey has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridContextMenu.createDataGridColumnContextMenuItems (cyclomatic 38) · ×1
  • dataGridContextMenu.createDataGridColumnContextMenuItems (cyclomatic 38) apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts:116 — dataGridContextMenu.createDataGridColumnContextMenuItems has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · printer.printRuleElement (cyclomatic 38) · ×1
  • printer.printRuleElement (cyclomatic 38) apps/desktop/src/lib/sql/layout/printer.ts:252 — printer.printRuleElement has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleViewRename.prepareOracleViewRename (cyclomatic 38) · ×1
  • oracleViewRename.prepareOracleViewRename (cyclomatic 38) apps/desktop/src/lib/table/oracleViewRename.ts:128 — oracleViewRename.prepareOracleViewRename has cyclomatic complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.persistTypeManagementDraft (cyclomatic 38) · ×1
  • queryStore.useQueryStore.persistTypeManagementDraft (cyclomatic 38) apps/desktop/src/stores/queryStore.ts:3004 — queryStore.useQueryStore.persistTypeManagementDraft has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · startDevelopment (cyclomatic 38) · ×1
  • startDevelopment (cyclomatic 38) plugins/sdk/dev-host/runtime.mjs:39 — startDevelopment has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 13 of the 38 points are its own statements and the rest belongs to 20 function items inside it that branch (spawnCommand, a function literal at line 131, run, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.applyCellValueToItem (cyclomatic 37) · ×1
  • useDataGridEditor.useDataGridEditor.applyCellValueToItem (cyclomatic 37) apps/desktop/src/composables/useDataGridEditor.ts:1223 — useDataGridEditor.useDataGridEditor.applyCellValueToItem has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cyclomatic 37) · ×1
  • useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cyclomatic 37) apps/desktop/src/composables/useDataGridExport.ts:2493 — useDataGridExport.useDataGridExport.exportQueryResultViaBackend has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · regexGenerate.parseEscape (cyclomatic 37) · ×1
  • regexGenerate.parseEscape (cyclomatic 37) REDACTED:123 — regexGenerate.parseEscape has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobs.rebaseNativeJobDamengDraft (cyclomatic 37) · ×1
  • nativeJobs.rebaseNativeJobDamengDraft (cyclomatic 37) apps/desktop/src/lib/database/nativeJobs.ts:458 — nativeJobs.rebaseNativeJobDamengDraft has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleSessionDiagnostics.parseOracleCachedPlan (cyclomatic 37) · ×1
  • oracleSessionDiagnostics.parseOracleCachedPlan (cyclomatic 37) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:163 — oracleSessionDiagnostics.parseOracleCachedPlan has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.verifyStep (cyclomatic 37) · ×1
  • oracleTriggerPlan.verifyStep (cyclomatic 37) apps/desktop/src/lib/database/oracleTriggerPlan.ts:669 — oracleTriggerPlan.verifyStep has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.buildQualifierActions (cyclomatic 37) · ×1
  • sqlIntentionActions.buildQualifierActions (cyclomatic 37) apps/desktop/src/lib/editor/sqlIntentionActions.ts:562 — sqlIntentionActions.buildQualifierActions has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · kvValueFormat.validateKvValue (cyclomatic 37) · ×1
  • kvValueFormat.validateKvValue (cyclomatic 37) apps/desktop/src/lib/kv/kvValueFormat.ts:33 — kvValueFormat.validateKvValue has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.formatSqlText (cyclomatic 37) · ×1
  • sqlFormatter.formatSqlText (cyclomatic 37) apps/desktop/src/lib/sql/sqlFormatter.ts:457 — sqlFormatter.formatSqlText has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.normalizeConnection (cyclomatic 37) · ×1
  • connectionStore.useConnectionStore.normalizeConnection (cyclomatic 37) apps/desktop/src/stores/connectionStore.ts:1751 — connectionStore.useConnectionStore.normalizeConnection has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.runOracleTriggerSourceAction (cyclomatic 37) · ×1
  • queryStore.useQueryStore.runOracleTriggerSourceAction (cyclomatic 37) apps/desktop/src/stores/queryStore.ts:3442 — queryStore.useQueryStore.runOracleTriggerSourceAction has cyclomatic complexity 37 (threshold 15). Of this number, 24 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · codeContext (cyclomatic 37) · ×1
  • codeContext (cyclomatic 37) REDACTED:164 — codeContext has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body's own statements and 8 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.parseExplainLikePrefixAt (cyclomatic 36) · ×1
  • sqlStatementRanges.parseExplainLikePrefixAt (cyclomatic 36) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1672 — sqlStatementRanges.parseExplainLikePrefixAt has cyclomatic complexity 36 (threshold 15). Of this number, 31 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridInsertPaste.splitTopLevelStatements (cyclomatic 36) · ×1
  • dataGridInsertPaste.splitTopLevelStatements (cyclomatic 36) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:26 — dataGridInsertPaste.splitTopLevelStatements has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · db2ExplainPlan.parseDb2ExplainText (cyclomatic 36) · ×1
  • db2ExplainPlan.parseDb2ExplainText (cyclomatic 36) apps/desktop/src/lib/diagram/db2ExplainPlan.ts:50 — db2ExplainPlan.parseDb2ExplainText has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cyclomatic 36) · ×1
  • queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cyclomatic 36) apps/desktop/src/lib/editor/queryEditorNativeSelection.ts:536 — queryEditorNativeSelection.createQueryEditorNativeSelectionGuard has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 627, 645, 582, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · cypherReadOnly.isProvenReadOnlyCypher (cyclomatic 36) · ×1
  • cypherReadOnly.isProvenReadOnlyCypher (cyclomatic 36) apps/desktop/src/lib/sql/cypherReadOnly.ts:4 — cypherReadOnly.isProvenReadOnlyCypher has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · completion.sqlCompletionContextFromSemantic (cyclomatic 36) · ×1
  • completion.sqlCompletionContextFromSemantic (cyclomatic 36) apps/desktop/src/lib/sql/semantic/completion.ts:338 — completion.sqlCompletionContextFromSemantic has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlFormatter.protectDuckDbPrefixAliasSeparators (cyclomatic 36) · ×1
  • sqlFormatter.protectDuckDbPrefixAliasSeparators (cyclomatic 36) apps/desktop/src/lib/sql/sqlFormatter.ts:336 — sqlFormatter.protectDuckDbPrefixAliasSeparators has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionColumns (cyclomatic 36) · ×1
  • connectionStore.useConnectionStore.listCompletionColumns (cyclomatic 36) apps/desktop/src/stores/connectionStore.ts:10243 — connectionStore.useConnectionStore.listCompletionColumns has cyclomatic complexity 36 (threshold 15). Of this number, 27 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.readValue (cyclomatic 35) · ×1
  • DbxJdbcPlugin.readValue (cyclomatic 35) REDACTED:6170 — DbxJdbcPlugin.readValue has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferDdl.temporalColumnTypesFromDdl (cyclomatic 35) · ×1
  • queryResultTransferDdl.temporalColumnTypesFromDdl (cyclomatic 35) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:90 — queryResultTransferDdl.temporalColumnTypesFromDdl has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useExportTracker.useExportTracker.updateDataTransferTask (cyclomatic 35) · ×1
  • useExportTracker.useExportTracker.updateDataTransferTask (cyclomatic 35) apps/desktop/src/composables/useExportTracker.ts:850 — useExportTracker.useExportTracker.updateDataTransferTask has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · openTabsPersistence.restoreOpenTabsArray (cyclomatic 35) · ×1
  • openTabsPersistence.restoreOpenTabsArray (cyclomatic 35) apps/desktop/src/lib/app/openTabsPersistence.ts:276 — openTabsPersistence.restoreOpenTabsArray has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 7 of the 35 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 283, 299, 303). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · errorUtils.isBackendError (cyclomatic 35) · ×1
  • errorUtils.isBackendError (cyclomatic 35) apps/desktop/src/lib/backend/errorUtils.ts:129 — errorUtils.isBackendError has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · columnFormatter.normalizeColumnFormatter (cyclomatic 35) · ×1
  • columnFormatter.normalizeColumnFormatter (cyclomatic 35) apps/desktop/src/lib/dataGrid/columnFormatter.ts:234 — columnFormatter.normalizeColumnFormatter has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbAdminSql.buildDuplicateTableStructurePlan (cyclomatic 35) · ×1
  • dbAdminSql.buildDuplicateTableStructurePlan (cyclomatic 35) apps/desktop/src/lib/database/dbAdminSql.ts:246 — dbAdminSql.buildDuplicateTableStructurePlan has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleConstraints.constraintRecoveryCandidate (cyclomatic 35) · ×1
  • oracleConstraints.constraintRecoveryCandidate (cyclomatic 35) apps/desktop/src/lib/database/oracleConstraints.ts:427 — oracleConstraints.constraintRecoveryCandidate has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · navicatImport.parseConnection (cyclomatic 35) · ×1
  • navicatImport.parseConnection (cyclomatic 35) REDACTED:283 — navicatImport.parseConnection has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · cypherFormatter.needsSpace (cyclomatic 35) · ×1
  • cypherFormatter.needsSpace (cyclomatic 35) apps/desktop/src/lib/sql/cypherFormatter.ts:318 — cypherFormatter.needsSpace has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.parseExtraToColumnExtra (cyclomatic 35) · ×1
  • tableStructureEditorState.parseExtraToColumnExtra (cyclomatic 35) apps/desktop/src/lib/table/tableStructureEditorState.ts:884 — tableStructureEditorState.parseExtraToColumnExtra has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.runPublicOperation · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation::dispatch (cyclomatic 35) apps/desktop/src/stores/plDebugStore.ts:453 — plDebugStore.usePlDebugStore.runPublicOperation::dispatch has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.setValue (cyclomatic 35) · ×1
  • plDebugStore.usePlDebugStore.setValue (cyclomatic 35) apps/desktop/src/stores/plDebugStore.ts:1702 — plDebugStore.usePlDebugStore.setValue has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · json.shellConstructorToExtendedJson (cyclomatic 35) · ×1
  • json.shellConstructorToExtendedJson (cyclomatic 35) packages/mongo-shell/src/json.ts:638 — json.shellConstructorToExtendedJson has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlScanner · ×1
  • SqlScanner::step (cyclomatic 34) crates/dbx-sql-core/src/sql.rs:2956 — SqlScanner::step has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DdlBuilder.buildTableDdl (cyclomatic 34) · ×1
  • DdlBuilder.buildTableDdl (cyclomatic 34) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:77 — DdlBuilder.buildTableDdl has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codeSnapshot.snapshotElementToPng (cyclomatic 34) · ×1
  • codeSnapshot.snapshotElementToPng (cyclomatic 34) apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:343 — codeSnapshot.snapshotElementToPng has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.readAudit (cyclomatic 34) · ×1
  • oceanbaseSessionDiagnostics.readAudit (cyclomatic 34) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:181 — oceanbaseSessionDiagnostics.readAudit has cyclomatic complexity 34 (threshold 15). Of this number, 28 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.readbackMatches (cyclomatic 34) · ×1
  • oracleConstraints.readbackMatches (cyclomatic 34) apps/desktop/src/lib/database/oracleConstraints.ts:629 — oracleConstraints.readbackMatches has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeySourceSnapshot (cyclomatic 34) · ×1
  • oracleForeignKeys.readOracleForeignKeySourceSnapshot (cyclomatic 34) apps/desktop/src/lib/database/oracleForeignKeys.ts:231 — oracleForeignKeys.readOracleForeignKeySourceSnapshot has cyclomatic complexity 34 (threshold 15). Of this number, 22 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · hoverTableSql.normalizeAlignedSqlWhitespace (cyclomatic 34) · ×1
  • hoverTableSql.normalizeAlignedSqlWhitespace (cyclomatic 34) apps/desktop/src/lib/editor/hoverTableSql.ts:163 — hoverTableSql.normalizeAlignedSqlWhitespace has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.getMongoCompletionContext (cyclomatic 34) · ×1
  • mongoCompletion.getMongoCompletionContext (cyclomatic 34) REDACTED:368 — mongoCompletion.getMongoCompletionContext has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sidebarSearchTree.filterSidebarTreeWithMatcher (cyclomatic 34) · ×1
  • sidebarSearchTree.filterSidebarTreeWithMatcher (cyclomatic 34) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:380 — sidebarSearchTree.filterSidebarTreeWithMatcher has cyclomatic complexity 34 (threshold 15). Of this number, 28 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildComparisonValueItems (cyclomatic 34) · ×1
  • sqlCompletion.buildComparisonValueItems (cyclomatic 34) apps/desktop/src/lib/sql/sqlCompletion.ts:5567 — sqlCompletion.buildComparisonValueItems has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.singularTableName (cyclomatic 34) · ×1
  • sqlCompletion.singularTableName (cyclomatic 34) apps/desktop/src/lib/sql/sqlCompletion.ts:6423 — sqlCompletion.singularTableName has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlParameters.isMysqlRoutineHeader (cyclomatic 34) · ×1
  • sqlParameters.isMysqlRoutineHeader (cyclomatic 34) apps/desktop/src/lib/sql/sqlParameters.ts:653 — sqlParameters.isMysqlRoutineHeader has cyclomatic complexity 34 (threshold 15). Of this number, 24 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cyclomatic 34) · ×1
  • sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cyclomatic 34) apps/desktop/src/lib/sql/sqlParameters.ts:1184 — sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cyclomatic 34) · ×1
  • oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cyclomatic 34) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:275 — oraclePackageSaveAs.executePreparedOraclePackageSaveAs has cyclomatic complexity 34 (threshold 15). Of this number, 31 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableStructureEditorState.columnDataTypeForEditor (cyclomatic 34) · ×1
  • tableStructureEditorState.columnDataTypeForEditor (cyclomatic 34) apps/desktop/src/lib/table/tableStructureEditorState.ts:1082 — tableStructureEditorState.columnDataTypeForEditor has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabPresentation.tabTooltipLines (cyclomatic 34) · ×1
  • tabPresentation.tabTooltipLines (cyclomatic 34) apps/desktop/src/lib/tabs/tabPresentation.ts:386 — tabPresentation.tabTooltipLines has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTableForLocate (cyclomatic 34) · ×1
  • connectionStore.useConnectionStore.loadTableForLocate (cyclomatic 34) apps/desktop/src/stores/connectionStore.ts:7832 — connectionStore.useConnectionStore.loadTableForLocate has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7849, 7927, 7884). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.refreshTreeNode (cyclomatic 34) · ×1
  • connectionStore.useConnectionStore.refreshTreeNode (cyclomatic 34) apps/desktop/src/stores/connectionStore.ts:8701 — connectionStore.useConnectionStore.refreshTreeNode has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.start (cyclomatic 34) · ×1
  • plDebugStore.usePlDebugStore.start (cyclomatic 34) apps/desktop/src/stores/plDebugStore.ts:920 — plDebugStore.usePlDebugStore.start has cyclomatic complexity 34 (threshold 15). Of this number, 18 points are the body's own statements and 16 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.createTab (cyclomatic 34) · ×1
  • queryStore.useQueryStore.createTab (cyclomatic 34) apps/desktop/src/stores/queryStore.ts:3177 — queryStore.useQueryStore.createTab has cyclomatic complexity 34 (threshold 15). Of this number, 23 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DialectYaml · ×1
  • DialectYaml::build_capability_flags (cyclomatic 33) REDACTED:539 — DialectYaml::build_capability_flags has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DeferredLobValues.read (cyclomatic 33) · ×1
  • DeferredLobValues.read (cyclomatic 33) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:222 — DeferredLobValues.read has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DeferredLobValues.readAhead (cyclomatic 33) · ×1
  • DeferredLobValues.readAhead (cyclomatic 33) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:152 — DeferredLobValues.readAhead has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.composite (cyclomatic 33) · ×1
  • PlDebugCompositeInput.composite (cyclomatic 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:113 — PlDebugCompositeInput.composite has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.debugBefore (cyclomatic 33) · ×1
  • PlDebugSession.debugBefore (cyclomatic 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:525 — PlDebugSession.debugBefore has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.mysqlRoutineTokens (cyclomatic 33) · ×1
  • sqlStatementRanges.mysqlRoutineTokens (cyclomatic 33) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2250 — sqlStatementRanges.mysqlRoutineTokens has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor (cyclomatic 33) · ×1
  • useDataGridEditor.useDataGridEditor (cyclomatic 33) apps/desktop/src/composables/useDataGridEditor.ts:374 — useDataGridEditor.useDataGridEditor has cyclomatic complexity 33 (threshold 15). Of this number, 22 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportXlsxResult (cyclomatic 33) · ×1
  • useDataGridExport.useDataGridExport.exportXlsxResult (cyclomatic 33) apps/desktop/src/composables/useDataGridExport.ts:1782 — useDataGridExport.useDataGridExport.exportXlsxResult has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1788, 1827). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · connectionDeepLink.parseConnectionDeepLinkUpdate (cyclomatic 33) · ×1
  • connectionDeepLink.parseConnectionDeepLinkUpdate (cyclomatic 33) REDACTED:82 — connectionDeepLink.parseConnectionDeepLinkUpdate has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.readPlan (cyclomatic 33) · ×1
  • oceanbaseSessionDiagnostics.readPlan (cyclomatic 33) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:320 — oceanbaseSessionDiagnostics.readPlan has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cyclomatic 33) · ×1
  • oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cyclomatic 33) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:376 — oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.readOracleForeignKeyMetadata (cyclomatic 33) · ×1
  • oracleForeignKeys.readOracleForeignKeyMetadata (cyclomatic 33) apps/desktop/src/lib/database/oracleForeignKeys.ts:172 — oracleForeignKeys.readOracleForeignKeyMetadata has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTriggerPlan.executePreparedTriggerPlan · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan::run (cyclomatic 33) apps/desktop/src/lib/database/oracleTriggerPlan.ts:268 — oracleTriggerPlan.executePreparedTriggerPlan::run has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.refreshOracleRoutineDeployment (cyclomatic 33) · ×1
  • oracleRoutineDeploy.refreshOracleRoutineDeployment (cyclomatic 33) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:569 — oracleRoutineDeploy.refreshOracleRoutineDeployment has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarSearchTree.mergeSidebarRegexIndexScopes (cyclomatic 33) · ×1
  • sidebarSearchTree.mergeSidebarRegexIndexScopes (cyclomatic 33) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:256 — sidebarSearchTree.mergeSidebarRegexIndexScopes has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cypherFormatter.tokenizeCypher (cyclomatic 33) · ×1
  • cypherFormatter.tokenizeCypher (cyclomatic 33) apps/desktop/src/lib/sql/cypherFormatter.ts:176 — cypherFormatter.tokenizeCypher has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · insertValueHints.stepLexState (cyclomatic 33) · ×1
  • insertValueHints.stepLexState (cyclomatic 33) apps/desktop/src/lib/sql/insertValueHints.ts:426 — insertValueHints.stepLexState has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleViewRename.executeOracleViewRename (cyclomatic 33) · ×1
  • oracleViewRename.executeOracleViewRename (cyclomatic 33) apps/desktop/src/lib/table/oracleViewRename.ts:268 — oracleViewRename.executeOracleViewRename has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabPresentation.tabIconClass (cyclomatic 33) · ×1
  • tabPresentation.tabIconClass (cyclomatic 33) apps/desktop/src/lib/tabs/tabPresentation.ts:811 — tabPresentation.tabIconClass has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.connect (cyclomatic 33) · ×1
  • connectionStore.useConnectionStore.connect (cyclomatic 33) apps/desktop/src/stores/connectionStore.ts:5215 — connectionStore.useConnectionStore.connect has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.runPublicOperation (cyclomatic 33) · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation (cyclomatic 33) apps/desktop/src/stores/plDebugStore.ts:433 — plDebugStore.usePlDebugStore.runPublicOperation has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation::dispatch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · plDebugStore.evaluateCondition (cyclomatic 33) · ×1
  • plDebugStore.evaluateCondition (cyclomatic 33) apps/desktop/src/stores/plDebugStore.ts:2104 — plDebugStore.evaluateCondition has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · registerDbxMcpBridge (cyclomatic 33) · ×1
  • registerDbxMcpBridge (cyclomatic 33) crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:43 — registerDbxMcpBridge has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 84, execute, a function literal at line 77, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DependencyGraph · ×1
  • DependencyGraph::build_with_functions_and_options (cyclomatic 32) crates/dbx-sql-schema/src/schema_diff.rs:745 — DependencyGraph::build_with_functions_and_options has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.listIndexes (cyclomatic 32) · ×1
  • DbxJdbcPlugin.listIndexes (cyclomatic 32) REDACTED:3429 — DbxJdbcPlugin.listIndexes has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.isSelectWithClause (cyclomatic 32) · ×1
  • OceanBaseOracleAgent.isSelectWithClause (cyclomatic 32) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:277 — OceanBaseOracleAgent.isSelectWithClause has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTemporalJson.node (cyclomatic 32) · ×1
  • PlDebugTemporalJson.node (cyclomatic 32) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:58 — PlDebugTemporalJson.node has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-schema-objects.main (cyclomatic 32) · ×1
  • verify-schema-objects.main (cyclomatic 32) REDACTED:10 — verify-schema-objects.main has cyclomatic complexity 32 (threshold 15). Of this number, 20 points are the body's own statements and 12 belong to 7 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useTauriEvents.useTauriEvents.setupTauriListeners (cyclomatic 32) · ×1
  • useTauriEvents.useTauriEvents.setupTauriListeners (cyclomatic 32) apps/desktop/src/composables/useTauriEvents.ts:28 — useTauriEvents.useTauriEvents.setupTauriListeners has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 41, 87, 64, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.localeFromLanguageTag (cyclomatic 32) · ×1
  • index.localeFromLanguageTag (cyclomatic 32) apps/desktop/src/i18n/index.ts:39 — index.localeFromLanguageTag has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · jdbcProperties.parseJdbcProperties (cyclomatic 32) · ×1
  • jdbcProperties.parseJdbcProperties (cyclomatic 32) apps/desktop/src/lib/connection/jdbcProperties.ts:39 — jdbcProperties.parseJdbcProperties has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridConditionHighlight.tokenizeDataGridCondition (cyclomatic 32) · ×1
  • dataGridConditionHighlight.tokenizeDataGridCondition (cyclomatic 32) apps/desktop/src/lib/dataGrid/dataGridConditionHighlight.ts:51 — dataGridConditionHighlight.tokenizeDataGridCondition has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · xuguUserPermissions.xuguGrantSql (cyclomatic 32) · ×1
  • xuguUserPermissions.xuguGrantSql (cyclomatic 32) apps/desktop/src/lib/database/xuguUserPermissions.ts:580 — xuguUserPermissions.xuguGrantSql has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cyclomatic 32) · ×1
  • codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cyclomatic 32) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:375 — codemirrorSqlDialect.createDbxCodeMirrorSqlDialect has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.includeOraclePackageCompanion (cyclomatic 32) · ×1
  • oracleRoutineDeploy.includeOraclePackageCompanion (cyclomatic 32) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:130 — oracleRoutineDeploy.includeOraclePackageCompanion has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · databaseTableEmpty.buildLayers (cyclomatic 32) · ×1
  • databaseTableEmpty.buildLayers (cyclomatic 32) apps/desktop/src/lib/sidebar/databaseTableEmpty.ts:46 — databaseTableEmpty.buildLayers has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.collectSqlServerLocalVariables (cyclomatic 32) · ×1
  • sqlCompletion.collectSqlServerLocalVariables (cyclomatic 32) apps/desktop/src/lib/sql/sqlCompletion.ts:3066 — sqlCompletion.collectSqlServerLocalVariables has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectDuckDbStructFieldSeparators (cyclomatic 32) · ×1
  • sqlParameters.collectDuckDbStructFieldSeparators (cyclomatic 32) apps/desktop/src/lib/sql/sqlParameters.ts:871 — sqlParameters.collectDuckDbStructFieldSeparators has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.validateDependentDeclaration (cyclomatic 32) · ×1
  • oracleTableRename.validateDependentDeclaration (cyclomatic 32) REDACTED:282 — oracleTableRename.validateDependentDeclaration has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionTables (cyclomatic 32) · ×1
  • connectionStore.useConnectionStore.listCompletionTables (cyclomatic 32) apps/desktop/src/stores/connectionStore.ts:9926 — connectionStore.useConnectionStore.listCompletionTables has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 9948). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · seo.auditPages (cyclomatic 32) · ×1
  • seo.auditPages (cyclomatic 32) docs/scripts/seo.mjs:84 — seo.auditPages has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validateRecord (cyclomatic 32) · ×1
  • validateRecord (cyclomatic 32) plugins/sdk/dev-host/connections.mjs:13 — validateRecord has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAppUpdater.useAppUpdater.checkUpdates (cyclomatic 31) · ×1
  • useAppUpdater.useAppUpdater.checkUpdates (cyclomatic 31) apps/desktop/src/composables/useAppUpdater.ts:231 — useAppUpdater.useAppUpdater.checkUpdates has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cyclomatic 31) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cyclomatic 31) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:397 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.executeOracleIndexPlan (cyclomatic 31) · ×1
  • oracleIndexes.executeOracleIndexPlan (cyclomatic 31) apps/desktop/src/lib/database/oracleIndexes.ts:379 — oracleIndexes.executeOracleIndexPlan has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · productionSafety.sqlTargetSafetyText (cyclomatic 31) · ×1
  • productionSafety.sqlTargetSafetyText (cyclomatic 31) apps/desktop/src/lib/database/productionSafety.ts:276 — productionSafety.sqlTargetSafetyText has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.tokenizeSelectionIdentifiers (cyclomatic 31) · ×1
  • sqlIntentionActions.tokenizeSelectionIdentifiers (cyclomatic 31) apps/desktop/src/lib/editor/sqlIntentionActions.ts:292 — sqlIntentionActions.tokenizeSelectionIdentifiers has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · thriftBinary.readValue (cyclomatic 31) · ×1
  • thriftBinary.readValue (cyclomatic 31) apps/desktop/src/lib/mq/thriftBinary.ts:163 — thriftBinary.readValue has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · schemaDiff.stripSqlCommentsAndStringLiterals (cyclomatic 31) · ×1
  • schemaDiff.stripSqlCommentsAndStringLiterals (cyclomatic 31) apps/desktop/src/lib/schema/schemaDiff.ts:496 — schemaDiff.stripSqlCommentsAndStringLiterals has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · printer.printRuleList (cyclomatic 31) · ×1
  • printer.printRuleList (cyclomatic 31) apps/desktop/src/lib/sql/layout/printer.ts:172 — printer.printRuleList has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 189, 177). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlCompletion.collectSqlServerRoutineParameters (cyclomatic 31) · ×1
  • sqlCompletion.collectSqlServerRoutineParameters (cyclomatic 31) apps/desktop/src/lib/sql/sqlCompletion.ts:3124 — sqlCompletion.collectSqlServerRoutineParameters has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.parseTrailingIdentifierContext (cyclomatic 31) · ×1
  • sqlCompletion.parseTrailingIdentifierContext (cyclomatic 31) apps/desktop/src/lib/sql/sqlCompletion.ts:3303 — sqlCompletion.parseTrailingIdentifierContext has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildKeywordItems (cyclomatic 31) · ×1
  • sqlCompletion.buildKeywordItems (cyclomatic 31) apps/desktop/src/lib/sql/sqlCompletion.ts:6722 — sqlCompletion.buildKeywordItems has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6735, 6743). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlParameters.collectSelectAssignmentVariables (cyclomatic 31) · ×1
  • sqlParameters.collectSelectAssignmentVariables (cyclomatic 31) apps/desktop/src/lib/sql/sqlParameters.ts:1478 — sqlParameters.collectSelectAssignmentVariables has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlRisk.sqlSafetyText (cyclomatic 31) · ×1
  • sqlRisk.sqlSafetyText (cyclomatic 31) apps/desktop/src/lib/sql/sqlRisk.ts:252 — sqlRisk.sqlSafetyText has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTypeManagement.assertNoUnapprovedChange (cyclomatic 31) · ×1
  • oracleTypeManagement.assertNoUnapprovedChange (cyclomatic 31) apps/desktop/src/lib/table/oracleTypeManagement.ts:491 — oracleTypeManagement.assertNoUnapprovedChange has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.duplicateTab (cyclomatic 31) · ×1
  • queryStore.useQueryStore.duplicateTab (cyclomatic 31) apps/desktop/src/stores/queryStore.ts:5489 — queryStore.useQueryStore.duplicateTab has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Projection · ×1
  • Projection::read (cyclomatic 30) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:673 — Projection::read has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleTriggerMetadataReader.summaries (cyclomatic 30) · ×1
  • OracleTriggerMetadataReader.summaries (cyclomatic 30) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:146 — OracleTriggerMetadataReader.summaries has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cyclomatic 30) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cyclomatic 30) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:547 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.resultToExport (cyclomatic 30) · ×1
  • useDataGridExport.useDataGridExport.resultToExport (cyclomatic 30) apps/desktop/src/composables/useDataGridExport.ts:599 — useDataGridExport.useDataGridExport.resultToExport has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.submitBackendExport · ×1
  • useDataGridExport.useDataGridExport.submitBackendExport::execute (cyclomatic 30) apps/desktop/src/composables/useDataGridExport.ts:2414 — useDataGridExport.useDataGridExport.submitBackendExport::execute has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridScrollbars.useDataGridScrollbars (cyclomatic 30) · ×1
  • useDataGridScrollbars.useDataGridScrollbars (cyclomatic 30) apps/desktop/src/composables/useDataGridScrollbars.ts:32 — useDataGridScrollbars.useDataGridScrollbars has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cyclomatic 30) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cyclomatic 30) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:809 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 833, 882, 841, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ai.buildModePromptLines (cyclomatic 30) · ×1
  • ai.buildModePromptLines (cyclomatic 30) apps/desktop/src/lib/ai/ai.ts:681 — ai.buildModePromptLines has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.validateOracleForeignKeySourceChanges (cyclomatic 30) · ×1
  • oracleForeignKeys.validateOracleForeignKeySourceChanges (cyclomatic 30) apps/desktop/src/lib/database/oracleForeignKeys.ts:263 — oracleForeignKeys.validateOracleForeignKeySourceChanges has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.prepareOracleForeignKeyPlan (cyclomatic 30) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyPlan (cyclomatic 30) apps/desktop/src/lib/database/oracleForeignKeys.ts:647 — oracleForeignKeys.prepareOracleForeignKeyPlan has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · xuguUserPermissions.xuguRevokeSql (cyclomatic 30) · ×1
  • xuguUserPermissions.xuguRevokeSql (cyclomatic 30) apps/desktop/src/lib/database/xuguUserPermissions.ts:627 — xuguUserPermissions.xuguRevokeSql has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · graphCompletion.buildGraphCompletionItems (cyclomatic 30) · ×1
  • graphCompletion.buildGraphCompletionItems (cyclomatic 30) apps/desktop/src/lib/graph/graphCompletion.ts:142 — graphCompletion.buildGraphCompletionItems has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbeaverImport.buildConnection (cyclomatic 30) · ×1
  • dbeaverImport.buildConnection (cyclomatic 30) REDACTED:242 — dbeaverImport.buildConnection has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mongoCompletion.collectInnermostObjectKeys (cyclomatic 30) · ×1
  • mongoCompletion.collectInnermostObjectKeys (cyclomatic 30) REDACTED:972 — mongoCompletion.collectInnermostObjectKeys has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · primitives.renderInline (cyclomatic 30) · ×1
  • primitives.renderInline (cyclomatic 30) apps/desktop/src/lib/sql/layout/primitives.ts:464 — primitives.renderInline has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSaveAs.prepareOraclePackageSaveAs (cyclomatic 30) · ×1
  • oraclePackageSaveAs.prepareOraclePackageSaveAs (cyclomatic 30) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:164 — oraclePackageSaveAs.prepareOraclePackageSaveAs has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cyclomatic 30) · ×1
  • connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cyclomatic 30) apps/desktop/src/stores/connectionStore.ts:3361 — connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.closeOriginal (cyclomatic 30) · ×1
  • plDebugStore.usePlDebugStore.closeOriginal (cyclomatic 30) apps/desktop/src/stores/plDebugStore.ts:1810 — plDebugStore.usePlDebugStore.closeOriginal has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openObjectBrowser (cyclomatic 30) · ×1
  • queryStore.useQueryStore.openObjectBrowser (cyclomatic 30) apps/desktop/src/stores/queryStore.ts:3805 — queryStore.useQueryStore.openObjectBrowser has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cyclomatic 30) · ×1
  • savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cyclomatic 30) apps/desktop/src/stores/savedSqlStore.ts:607 — savedSqlStore.useSavedSqlStore.updateFileExecutionTarget has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 638, a function literal at line 632, a function literal at line 653, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · IssueSubmissionLimiter.fetch (cyclomatic 30) · ×1
  • IssueSubmissionLimiter.fetch (cyclomatic 30) docs/worker.ts:565 — IssueSubmissionLimiter.fetch has cyclomatic complexity 30 (threshold 15). Of this number, 20 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · locate (cyclomatic 30) · ×1
  • locate (cyclomatic 30) REDACTED:316 — locate has cyclomatic complexity 30 (threshold 15). Of this number, 18 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginManifest · ×1
  • PluginManifest::compatibility (cyclomatic 29) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1075 — PluginManifest::compatibility has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OraclePlSqlBlock · ×1
  • OraclePlSqlBlock::is_complete (cyclomatic 29) crates/dbx-sql-core/src/sql.rs:3700 — OraclePlSqlBlock::is_complete has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StarRocksCreateTable · ×1
  • StarRocksCreateTable::validate (cyclomatic 29) crates/dbx-sql-schema/src/table_structure_sql/create_dialect.rs:107 — StarRocksCreateTable::validate has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.getObjectSource (cyclomatic 29) · ×1
  • DbxJdbcPlugin.getObjectSource (cyclomatic 29) REDACTED:5551 — DbxJdbcPlugin.getObjectSource has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.requiresTypedLobConnection (cyclomatic 29) · ×1
  • PlDebugTarget.requiresTypedLobConnection (cyclomatic 29) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:113 — PlDebugTarget.requiresTypedLobConnection has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Db2ExplainPlan.singleQuery (cyclomatic 29) · ×1
  • Db2ExplainPlan.singleQuery (cyclomatic 29) REDACTED:277 — Db2ExplainPlan.singleQuery has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlobBoundExecutor.execute (cyclomatic 29) · ×1
  • BlobBoundExecutor.execute (cyclomatic 29) agents/common/src/main/java/com/dbx/agent/BlobBoundExecutor.java:35 — BlobBoundExecutor.execute has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useDataGridCanvasRuntime.useDataGridCanvasRuntime (cyclomatic 29) · ×1
  • useDataGridCanvasRuntime.useDataGridCanvasRuntime (cyclomatic 29) apps/desktop/src/composables/useDataGridCanvasRuntime.ts:55 — useDataGridCanvasRuntime.useDataGridCanvasRuntime has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cyclomatic 29) · ×1
  • useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cyclomatic 29) apps/desktop/src/composables/useMultiDbTargetSelection.ts:241 — useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCellCoercion.parsePostgresArrayText (cyclomatic 29) · ×1
  • dataGridCellCoercion.parsePostgresArrayText (cyclomatic 29) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:381 — dataGridCellCoercion.parsePostgresArrayText has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.oracleConstraintDefinitionFromInfo (cyclomatic 29) · ×1
  • oracleConstraints.oracleConstraintDefinitionFromInfo (cyclomatic 29) apps/desktop/src/lib/database/oracleConstraints.ts:116 — oracleConstraints.oracleConstraintDefinitionFromInfo has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTriggerPlan.executePreparedTriggerPlan (cyclomatic 29) · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan (cyclomatic 29) apps/desktop/src/lib/database/oracleTriggerPlan.ts:257 — oracleTriggerPlan.executePreparedTriggerPlan has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan::run) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlSemanticSelectionRanges.collectSqlRanges (cyclomatic 29) · ×1
  • sqlSemanticSelectionRanges.collectSqlRanges (cyclomatic 29) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:331 — sqlSemanticSelectionRanges.collectSqlRanges has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphSignatureHelp.getGraphFunctionSignatureHelp (cyclomatic 29) · ×1
  • graphSignatureHelp.getGraphFunctionSignatureHelp (cyclomatic 29) apps/desktop/src/lib/graph/graphSignatureHelp.ts:6 — graphSignatureHelp.getGraphFunctionSignatureHelp has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.splitMongoSemicolonSeparatedSegments (cyclomatic 29) · ×1
  • mongoShellCommand.splitMongoSemicolonSeparatedSegments (cyclomatic 29) REDACTED:1465 — mongoShellCommand.splitMongoSemicolonSeparatedSegments has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editableQueryHiddenKeys.appendSelectProjections (cyclomatic 29) · ×1
  • editableQueryHiddenKeys.appendSelectProjections (cyclomatic 29) apps/desktop/src/lib/sql/editableQueryHiddenKeys.ts:47 — editableQueryHiddenKeys.appendSelectProjections has cyclomatic complexity 29 (threshold 15). Of this number, 17 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.parsePostgresRegclassPrefix (cyclomatic 29) · ×1
  • sqlCompletion.parsePostgresRegclassPrefix (cyclomatic 29) apps/desktop/src/lib/sql/sqlCompletion.ts:2350 — sqlCompletion.parsePostgresRegclassPrefix has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildTableItems (cyclomatic 29) · ×1
  • sqlCompletion.buildTableItems (cyclomatic 29) apps/desktop/src/lib/sql/sqlCompletion.ts:4951 — sqlCompletion.buildTableItems has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to one function literal inside it that branches (line 4970). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlParameters.collectTriggerPseudoRecordFieldStarts (cyclomatic 29) · ×1
  • sqlParameters.collectTriggerPseudoRecordFieldStarts (cyclomatic 29) apps/desktop/src/lib/sql/sqlParameters.ts:971 — sqlParameters.collectTriggerPseudoRecordFieldStarts has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableSelectSql.quoteTableIdentifier (cyclomatic 29) · ×1
  • tableSelectSql.quoteTableIdentifier (cyclomatic 29) apps/desktop/src/lib/table/tableSelectSql.ts:93 — tableSelectSql.quoteTableIdentifier has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableVGroup.findTableVGroupContainerNode (cyclomatic 29) · ×1
  • tableVGroup.findTableVGroupContainerNode (cyclomatic 29) apps/desktop/src/lib/table/tableVGroup.ts:626 — tableVGroup.findTableVGroupContainerNode has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (walk, a function literal at line 660, matchesOptional, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.searchSidebarObjects (cyclomatic 29) · ×1
  • connectionStore.useConnectionStore.searchSidebarObjects (cyclomatic 29) apps/desktop/src/stores/connectionStore.ts:3160 — connectionStore.useConnectionStore.searchSidebarObjects has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadDorisCatalogTables (cyclomatic 29) · ×1
  • connectionStore.useConnectionStore.loadDorisCatalogTables (cyclomatic 29) apps/desktop/src/stores/connectionStore.ts:7126 — connectionStore.useConnectionStore.loadDorisCatalogTables has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 7150). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.readPublic (cyclomatic 29) · ×1
  • plDebugStore.usePlDebugStore.readPublic (cyclomatic 29) apps/desktop/src/stores/plDebugStore.ts:555 — plDebugStore.usePlDebugStore.readPublic has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport (cyclomatic 29) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport (cyclomatic 29) apps/desktop/src/stores/queryStore.ts:10501 — queryStore.useQueryStore.captureResultLegacyValuesForExport has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.resolveResultMetadataForBatch (cyclomatic 29) · ×1
  • queryStore.useQueryStore.resolveResultMetadataForBatch (cyclomatic 29) apps/desktop/src/stores/queryStore.ts:10597 — queryStore.useQueryStore.resolveResultMetadataForBatch has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.lobInput (cyclomatic 28) · ×1
  • PlDebugTarget.lobInput (cyclomatic 28) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:935 — PlDebugTarget.lobInput has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlStorage.stripOracleStorageAttributes (cyclomatic 28) · ×1
  • ddlStorage.stripOracleStorageAttributes (cyclomatic 28) apps/desktop/src/lib/sql/ddlStorage.ts:216 — ddlStorage.stripOracleStorageAttributes has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.skipBalancedParens (cyclomatic 28) · ×1
  • sqlStatementRanges.skipBalancedParens (cyclomatic 28) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1771 — sqlStatementRanges.skipBalancedParens has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cyclomatic 28) · ×1
  • useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cyclomatic 28) apps/desktop/src/composables/useDataGridColumnFormatter.ts:270 — useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cyclomatic 28) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cyclomatic 28) apps/desktop/src/composables/useDataGridLargeValues.ts:517 — useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionPickerTree.buildConnectionPickerRows (cyclomatic 28) · ×1
  • connectionPickerTree.buildConnectionPickerRows (cyclomatic 28) apps/desktop/src/lib/connection/connectionPickerTree.ts:47 — connectionPickerTree.buildConnectionPickerRows has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (visitSearch, visitTree, subtreeHasConnection). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · dataGridInsertPaste.readTableReferenceToken (cyclomatic 28) · ×1
  • dataGridInsertPaste.readTableReferenceToken (cyclomatic 28) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:174 — dataGridInsertPaste.readTableReferenceToken has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.prepareOracleIndexPlan (cyclomatic 28) · ×1
  • oracleIndexes.prepareOracleIndexPlan (cyclomatic 28) apps/desktop/src/lib/database/oracleIndexes.ts:333 — oracleIndexes.prepareOracleIndexPlan has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cyclomatic 28) · ×1
  • codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cyclomatic 28) apps/desktop/src/lib/editor/codemirrorCurrentStatementFrameLayer.ts:70 — codemirrorCurrentStatementFrameLayer.currentStatementFrameRect has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.validateBulkWriteOperations (cyclomatic 28) · ×1
  • mongoShellCommand.validateBulkWriteOperations (cyclomatic 28) REDACTED:1919 — mongoShellCommand.validateBulkWriteOperations has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nacosAdmin.normalizeNacosEndpoint (cyclomatic 28) · ×1
  • nacosAdmin.normalizeNacosEndpoint (cyclomatic 28) apps/desktop/src/lib/nacos/nacosAdmin.ts:129 — nacosAdmin.normalizeNacosEndpoint has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginAiCompletion.createPluginAiCompletion.runGeneration (cyclomatic 28) · ×1
  • pluginAiCompletion.createPluginAiCompletion.runGeneration (cyclomatic 28) apps/desktop/src/lib/plugins/pluginAiCompletion.ts:131 — pluginAiCompletion.createPluginAiCompletion.runGeneration has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisKeyGrouping.compileRedisGroupGlob (cyclomatic 28) · ×1
  • redisKeyGrouping.compileRedisGroupGlob (cyclomatic 28) apps/desktop/src/lib/redis/redisKeyGrouping.ts:42 — redisKeyGrouping.compileRedisGroupGlob has cyclomatic complexity 28 (threshold 15). Of this number, 16 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rules.hasRuleLineBreak (cyclomatic 28) · ×1
  • rules.hasRuleLineBreak (cyclomatic 28) apps/desktop/src/lib/sql/layout/rules.ts:37 — rules.hasRuleLineBreak has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlCompletion.findMatchingParen (cyclomatic 28) · ×1
  • sqlCompletion.findMatchingParen (cyclomatic 28) apps/desktop/src/lib/sql/sqlCompletion.ts:4344 — sqlCompletion.findMatchingParen has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.splitTopLevel (cyclomatic 28) · ×1
  • sqlCompletion.splitTopLevel (cyclomatic 28) apps/desktop/src/lib/sql/sqlCompletion.ts:4611 — sqlCompletion.splitTopLevel has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oraclePackageSource.tokens (cyclomatic 28) · ×1
  • oraclePackageSource.tokens (cyclomatic 28) apps/desktop/src/lib/table/oraclePackageSource.ts:10 — oraclePackageSource.tokens has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cyclomatic 28) · ×1
  • starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cyclomatic 28) apps/desktop/src/lib/table/starrocksLayoutCopy.ts:43 — starrocksLayoutCopy.buildStarRocksLayoutCopyDdl has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.appendQueryResultSegment (cyclomatic 28) · ×1
  • queryStore.appendQueryResultSegment (cyclomatic 28) apps/desktop/src/stores/queryStore.ts:428 — queryStore.appendQueryResultSegment has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cyclomatic 28) · ×1
  • queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cyclomatic 28) apps/desktop/src/stores/queryStore.ts:7453 — queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.resolveQueryDisplayMetadata (cyclomatic 28) · ×1
  • queryStore.useQueryStore.resolveQueryDisplayMetadata (cyclomatic 28) apps/desktop/src/stores/queryStore.ts:7608 — queryStore.useQueryStore.resolveQueryDisplayMetadata has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dbx_cli · ×1
  • dbx_cli::run_query (cyclomatic 27) crates/dbx-cli/src/main.rs:303 — dbx_cli::run_query has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.oracleColumnDataType (cyclomatic 27) · ×1
  • DbxJdbcPlugin.oracleColumnDataType (cyclomatic 27) REDACTED:6089 — DbxJdbcPlugin.oracleColumnDataType has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.formatDataType (cyclomatic 27) · ×1
  • OceanBaseOracleAgent.formatDataType (cyclomatic 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2751 — OceanBaseOracleAgent.formatDataType has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlDebugCompositeOutput.child (cyclomatic 27) · ×1
  • PlDebugCompositeOutput.child (cyclomatic 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:141 — PlDebugCompositeOutput.child has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PlDebugTarget.load (cyclomatic 27) · ×1
  • PlDebugTarget.load (cyclomatic 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1321 — PlDebugTarget.load has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cyclomatic 27) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cyclomatic 27) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:425 — useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useCellDetailEditor.useCellDetailEditor.create (cyclomatic 27) · ×1
  • useCellDetailEditor.useCellDetailEditor.create (cyclomatic 27) apps/desktop/src/composables/useCellDetailEditor.ts:239 — useCellDetailEditor.useCellDetailEditor.create has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGenerateSession.streamInsertTable (cyclomatic 27) · ×1
  • useDataGenerateSession.streamInsertTable (cyclomatic 27) apps/desktop/src/composables/useDataGenerateSession.ts:161 — useDataGenerateSession.streamInsertTable has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportCsv (cyclomatic 27) · ×1
  • useDataGridExport.useDataGridExport.exportCsv (cyclomatic 27) apps/desktop/src/composables/useDataGridExport.ts:1482 — useDataGridExport.useDataGridExport.exportCsv has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1484, 1507). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · dataGridColumnType.resolveDataGridTypeVisualKind (cyclomatic 27) · ×1
  • dataGridColumnType.resolveDataGridTypeVisualKind (cyclomatic 27) apps/desktop/src/lib/dataGrid/dataGridColumnType.ts:353 — dataGridColumnType.resolveDataGridTypeVisualKind has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridInsertPaste.readBracketedGroup (cyclomatic 27) · ×1
  • dataGridInsertPaste.readBracketedGroup (cyclomatic 27) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:128 — dataGridInsertPaste.readBracketedGroup has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridSelectionPersistence.captureDataGridSelection (cyclomatic 27) · ×1
  • dataGridSelectionPersistence.captureDataGridSelection (cyclomatic 27) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:134 — dataGridSelectionPersistence.captureDataGridSelection has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cyclomatic 27) · ×1
  • legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cyclomatic 27) apps/desktop/src/lib/dataGrid/legacyLargeValueExport.ts:86 — legacyLargeValueExport.fetchLegacyLargeValueRequestChunk has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.buildGrantAuthorizationPlan (cyclomatic 27) · ×1
  • databaseAuthorizationPlan.buildGrantAuthorizationPlan (cyclomatic 27) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:275 — databaseAuthorizationPlan.buildGrantAuthorizationPlan has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.nativeJobProgramArgumentLayout (cyclomatic 27) · ×1
  • nativeJobAdmin.nativeJobProgramArgumentLayout (cyclomatic 27) apps/desktop/src/lib/database/nativeJobAdmin.ts:269 — nativeJobAdmin.nativeJobProgramArgumentLayout has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.oracleIndexSnapshotMatchesLoadedColumns (cyclomatic 27) · ×1
  • oracleIndexes.oracleIndexSnapshotMatchesLoadedColumns (cyclomatic 27) apps/desktop/src/lib/database/oracleIndexes.ts:126 — oracleIndexes.oracleIndexSnapshotMatchesLoadedColumns has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 131, 137). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · dataDictionaryExportTask.startDataDictionaryExport (cyclomatic 27) · ×1
  • dataDictionaryExportTask.startDataDictionaryExport (cyclomatic 27) apps/desktop/src/lib/docs/dataDictionaryExportTask.ts:36 — dataDictionaryExportTask.startDataDictionaryExport has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 43, 91, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · codemirrorSqlAliasHighlights.createSqlAliasHighlights (cyclomatic 27) · ×1
  • codemirrorSqlAliasHighlights.createSqlAliasHighlights (cyclomatic 27) apps/desktop/src/lib/editor/codemirrorSqlAliasHighlights.ts:11 — codemirrorSqlAliasHighlights.createSqlAliasHighlights has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · shortcutDisplay.shortcutKeyLabel (cyclomatic 27) · ×1
  • shortcutDisplay.shortcutKeyLabel (cyclomatic 27) apps/desktop/src/lib/editor/shortcutDisplay.ts:84 — shortcutDisplay.shortcutKeyLabel has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gridSnapshot.renderGridSnapshotHtml (cyclomatic 27) · ×1
  • gridSnapshot.renderGridSnapshotHtml (cyclomatic 27) apps/desktop/src/lib/gridSnapshot/gridSnapshot.ts:130 — gridSnapshot.renderGridSnapshotHtml has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · nacosConfigValidation.validateHtml (cyclomatic 27) · ×1
  • nacosConfigValidation.validateHtml (cyclomatic 27) REDACTED:108 — nacosConfigValidation.validateHtml has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · solrAdmin.buildSolrQuery (cyclomatic 27) · ×1
  • solrAdmin.buildSolrQuery (cyclomatic 27) apps/desktop/src/lib/solr/solrAdmin.ts:302 — solrAdmin.buildSolrQuery has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · printer.printClause (cyclomatic 27) · ×1
  • printer.printClause (cyclomatic 27) apps/desktop/src/lib/sql/layout/printer.ts:57 — printer.printClause has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 85, 99). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlAnalysis.analyzeEditableQueryEditability (cyclomatic 27) · ×1
  • sqlAnalysis.analyzeEditableQueryEditability (cyclomatic 27) apps/desktop/src/lib/sql/sqlAnalysis.ts:249 — sqlAnalysis.analyzeEditableQueryEditability has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.scanCteDefinitions (cyclomatic 27) · ×1
  • sqlCompletion.scanCteDefinitions (cyclomatic 27) apps/desktop/src/lib/sql/sqlCompletion.ts:4484 — sqlCompletion.scanCteDefinitions has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.objectMatchesCompletionContext (cyclomatic 27) · ×1
  • sqlCompletion.objectMatchesCompletionContext (cyclomatic 27) apps/desktop/src/lib/sql/sqlCompletion.ts:5293 — sqlCompletion.objectMatchesCompletionContext has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineWrite.prepareOracleRoutineSourceSave (cyclomatic 27) · ×1
  • oracleRoutineWrite.prepareOracleRoutineSourceSave (cyclomatic 27) apps/desktop/src/lib/table/oracleRoutineWrite.ts:49 — oracleRoutineWrite.prepareOracleRoutineSourceSave has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (execute, a function literal at line 75, a function literal at line 138). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.loadDdlViewerTab (cyclomatic 27) · ×1
  • queryStore.useQueryStore.loadDdlViewerTab (cyclomatic 27) apps/desktop/src/stores/queryStore.ts:3622 — queryStore.useQueryStore.loadDdlViewerTab has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.closeTab (cyclomatic 27) · ×1
  • queryStore.useQueryStore.closeTab (cyclomatic 27) apps/desktop/src/stores/queryStore.ts:5193 — queryStore.useQueryStore.closeTab has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · database-env.main (cyclomatic 27) · ×1
  • database-env.main (cyclomatic 27) scripts/database-env.mjs:520 — database-env.main has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NativeJobRegistry · ×1
  • NativeJobRegistry::remember (cyclomatic 26) crates/dbx-core/src/schema/native_jobs/service.rs:102 — NativeJobRegistry::remember has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SshConfigLoader · ×1
  • SshConfigLoader::parse_lines (cyclomatic 26) crates/dbx-driver-support/src/ssh_config.rs:343 — SshConfigLoader::parse_lines has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NativeLegacyJobSession.prepare (cyclomatic 26) · ×1
  • NativeLegacyJobSession.prepare (cyclomatic 26) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:139 — NativeLegacyJobSession.prepare has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.completionAssistantPackageMembers (cyclomatic 26) · ×1
  • OceanBaseOracleAgent.completionAssistantPackageMembers (cyclomatic 26) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:878 — OceanBaseOracleAgent.completionAssistantPackageMembers has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MongoAgent.configureBuilder (cyclomatic 26) · ×1
  • MongoAgent.configureBuilder (cyclomatic 26) REDACTED:159 — MongoAgent.configureBuilder has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OracleTriggerReader.summary (cyclomatic 26) · ×1
  • OracleTriggerReader.summary (cyclomatic 26) REDACTED:148 — OracleTriggerReader.summary has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cyclomatic 26) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cyclomatic 26) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:724 — useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · transferStrategy.createTransferSubmission.start (cyclomatic 26) · ×1
  • transferStrategy.createTransferSubmission.start (cyclomatic 26) apps/desktop/src/components/transfer/transferStrategy.ts:101 — transferStrategy.createTransferSubmission.start has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridActions.useDataGridActions.onSort (cyclomatic 26) · ×1
  • useDataGridActions.useDataGridActions.onSort (cyclomatic 26) apps/desktop/src/composables/useDataGridActions.ts:751 — useDataGridActions.useDataGridActions.onSort has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cyclomatic 26) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cyclomatic 26) REDACTED:558 — useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cyclomatic 26) · ×1
  • useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cyclomatic 26) apps/desktop/src/composables/useNavigationTargets.ts:415 — useNavigationTargets.useNavigationTargets.onStructureEditorSaved has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · errorUtils.normalizeBackendErrorAtDepth (cyclomatic 26) · ×1
  • errorUtils.normalizeBackendErrorAtDepth (cyclomatic 26) apps/desktop/src/lib/backend/errorUtils.ts:206 — errorUtils.normalizeBackendErrorAtDepth has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobAdmin.buildNativeJobDefinitionCreate (cyclomatic 26) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionCreate (cyclomatic 26) apps/desktop/src/lib/database/nativeJobAdmin.ts:378 — nativeJobAdmin.buildNativeJobDefinitionCreate has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · historyRestoreTarget.resolveHistorySqlRestoreTarget (cyclomatic 26) · ×1
  • historyRestoreTarget.resolveHistorySqlRestoreTarget (cyclomatic 26) apps/desktop/src/lib/history/historyRestoreTarget.ts:12 — historyRestoreTarget.resolveHistorySqlRestoreTarget has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cyclomatic 26) · ×1
  • influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cyclomatic 26) apps/desktop/src/lib/influxdb/influxDbV1Delete.ts:84 — influxDbV1Delete.resolveInfluxDbV1DeleteTarget has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.classifyCursorInCall (cyclomatic 26) · ×1
  • mongoCompletion.classifyCursorInCall (cyclomatic 26) REDACTED:1145 — mongoCompletion.classifyCursorInCall has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · pluginFloatingWindow.parseFloatingWindowRequest (cyclomatic 26) · ×1
  • pluginFloatingWindow.parseFloatingWindowRequest (cyclomatic 26) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:267 — pluginFloatingWindow.parseFloatingWindowRequest has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.matchesPendingTransferInput (cyclomatic 26) · ×1
  • oracleRoutineDeploy.matchesPendingTransferInput (cyclomatic 26) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:295 — oracleRoutineDeploy.matchesPendingTransferInput has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · schemaDiffDdlNormalize.stripSchemaFromSql (cyclomatic 26) · ×1
  • schemaDiffDdlNormalize.stripSchemaFromSql (cyclomatic 26) REDACTED:50 — schemaDiffDdlNormalize.stripSchemaFromSql has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · treeNodeClick.treeNodeRowDoubleClickAction (cyclomatic 26) · ×1
  • treeNodeClick.treeNodeRowDoubleClickAction (cyclomatic 26) apps/desktop/src/lib/sidebar/treeNodeClick.ts:195 — treeNodeClick.treeNodeRowDoubleClickAction has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.activeSingleQuotedLiteralStart (cyclomatic 26) · ×1
  • sqlCompletion.activeSingleQuotedLiteralStart (cyclomatic 26) apps/desktop/src/lib/sql/sqlCompletion.ts:2289 — sqlCompletion.activeSingleQuotedLiteralStart has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.extractReferencedTables (cyclomatic 26) · ×1
  • sqlCompletion.extractReferencedTables (cyclomatic 26) apps/desktop/src/lib/sql/sqlCompletion.ts:4022 — sqlCompletion.extractReferencedTables has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectNativeSqlServerParameters (cyclomatic 26) · ×1
  • sqlParameters.collectNativeSqlServerParameters (cyclomatic 26) apps/desktop/src/lib/sql/sqlParameters.ts:1320 — sqlParameters.collectNativeSqlServerParameters has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineParameters.jdbcRoutineParameterType (cyclomatic 26) · ×1
  • routineParameters.jdbcRoutineParameterType (cyclomatic 26) apps/desktop/src/lib/table/routineParameters.ts:185 — routineParameters.jdbcRoutineParameterType has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tableStructureEditorState.isDataTypeLengthDisabled (cyclomatic 26) · ×1
  • tableStructureEditorState.isDataTypeLengthDisabled (cyclomatic 26) apps/desktop/src/lib/table/tableStructureEditorState.ts:1896 — tableStructureEditorState.isDataTypeLengthDisabled has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.applyLoadedObjectSource (cyclomatic 26) · ×1
  • queryStore.useQueryStore.applyLoadedObjectSource (cyclomatic 26) apps/desktop/src/stores/queryStore.ts:3542 — queryStore.useQueryStore.applyLoadedObjectSource has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.requireAiRecommendationUpdate (cyclomatic 26) · ×1
  • server.requireAiRecommendationUpdate (cyclomatic 26) plugins/sdk/dev-host/server.mjs:47 — server.requireAiRecommendationUpdate has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · publish (cyclomatic 26) · ×1
  • publish (cyclomatic 26) .github/ui-preview/publish.mjs:167 — publish has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginPackageInstaller · ×1
  • PluginPackageInstaller::install_bytes_locked (cyclomatic 25) crates/dbx-plugin-runtime/src/plugins/installer.rs:528 — PluginPackageInstaller::install_bytes_locked has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.oracleListIndexes (cyclomatic 25) · ×1
  • DbxJdbcPlugin.oracleListIndexes (cyclomatic 25) REDACTED:5441 — DbxJdbcPlugin.oracleListIndexes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.continueWith (cyclomatic 25) · ×1
  • PlDebugSession.continueWith (cyclomatic 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2179 — PlDebugSession.continueWith has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Plan.bind (cyclomatic 25) · ×1
  • Plan.bind (cyclomatic 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:432 — Plan.bind has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlobBoundStatement.scanSql (cyclomatic 25) · ×1
  • BlobBoundStatement.scanSql (cyclomatic 25) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:58 — BlobBoundStatement.scanSql has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlStorage.stripOceanBaseOracleStorageOptions (cyclomatic 25) · ×1
  • ddlStorage.stripOceanBaseOracleStorageOptions (cyclomatic 25) apps/desktop/src/lib/sql/ddlStorage.ts:91 — ddlStorage.stripOceanBaseOracleStorageOptions has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.oraclePlSqlTokens (cyclomatic 25) · ×1
  • sqlStatementRanges.oraclePlSqlTokens (cyclomatic 25) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2712 — sqlStatementRanges.oraclePlSqlTokens has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cyclomatic 25) · ×1
  • useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cyclomatic 25) apps/desktop/src/components/editor/useQueryEditorCompletionMetadata.ts:421 — useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSessionDiagnostics.useSessionDiagnostics.refresh (cyclomatic 25) · ×1
  • useSessionDiagnostics.useSessionDiagnostics.refresh (cyclomatic 25) apps/desktop/src/composables/useSessionDiagnostics.ts:40 — useSessionDiagnostics.useSessionDiagnostics.refresh has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cyclomatic 25) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cyclomatic 25) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:203 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionUrl.urlParamsRequireTls (cyclomatic 25) · ×1
  • connectionUrl.urlParamsRequireTls (cyclomatic 25) REDACTED:383 — connectionUrl.urlParamsRequireTls has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionUrlBuilder.connectionUrlCopyFormats (cyclomatic 25) · ×1
  • connectionUrlBuilder.connectionUrlCopyFormats (cyclomatic 25) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:557 — connectionUrlBuilder.connectionUrlCopyFormats has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridClipboard.prepareDataGridClipboard (cyclomatic 25) · ×1
  • dataGridClipboard.prepareDataGridClipboard (cyclomatic 25) apps/desktop/src/lib/dataGrid/dataGridClipboard.ts:65 — dataGridClipboard.prepareDataGridClipboard has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCopyExtractor.validateDataGridExtractorOptions (cyclomatic 25) · ×1
  • dataGridCopyExtractor.validateDataGridExtractorOptions (cyclomatic 25) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:307 — dataGridCopyExtractor.validateDataGridExtractorOptions has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridSelectionPersistence.restoreDataGridSelection (cyclomatic 25) · ×1
  • dataGridSelectionPersistence.restoreDataGridSelection (cyclomatic 25) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:200 — dataGridSelectionPersistence.restoreDataGridSelection has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.prepareOracleConstraintPlan (cyclomatic 25) · ×1
  • oracleConstraints.prepareOracleConstraintPlan (cyclomatic 25) apps/desktop/src/lib/database/oracleConstraints.ts:692 — oracleConstraints.prepareOracleConstraintPlan has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · explainPlan.parseDamengExplainText (cyclomatic 25) · ×1
  • explainPlan.parseDamengExplainText (cyclomatic 25) apps/desktop/src/lib/diagram/explainPlan.ts:89 — explainPlan.parseDamengExplainText has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryEditorTableDrop.parseTableReferencePayload (cyclomatic 25) · ×1
  • queryEditorTableDrop.parseTableReferencePayload (cyclomatic 25) apps/desktop/src/lib/editor/queryEditorTableDrop.ts:193 — queryEditorTableDrop.parseTableReferencePayload has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlSemanticSelectionRanges.collectExpressionSection (cyclomatic 25) · ×1
  • sqlSemanticSelectionRanges.collectExpressionSection (cyclomatic 25) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:247 — sqlSemanticSelectionRanges.collectExpressionSection has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.extractActiveDatabase (cyclomatic 25) · ×1
  • mongoCompletion.extractActiveDatabase (cyclomatic 25) REDACTED:2526 — mongoCompletion.extractActiveDatabase has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cyclomatic 25) · ×1
  • sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cyclomatic 25) apps/desktop/src/lib/sidebar/sidebarNodeOrdering.ts:55 — sidebarNodeOrdering.orderSidebarTreeChildrenForParent has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · diagnostics.isSqlServerGoSeparatorLine (cyclomatic 25) · ×1
  • diagnostics.isSqlServerGoSeparatorLine (cyclomatic 25) apps/desktop/src/lib/sql/semantic/diagnostics.ts:167 — diagnostics.isSqlServerGoSeparatorLine has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · model.sqlSemanticTableNameSpans (cyclomatic 25) · ×1
  • model.sqlSemanticTableNameSpans (cyclomatic 25) apps/desktop/src/lib/sql/semantic/model.ts:155 — model.sqlSemanticTableNameSpans has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.cteBodyProjectionShape (cyclomatic 25) · ×1
  • model.cteBodyProjectionShape (cyclomatic 25) apps/desktop/src/lib/sql/semantic/model.ts:274 — model.cteBodyProjectionShape has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.scanSelectListContext (cyclomatic 25) · ×1
  • sqlCompletion.scanSelectListContext (cyclomatic 25) apps/desktop/src/lib/sql/sqlCompletion.ts:3466 — sqlCompletion.scanSelectListContext has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlDatabaseLinks.collectSqlXmlKeywordPositions (cyclomatic 25) · ×1
  • sqlDatabaseLinks.collectSqlXmlKeywordPositions (cyclomatic 25) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:10 — sqlDatabaseLinks.collectSqlXmlKeywordPositions has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · objectSourceLoad.oracleTriggerErrorEditorOffset (cyclomatic 25) · ×1
  • objectSourceLoad.oracleTriggerErrorEditorOffset (cyclomatic 25) apps/desktop/src/lib/table/objectSourceLoad.ts:32 — objectSourceLoad.oracleTriggerErrorEditorOffset has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleRoutineRename.prepareOracleRoutineRename (cyclomatic 25) · ×1
  • oracleRoutineRename.prepareOracleRoutineRename (cyclomatic 25) apps/desktop/src/lib/table/oracleRoutineRename.ts:253 — oracleRoutineRename.prepareOracleRoutineRename has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · tableSqlTemplates.columnPlaceholderValue (cyclomatic 25) · ×1
  • tableSqlTemplates.columnPlaceholderValue (cyclomatic 25) apps/desktop/src/lib/table/tableSqlTemplates.ts:197 — tableSqlTemplates.columnPlaceholderValue has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableTree.mergeTableTreePageChildren (cyclomatic 25) · ×1
  • tableTree.mergeTableTreePageChildren (cyclomatic 25) apps/desktop/src/lib/table/tableTree.ts:447 — tableTree.mergeTableTreePageChildren has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (addNode, collect, addToParent, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cyclomatic 25) · ×1
  • connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cyclomatic 25) apps/desktop/src/stores/connectionStore.ts:3080 — connectionStore.useConnectionStore.loadPagedObjectGroupChildren has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot (cyclomatic 25) · ×1
  • connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot (cyclomatic 25) apps/desktop/src/stores/connectionStore.ts:3556 — connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · transferTaskStore.normalizeTask (cyclomatic 25) · ×1
  • transferTaskStore.normalizeTask (cyclomatic 25) apps/desktop/src/stores/transferTaskStore.ts:98 — transferTaskStore.normalizeTask has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · worker.runAggregation (cyclomatic 25) · ×1
  • worker.runAggregation (cyclomatic 25) deploy/plugin-stats-worker/worker.ts:245 — worker.runAggregation has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RoutineOperationRegistry · ×1
  • RoutineOperationRegistry::prepare_batch (cyclomatic 24) crates/dbx-core/src/schema/oracle_routines/operations/retention.rs:186 — RoutineOperationRegistry::prepare_batch has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentDriverClient · ×1
  • AgentDriverClient::call_typed_with_timeout_and_cancel (cyclomatic 24) crates/dbx-driver-agent/src/agent_driver.rs:2250 — AgentDriverClient::call_typed_with_timeout_and_cancel has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: AgentMethod::as_str (cyclomatic 46) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.renderNotice (cyclomatic 24) · ×1
  • index.html.renderNotice (cyclomatic 24) apps/desktop/index.html:409 — index.html.renderNotice has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cyclomatic 24) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cyclomatic 24) apps/desktop/src/composables/useDataGridLargeValues.ts:736 — useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useFileDrop.useFileDrop.setupFileDrop (cyclomatic 24) · ×1
  • useFileDrop.useFileDrop.setupFileDrop (cyclomatic 24) apps/desktop/src/composables/useFileDrop.ts:44 — useFileDrop.useFileDrop.setupFileDrop has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 48, 125, 139). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · documentStoreProvider.parseMongoFilterValueAs (cyclomatic 24) · ×1
  • documentStoreProvider.parseMongoFilterValueAs (cyclomatic 24) apps/desktop/src/lib/app/documentStoreProvider.ts:914 — documentStoreProvider.parseMongoFilterValueAs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · safeJsonFormat.myersDiff (cyclomatic 24) · ×1
  • safeJsonFormat.myersDiff (cyclomatic 24) apps/desktop/src/lib/common/safeJsonFormat.ts:301 — safeJsonFormat.myersDiff has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · xmlFormat.parseXmlDocument (cyclomatic 24) · ×1
  • xmlFormat.parseXmlDocument (cyclomatic 24) apps/desktop/src/lib/common/xmlFormat.ts:37 — xmlFormat.parseXmlDocument has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentTarget.consulAgentWriteBlockedReason (cyclomatic 24) · ×1
  • agentTarget.consulAgentWriteBlockedReason (cyclomatic 24) apps/desktop/src/lib/consul/agentTarget.ts:39 — agentTarget.consulAgentWriteBlockedReason has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · nativeJobAdmin.nativeJobDefinitionForEdit (cyclomatic 24) · ×1
  • nativeJobAdmin.nativeJobDefinitionForEdit (cyclomatic 24) apps/desktop/src/lib/database/nativeJobAdmin.ts:324 — nativeJobAdmin.nativeJobDefinitionForEdit has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cyclomatic 24) · ×1
  • oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cyclomatic 24) apps/desktop/src/lib/database/oracleIndexes.ts:263 — oracleIndexes.mergeOracleIndexDraftsAfterRefresh has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elasticsearchCompletion.inspectJsonBody (cyclomatic 24) · ×1
  • elasticsearchCompletion.inspectJsonBody (cyclomatic 24) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:461 — elasticsearchCompletion.inspectJsonBody has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mqConsoleDefaults.resolveAvailableMqTabs (cyclomatic 24) · ×1
  • mqConsoleDefaults.resolveAvailableMqTabs (cyclomatic 24) apps/desktop/src/lib/mq/mqConsoleDefaults.ts:184 — mqConsoleDefaults.resolveAvailableMqTabs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultBatchInsert.batchResultInsertRequest (cyclomatic 24) · ×1
  • queryResultBatchInsert.batchResultInsertRequest (cyclomatic 24) apps/desktop/src/lib/query/queryResultBatchInsert.ts:8 — queryResultBatchInsert.batchResultInsertRequest has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.synchronizeOracleRoutineSelection (cyclomatic 24) · ×1
  • oracleRoutineDeploy.synchronizeOracleRoutineSelection (cyclomatic 24) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:94 — oracleRoutineDeploy.synchronizeOracleRoutineSelection has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarLayoutMonitor.detectLayoutAnomalies (cyclomatic 24) · ×1
  • sidebarLayoutMonitor.detectLayoutAnomalies (cyclomatic 24) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:443 — sidebarLayoutMonitor.detectLayoutAnomalies has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · model.parseRowSourcesAtDepth (cyclomatic 24) · ×1
  • model.parseRowSourcesAtDepth (cyclomatic 24) apps/desktop/src/lib/sql/semantic/model.ts:705 — model.parseRowSourcesAtDepth has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.analyzeSelectStructureForDisplay (cyclomatic 24) · ×1
  • sqlAnalysis.analyzeSelectStructureForDisplay (cyclomatic 24) apps/desktop/src/lib/sql/sqlAnalysis.ts:333 — sqlAnalysis.analyzeSelectStructureForDisplay has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.maskSqlLiteralsAndComments (cyclomatic 24) · ×1
  • sqlCompletion.maskSqlLiteralsAndComments (cyclomatic 24) apps/desktop/src/lib/sql/sqlCompletion.ts:3972 — sqlCompletion.maskSqlLiteralsAndComments has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.buildForeignKeyRelatedTableItems (cyclomatic 24) · ×1
  • sqlCompletion.buildForeignKeyRelatedTableItems (cyclomatic 24) apps/desktop/src/lib/sql/sqlCompletion.ts:5014 — sqlCompletion.buildForeignKeyRelatedTableItems has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlVariables.replaceReferences (cyclomatic 24) · ×1
  • sqlVariables.replaceReferences (cyclomatic 24) apps/desktop/src/lib/sql/sqlVariables.ts:245 — sqlVariables.replaceReferences has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · objectRenameSql.supportsObjectRename (cyclomatic 24) · ×1
  • objectRenameSql.supportsObjectRename (cyclomatic 24) apps/desktop/src/lib/table/objectRenameSql.ts:19 — objectRenameSql.supportsObjectRename has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTableRename.readOnlyReconcile (cyclomatic 24) · ×1
  • oracleTableRename.readOnlyReconcile (cyclomatic 24) REDACTED:794 — oracleTableRename.readOnlyReconcile has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTypeManagement.stepSatisfied (cyclomatic 24) · ×1
  • oracleTypeManagement.stepSatisfied (cyclomatic 24) apps/desktop/src/lib/table/oracleTypeManagement.ts:449 — oracleTypeManagement.stepSatisfied has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · oracleTypeDataMapping.executeOracleTypeDataInsert (cyclomatic 24) · ×1
  • oracleTypeDataMapping.executeOracleTypeDataInsert (cyclomatic 24) apps/desktop/src/lib/table/oracleTypeDataMapping.ts:82 — oracleTypeDataMapping.executeOracleTypeDataInsert has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.setChildren (cyclomatic 24) · ×1
  • connectionStore.useConnectionStore.setChildren (cyclomatic 24) apps/desktop/src/stores/connectionStore.ts:2110 — connectionStore.useConnectionStore.setChildren has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.disconnect (cyclomatic 24) · ×1
  • connectionStore.useConnectionStore.disconnect (cyclomatic 24) apps/desktop/src/stores/connectionStore.ts:5464 — connectionStore.useConnectionStore.disconnect has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.migrateTimeoutInheritance (cyclomatic 24) · ×1
  • connectionStore.useConnectionStore.migrateTimeoutInheritance (cyclomatic 24) apps/desktop/src/stores/connectionStore.ts:10541 — connectionStore.useConnectionStore.migrateTimeoutInheritance has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to one function item inside it that branches (resolveInheritance). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · settingsStore.useSettingsStore.initEditorSettings (cyclomatic 24) · ×1
  • settingsStore.useSettingsStore.initEditorSettings (cyclomatic 24) apps/desktop/src/stores/settingsStore.ts:2584 — settingsStore.useSettingsStore.initEditorSettings has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TdengineDriver · ×1
  • TdengineDriver::completion_assistant_search (cyclomatic 23) agents/drivers/tdengine/src/driver.rs:251 — TdengineDriver::completion_assistant_search has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlServerBatchSplitter · ×1
  • SqlServerBatchSplitter::push_line (cyclomatic 23) REDACTED:2146 — SqlServerBatchSplitter::push_line has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SnippetSyncClient · ×1
  • SnippetSyncClient::put_snapshot_with_expected_remote_hash (cyclomatic 23) crates/dbx-core/src/persistence/cloud_sync.rs:2051 — SnippetSyncClient::put_snapshot_with_expected_remote_hash has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextEncoding · ×1
  • TextEncoding::encode_copy_text (cyclomatic 23) crates/dbx-driver-postgres/src/text_encoding.rs:149 — TextEncoding::encode_copy_text has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.handleRequest (cyclomatic 23) · ×1
  • DbxJdbcPlugin.handleRequest (cyclomatic 23) REDACTED:693 — DbxJdbcPlugin.handleRequest has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.stripCommentsAndLiterals (cyclomatic 23) · ×1
  • DbxJdbcPlugin.stripCommentsAndLiterals (cyclomatic 23) REDACTED:2738 — DbxJdbcPlugin.stripCommentsAndLiterals has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCondition.evaluate (cyclomatic 23) · ×1
  • PlDebugCondition.evaluate (cyclomatic 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCondition.java:33 — PlDebugCondition.evaluate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTemporalJson.copy (cyclomatic 23) · ×1
  • PlDebugTemporalJson.copy (cyclomatic 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:132 — PlDebugTemporalJson.copy has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FirebirdObjectSource.read (cyclomatic 23) · ×1
  • FirebirdObjectSource.read (cyclomatic 23) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdObjectSource.java:12 — FirebirdObjectSource.read has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EwkbWktDecoder.geometryToWkt (cyclomatic 23) · ×1
  • EwkbWktDecoder.geometryToWkt (cyclomatic 23) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:489 — EwkbWktDecoder.geometryToWkt has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.scanSqlServerControlFlow (cyclomatic 23) · ×1
  • sqlStatementRanges.scanSqlServerControlFlow (cyclomatic 23) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1004 — sqlStatementRanges.scanSqlServerControlFlow has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cyclomatic 23) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cyclomatic 23) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1513 — useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferDdl.sqlServerDescriptionParameters (cyclomatic 23) · ×1
  • queryResultTransferDdl.sqlServerDescriptionParameters (cyclomatic 23) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:203 — queryResultTransferDdl.sqlServerDescriptionParameters has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cyclomatic 23) · ×1
  • useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cyclomatic 23) apps/desktop/src/composables/useDataGridExtractor.ts:499 — useDataGridExtractor.useDataGridExtractor.copyWithExtractor has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridSearch.useDataGridSearch (cyclomatic 23) · ×1
  • useDataGridSearch.useDataGridSearch (cyclomatic 23) apps/desktop/src/composables/useDataGridSearch.ts:41 — useDataGridSearch.useDataGridSearch has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 122, 162). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDialogSources.useDialogSources (cyclomatic 23) · ×1
  • useDialogSources.useDialogSources (cyclomatic 23) apps/desktop/src/composables/useDialogSources.ts:151 — useDialogSources.useDialogSources has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 20 function literals inside it that branch (lines 255, 162, 179, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ai.buildSystemPrompt (cyclomatic 23) · ×1
  • ai.buildSystemPrompt (cyclomatic 23) apps/desktop/src/lib/ai/ai.ts:396 — ai.buildSystemPrompt has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aiGenerationStatus.applyStatusEvent (cyclomatic 23) · ×1
  • aiGenerationStatus.applyStatusEvent (cyclomatic 23) apps/desktop/src/lib/ai/aiGenerationStatus.ts:102 — aiGenerationStatus.applyStatusEvent has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aiIntentRouter.routeByRulesUnchecked (cyclomatic 23) · ×1
  • aiIntentRouter.routeByRulesUnchecked (cyclomatic 23) apps/desktop/src/lib/ai/aiIntentRouter.ts:220 — aiIntentRouter.routeByRulesUnchecked has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · documentStoreProvider.rewriteUnsafeIntegerTokens (cyclomatic 23) · ×1
  • documentStoreProvider.rewriteUnsafeIntegerTokens (cyclomatic 23) apps/desktop/src/lib/app/documentStoreProvider.ts:772 — documentStoreProvider.rewriteUnsafeIntegerTokens has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cyclomatic 23) · ×1
  • databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cyclomatic 23) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:168 — databaseAuthorizationPlan.buildCreateUserAuthorizationPlan has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cyclomatic 23) · ×1
  • oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cyclomatic 23) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:268 — oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cyclomatic 23) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cyclomatic 23) apps/desktop/src/lib/database/oracleForeignKeys.ts:515 — oracleForeignKeys.prepareOracleForeignKeyCreatePlan has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shortcutRegistry.normalizeShortcutSettings (cyclomatic 23) · ×1
  • shortcutRegistry.normalizeShortcutSettings (cyclomatic 23) apps/desktop/src/lib/editor/shortcutRegistry.ts:873 — shortcutRegistry.normalizeShortcutSettings has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 876, 917, 932). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · tableMetadataCache.loadTableMetadata (cyclomatic 23) · ×1
  • tableMetadataCache.loadTableMetadata (cyclomatic 23) apps/desktop/src/lib/metadata/tableMetadataCache.ts:361 — tableMetadataCache.loadTableMetadata has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoCompletion.classifyFilter (cyclomatic 23) · ×1
  • mongoCompletion.classifyFilter (cyclomatic 23) REDACTED:1218 — mongoCompletion.classifyFilter has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoShellCommand.parseMongoCommand (cyclomatic 23) · ×1
  • mongoShellCommand.parseMongoCommand (cyclomatic 23) REDACTED:1041 — mongoShellCommand.parseMongoCommand has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 1053, 1057, 1061, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Parser.parsePredicate (cyclomatic 23) · ×1
  • Parser.parsePredicate (cyclomatic 23) apps/desktop/src/lib/mongo/mongoSql.ts:350 — Parser.parsePredicate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryCursorOffsetPagination.executeCursorOffsetPage (cyclomatic 23) · ×1
  • queryCursorOffsetPagination.executeCursorOffsetPage (cyclomatic 23) apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:4 — queryCursorOffsetPagination.executeCursorOffsetPage has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisKeyTree.sortRedisTreeLevelCooperatively (cyclomatic 23) · ×1
  • redisKeyTree.sortRedisTreeLevelCooperatively (cyclomatic 23) apps/desktop/src/lib/redis/redisKeyTree.ts:212 — redisKeyTree.sortRedisTreeLevelCooperatively has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · editorSettingsDraft.normalizedDraftValue (cyclomatic 23) · ×1
  • editorSettingsDraft.normalizedDraftValue (cyclomatic 23) apps/desktop/src/lib/settings/editorSettingsDraft.ts:209 — editorSettingsDraft.normalizedDraftValue has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CypherPrinter.format (cyclomatic 23) · ×1
  • CypherPrinter.format (cyclomatic 23) apps/desktop/src/lib/sql/cypherFormatter.ts:369 — CypherPrinter.format has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlDisplay.findCreateTableBody (cyclomatic 23) · ×1
  • ddlDisplay.findCreateTableBody (cyclomatic 23) apps/desktop/src/lib/sql/ddlDisplay.ts:393 — ddlDisplay.findCreateTableBody has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · insertValueHints.parseInsertClause (cyclomatic 23) · ×1
  • insertValueHints.parseInsertClause (cyclomatic 23) apps/desktop/src/lib/sql/insertValueHints.ts:295 — insertValueHints.parseInsertClause has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · completion.sqlSemanticSelectStarIsOnlyProjection (cyclomatic 23) · ×1
  • completion.sqlSemanticSelectStarIsOnlyProjection (cyclomatic 23) apps/desktop/src/lib/sql/semantic/completion.ts:77 — completion.sqlSemanticSelectStarIsOnlyProjection has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · model.parseCteSources (cyclomatic 23) · ×1
  • model.parseCteSources (cyclomatic 23) apps/desktop/src/lib/sql/semantic/model.ts:400 — model.parseCteSources has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.containsTopLevelAggregate (cyclomatic 23) · ×1
  • sqlAnalysis.containsTopLevelAggregate (cyclomatic 23) apps/desktop/src/lib/sql/sqlAnalysis.ts:833 — sqlAnalysis.containsTopLevelAggregate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.currentSqlLikeLineBlockSpan (cyclomatic 23) · ×1
  • sqlCompletion.currentSqlLikeLineBlockSpan (cyclomatic 23) apps/desktop/src/lib/sql/sqlCompletion.ts:2615 — sqlCompletion.currentSqlLikeLineBlockSpan has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.parseTrailingIdentifierPart (cyclomatic 23) · ×1
  • sqlCompletion.parseTrailingIdentifierPart (cyclomatic 23) apps/desktop/src/lib/sql/sqlCompletion.ts:3364 — sqlCompletion.parseTrailingIdentifierPart has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildJoinConditionItemsForPair (cyclomatic 23) · ×1
  • sqlCompletion.buildJoinConditionItemsForPair (cyclomatic 23) apps/desktop/src/lib/sql/sqlCompletion.ts:6242 — sqlCompletion.buildJoinConditionItemsForPair has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.isPostgresQuestionMarkOperator (cyclomatic 23) · ×1
  • sqlParameters.isPostgresQuestionMarkOperator (cyclomatic 23) apps/desktop/src/lib/sql/sqlParameters.ts:827 — sqlParameters.isPostgresQuestionMarkOperator has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlServerHostPort.parseSqlServerHostPort (cyclomatic 23) · ×1
  • sqlServerHostPort.parseSqlServerHostPort (cyclomatic 23) apps/desktop/src/lib/sqlserver/sqlServerHostPort.ts:7 — sqlServerHostPort.parseSqlServerHostPort has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineParameters.tokenizeXuguRoutineDefinition (cyclomatic 23) · ×1
  • routineParameters.tokenizeXuguRoutineDefinition (cyclomatic 23) apps/desktop/src/lib/table/routineParameters.ts:248 — routineParameters.tokenizeXuguRoutineDefinition has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableSelectSql.sqlCteVisibilities (cyclomatic 23) · ×1
  • tableSelectSql.sqlCteVisibilities (cyclomatic 23) apps/desktop/src/lib/table/tableSelectSql.ts:330 — tableSelectSql.sqlCteVisibilities has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableSelectSql.requiresIdentifierQuote (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tabPresentation.tabModeLabel (cyclomatic 23) · ×1
  • tabPresentation.tabModeLabel (cyclomatic 23) apps/desktop/src/lib/tabs/tabPresentation.ts:771 — tabPresentation.tabModeLabel has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.invalidateMetadataCachesForNode (cyclomatic 23) · ×1
  • connectionStore.useConnectionStore.invalidateMetadataCachesForNode (cyclomatic 23) apps/desktop/src/stores/connectionStore.ts:2744 — connectionStore.useConnectionStore.invalidateMetadataCachesForNode has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTableGroups (cyclomatic 23) · ×1
  • connectionStore.useConnectionStore.loadTableGroups (cyclomatic 23) apps/desktop/src/stores/connectionStore.ts:8127 — connectionStore.useConnectionStore.loadTableGroups has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadTriggers (cyclomatic 23) · ×1
  • connectionStore.useConnectionStore.loadTriggers (cyclomatic 23) apps/desktop/src/stores/connectionStore.ts:8428 — connectionStore.useConnectionStore.loadTriggers has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 8451). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.decodeVariable (cyclomatic 23) · ×1
  • plDebugStore.decodeVariable (cyclomatic 23) apps/desktop/src/stores/plDebugStore.ts:2153 — plDebugStore.decodeVariable has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.applyRestoredOpenTabs (cyclomatic 23) · ×1
  • queryStore.useQueryStore.applyRestoredOpenTabs (cyclomatic 23) apps/desktop/src/stores/queryStore.ts:2759 — queryStore.useQueryStore.applyRestoredOpenTabs has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.revalidateObjectSourceTab (cyclomatic 23) · ×1
  • queryStore.useQueryStore.revalidateObjectSourceTab (cyclomatic 23) apps/desktop/src/stores/queryStore.ts:3361 — queryStore.useQueryStore.revalidateObjectSourceTab has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.ensureManualTransactionSession (cyclomatic 23) · ×1
  • queryStore.useQueryStore.ensureManualTransactionSession (cyclomatic 23) apps/desktop/src/stores/queryStore.ts:6126 — queryStore.useQueryStore.ensureManualTransactionSession has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 6154, 6163, 6167). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cyclomatic 23) · ×1
  • savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cyclomatic 23) apps/desktop/src/stores/savedSqlStore.ts:700 — savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LandingSelect.LandingSelect (cyclomatic 23) · ×1
  • LandingSelect.LandingSelect (cyclomatic 23) docs/components/landing/LandingSelect.tsx:18 — LandingSelect.LandingSelect has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (toggle, onListKeyDown, onButtonKeyDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · agentBundle.assembleCustomBundle (cyclomatic 23) · ×1
  • agentBundle.assembleCustomBundle (cyclomatic 23) docs/lib/agentBundle.ts:469 — agentBundle.assembleCustomBundle has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 506, a function literal at line 535, reportDownload). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Resolver · ×1
  • Resolver::call (cyclomatic 22) crates/dbx-core/src/schema/oracle_routines/references.rs:363 — Resolver::call has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentRuntimeClient · ×1
  • AgentRuntimeClient::call_typed_with_policy (cyclomatic 22) crates/dbx-driver-agent/src/agent_driver.rs:232 — AgentRuntimeClient::call_typed_with_policy has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AgentMethod::as_str (cyclomatic 46) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dbx_plugin_cli · ×1
  • dbx_plugin_cli::dev::build_config (cyclomatic 22) plugins/sdk/cli/src/dev.rs:52 — dbx_plugin_cli::dev::build_config has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.getExplainInfo (cyclomatic 22) · ×1
  • DbxJdbcPlugin.getExplainInfo (cyclomatic 22) REDACTED:2233 — DbxJdbcPlugin.getExplainInfo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Writer.composite (cyclomatic 22) · ×1
  • Writer.composite (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:321 — Writer.composite has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSource.load (cyclomatic 22) · ×1
  • PlDebugSource.load (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:64 — PlDebugSource.load has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.constructorLobProfile (cyclomatic 22) · ×1
  • PlDebugTarget.constructorLobProfile (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:144 — PlDebugTarget.constructorLobProfile has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.decodeZoned (cyclomatic 22) · ×1
  • PlDebugTarget.decodeZoned (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1211 — PlDebugTarget.decodeZoned has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Loader.ddlSource (cyclomatic 22) · ×1
  • Loader.ddlSource (cyclomatic 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:223 — Loader.ddlSource has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KafkaAgent.brokerEndpoints (cyclomatic 22) · ×1
  • KafkaAgent.brokerEndpoints (cyclomatic 22) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:432 — KafkaAgent.brokerEndpoints has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sqlStatementRanges.statementRangeAtCursor (cyclomatic 22) · ×1
  • sqlStatementRanges.statementRangeAtCursor (cyclomatic 22) apps/desktop/src/lib/sql/sqlStatementRanges.ts:761 — sqlStatementRanges.statementRangeAtCursor has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.escapedTextLiteral (cyclomatic 22) · ×1
  • queryResultTransferValues.escapedTextLiteral (cyclomatic 22) apps/desktop/src/components/transfer/queryResultTransferValues.ts:272 — queryResultTransferValues.escapedTextLiteral has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridCellDetail.useDataGridCellDetail (cyclomatic 22) · ×1
  • useDataGridCellDetail.useDataGridCellDetail (cyclomatic 22) apps/desktop/src/composables/useDataGridCellDetail.ts:9 — useDataGridCellDetail.useDataGridCellDetail has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 38, 67, 30, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportSql (cyclomatic 22) · ×1
  • useDataGridExport.useDataGridExport.exportSql (cyclomatic 22) apps/desktop/src/composables/useDataGridExport.ts:2620 — useDataGridExport.useDataGridExport.exportSql has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 2623, 2626). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useQuickOpen.matchQuickOpenText (cyclomatic 22) · ×1
  • useQuickOpen.matchQuickOpenText (cyclomatic 22) apps/desktop/src/composables/useQuickOpen.ts:198 — useQuickOpen.matchQuickOpenText has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · documentStoreProvider.translateFieldFilterToElasticsearchQuery (cyclomatic 22) · ×1
  • documentStoreProvider.translateFieldFilterToElasticsearchQuery (cyclomatic 22) apps/desktop/src/lib/app/documentStoreProvider.ts:1047 — documentStoreProvider.translateFieldFilterToElasticsearchQuery has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridCellCoercion.coerceDataGridCellValue (cyclomatic 22) · ×1
  • dataGridCellCoercion.coerceDataGridCellValue (cyclomatic 22) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:25 — dataGridCellCoercion.coerceDataGridCellValue has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geometryMapPreview.buildGeometryMapFeatureCollection (cyclomatic 22) · ×1
  • geometryMapPreview.buildGeometryMapFeatureCollection (cyclomatic 22) apps/desktop/src/lib/dataGrid/geometryMapPreview.ts:44 — geometryMapPreview.buildGeometryMapFeatureCollection has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.parseAtom (cyclomatic 22) · ×1
  • regexGenerate.parseAtom (cyclomatic 22) REDACTED:240 — regexGenerate.parseAtom has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.prepareUniqueTargetIndex (cyclomatic 22) · ×1
  • oracleConstraints.prepareUniqueTargetIndex (cyclomatic 22) apps/desktop/src/lib/database/oracleConstraints.ts:496 — oracleConstraints.prepareUniqueTargetIndex has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleTriggerPlan.verifyBinding (cyclomatic 22) · ×1
  • oracleTriggerPlan.verifyBinding (cyclomatic 22) apps/desktop/src/lib/database/oracleTriggerPlan.ts:642 — oracleTriggerPlan.verifyBinding has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cyclomatic 22) · ×1
  • codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cyclomatic 22) apps/desktop/src/lib/editor/codemirrorTrimmedSelectionLayer.ts:193 — codemirrorTrimmedSelectionLayer.trimmedSelectionLayer has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · keyboardShortcuts.matchesModifierOnlyShortcut (cyclomatic 22) · ×1
  • keyboardShortcuts.matchesModifierOnlyShortcut (cyclomatic 22) apps/desktop/src/lib/editor/keyboardShortcuts.ts:128 — keyboardShortcuts.matchesModifierOnlyShortcut has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · vimImeGuard.createVimImeGuard (cyclomatic 22) · ×1
  • vimImeGuard.createVimImeGuard (cyclomatic 22) apps/desktop/src/lib/editor/vimImeGuard.ts:37 — vimImeGuard.createVimImeGuard has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 48, 74). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoCompletion.classifyMethodOptions (cyclomatic 22) · ×1
  • mongoCompletion.classifyMethodOptions (cyclomatic 22) REDACTED:1416 — mongoCompletion.classifyMethodOptions has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoDocumentValues.parseMongoDocumentInputValue (cyclomatic 22) · ×1
  • mongoDocumentValues.parseMongoDocumentInputValue (cyclomatic 22) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:151 — mongoDocumentValues.parseMongoDocumentInputValue has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoShellCommand.parseMongoFindCommand (cyclomatic 22) · ×1
  • mongoShellCommand.parseMongoFindCommand (cyclomatic 22) REDACTED:378 — mongoShellCommand.parseMongoFindCommand has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarRemoteSearch.collectSidebarRemoteSearchResults (cyclomatic 22) · ×1
  • sidebarRemoteSearch.collectSidebarRemoteSearchResults (cyclomatic 22) apps/desktop/src/lib/sidebar/sidebarRemoteSearch.ts:15 — sidebarRemoteSearch.collectSidebarRemoteSearchResults has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function items inside it that branch (visit, a function literal at line 30, publish, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · sidebarTreeLabel.sidebarTreeDisplayLabel (cyclomatic 22) · ×1
  • sidebarTreeLabel.sidebarTreeDisplayLabel (cyclomatic 22) apps/desktop/src/lib/sidebar/sidebarTreeLabel.ts:8 — sidebarTreeLabel.sidebarTreeDisplayLabel has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · diagnostics.buildSqlSemanticDiagnostics (cyclomatic 22) · ×1
  • diagnostics.buildSqlSemanticDiagnostics (cyclomatic 22) apps/desktop/src/lib/sql/semantic/diagnostics.ts:268 — diagnostics.buildSqlSemanticDiagnostics has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabUiState.sanitizeValue (cyclomatic 22) · ×1
  • tabUiState.sanitizeValue (cyclomatic 22) apps/desktop/src/lib/tabs/tabUiState.ts:72 — tabUiState.sanitizeValue has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadSchemas (cyclomatic 22) · ×1
  • connectionStore.useConnectionStore.loadSchemas (cyclomatic 22) apps/desktop/src/stores/connectionStore.ts:6816 — connectionStore.useConnectionStore.loadSchemas has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 6825, 6868). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.refreshStack (cyclomatic 22) · ×1
  • plDebugStore.usePlDebugStore.refreshStack (cyclomatic 22) apps/desktop/src/stores/plDebugStore.ts:1599 — plDebugStore.usePlDebugStore.refreshStack has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore (cyclomatic 22) · ×1
  • queryStore.useQueryStore (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:1166 — queryStore.useQueryStore has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 4768, 1214, 10784, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openTableStructure (cyclomatic 22) · ×1
  • queryStore.useQueryStore.openTableStructure (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:4686 — queryStore.useQueryStore.openTableStructure has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cyclomatic 22) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cyclomatic 22) apps/desktop/src/stores/queryStore.ts:10536 — queryStore.useQueryStore.captureResultLegacyValuesForExport.read has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync-connection-types.loadConnectionProfiles (cyclomatic 22) · ×1
  • sync-connection-types.loadConnectionProfiles (cyclomatic 22) scripts/sync-connection-types.mjs:166 — sync-connection-types.loadConnectionProfiles has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RuntimeConfig · ×1
  • RuntimeConfig::from_environment_and_args (cyclomatic 21) crates/dbx-mcp/src/runtime.rs:43 — RuntimeConfig::from_environment_and_args has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dbx_plugin_packager · ×1
  • dbx_plugin_packager::run_package_cli (cyclomatic 21) plugins/sdk/packager/src/main.rs:80 — dbx_plugin_packager::run_package_cli has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NativeLegacyJobSession.<init> (cyclomatic 21) · ×1
  • NativeLegacyJobSession.<init> (cyclomatic 21) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:50 — NativeLegacyJobSession.<init> has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TranswarpAgent.getColumns (cyclomatic 21) · ×1
  • TranswarpAgent.getColumns (cyclomatic 21) REDACTED:200 — TranswarpAgent.getColumns has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OceanBaseLobValues.read (cyclomatic 21) · ×1
  • OceanBaseLobValues.read (cyclomatic 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:170 — OceanBaseLobValues.read has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlDebugCapabilities.probe (cyclomatic 21) · ×1
  • PlDebugCapabilities.probe (cyclomatic 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCapabilities.java:21 — PlDebugCapabilities.probe has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DamengAgent.queryConstrainedTables (cyclomatic 21) · ×1
  • DamengAgent.queryConstrainedTables (cyclomatic 21) REDACTED:592 — DamengAgent.queryConstrainedTables has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TrackedPhysicalConnection.<init> (cyclomatic 21) · ×1
  • TrackedPhysicalConnection.<init> (cyclomatic 21) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1917 — TrackedPhysicalConnection.<init> has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ci-gradle.acquire_and_run (cyclomatic 21) · ×1
  • ci-gradle.acquire_and_run (cyclomatic 21) .github/scripts/ci-gradle.py:122 — ci-gradle.acquire_and_run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlStorage.oracleStorageClauseEnd (cyclomatic 21) · ×1
  • ddlStorage.oracleStorageClauseEnd (cyclomatic 21) apps/desktop/src/lib/sql/ddlStorage.ts:173 — ddlStorage.oracleStorageClauseEnd has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cyclomatic 21) · ×1
  • queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cyclomatic 21) apps/desktop/src/components/editor/queryEditorHoverContent.ts:20 — queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useAppUpdater.useAppUpdater.performInstall (cyclomatic 21) · ×1
  • useAppUpdater.useAppUpdater.performInstall (cyclomatic 21) apps/desktop/src/composables/useAppUpdater.ts:395 — useAppUpdater.useAppUpdater.performInstall has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExtractor.useDataGridExtractor.extractorCellValue (cyclomatic 21) · ×1
  • useDataGridExtractor.useDataGridExtractor.extractorCellValue (cyclomatic 21) apps/desktop/src/composables/useDataGridExtractor.ts:142 — useDataGridExtractor.useDataGridExtractor.extractorCellValue has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cyclomatic 21) · ×1
  • useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cyclomatic 21) apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:654 — useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cyclomatic 21) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cyclomatic 21) REDACTED:291 — scheduledDatabaseBackup.normalizeDatabaseBackupSchedule has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionConfigTransfer.prepareConnectionConfigImport (cyclomatic 21) · ×1
  • connectionConfigTransfer.prepareConnectionConfigImport (cyclomatic 21) apps/desktop/src/lib/connection/connectionConfigTransfer.ts:209 — connectionConfigTransfer.prepareConnectionConfigImport has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · largeValueSnapshot.readLargeValueSnapshot (cyclomatic 21) · ×1
  • largeValueSnapshot.readLargeValueSnapshot (cyclomatic 21) apps/desktop/src/lib/dataGrid/largeValueSnapshot.ts:31 — largeValueSnapshot.readLargeValueSnapshot has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.gen (cyclomatic 21) · ×1
  • regexGenerate.gen (cyclomatic 21) REDACTED:361 — regexGenerate.gen has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cyclomatic 21) · ×1
  • databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cyclomatic 21) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:125 — databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cyclomatic 21) · ×1
  • databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cyclomatic 21) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:440 — databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nativeJobs.damengChildChanges (cyclomatic 21) · ×1
  • nativeJobs.damengChildChanges (cyclomatic 21) apps/desktop/src/lib/database/nativeJobs.ts:365 — nativeJobs.damengChildChanges has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleConstraints.validateChange (cyclomatic 21) · ×1
  • oracleConstraints.validateChange (cyclomatic 21) apps/desktop/src/lib/database/oracleConstraints.ts:405 — oracleConstraints.validateChange has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.validateOracleForeignKeyReference (cyclomatic 21) · ×1
  • oracleForeignKeys.validateOracleForeignKeyReference (cyclomatic 21) apps/desktop/src/lib/database/oracleForeignKeys.ts:427 — oracleForeignKeys.validateOracleForeignKeyReference has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleIndexes.loadedColumnType (cyclomatic 21) · ×1
  • oracleIndexes.loadedColumnType (cyclomatic 21) apps/desktop/src/lib/database/oracleIndexes.ts:104 — oracleIndexes.loadedColumnType has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguExplainPlan.parseXuguExplainText (cyclomatic 21) · ×1
  • xuguExplainPlan.parseXuguExplainText (cyclomatic 21) REDACTED:20 — xuguExplainPlan.parseXuguExplainText has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · explainPlan.parseOracleExplainText (cyclomatic 21) · ×1
  • explainPlan.parseOracleExplainText (cyclomatic 21) apps/desktop/src/lib/diagram/explainPlan.ts:175 — explainPlan.parseOracleExplainText has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · explainPlan.parseDamengPlanLine (cyclomatic 21) · ×1
  • explainPlan.parseDamengPlanLine (cyclomatic 21) apps/desktop/src/lib/diagram/explainPlan.ts:312 — explainPlan.parseDamengPlanLine has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · explainPlan.buildDamengTree (cyclomatic 21) · ×1
  • explainPlan.buildDamengTree (cyclomatic 21) apps/desktop/src/lib/diagram/explainPlan.ts:730 — explainPlan.buildDamengTree has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hoverTableSql.parseColumnLine (cyclomatic 21) · ×1
  • hoverTableSql.parseColumnLine (cyclomatic 21) apps/desktop/src/lib/editor/hoverTableSql.ts:549 — hoverTableSql.parseColumnLine has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeydown (cyclomatic 21) · ×1
  • modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeydown (cyclomatic 21) apps/desktop/src/lib/editor/modifierDoubleTapShortcut.ts:51 — modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeydown has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeyup (cyclomatic 21) · ×1
  • modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeyup (cyclomatic 21) apps/desktop/src/lib/editor/modifierDoubleTapShortcut.ts:68 — modifierDoubleTapShortcut.createModifierDoubleTapShortcutController.handleKeyup has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · schemaTreeCache.decodeTableSearchIndexManifest (cyclomatic 21) · ×1
  • schemaTreeCache.decodeTableSearchIndexManifest (cyclomatic 21) apps/desktop/src/lib/metadata/schemaTreeCache.ts:37 — schemaTreeCache.decodeTableSearchIndexManifest has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 42, 50). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoCompletion.collectScopeVariables (cyclomatic 21) · ×1
  • mongoCompletion.collectScopeVariables (cyclomatic 21) REDACTED:1109 — mongoCompletion.collectScopeVariables has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoConnectionOptions.mongodbAuthFailureHint (cyclomatic 21) · ×1
  • mongoConnectionOptions.mongodbAuthFailureHint (cyclomatic 21) apps/desktop/src/lib/mongo/mongoConnectionOptions.ts:85 — mongoConnectionOptions.mongodbAuthFailureHint has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pluginShortcuts.collectPluginShortcuts (cyclomatic 21) · ×1
  • pluginShortcuts.collectPluginShortcuts (cyclomatic 21) apps/desktop/src/lib/plugins/pluginShortcuts.ts:64 — pluginShortcuts.collectPluginShortcuts has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · javaSerialized.normalizeJavaSerializedValue (cyclomatic 21) · ×1
  • javaSerialized.normalizeJavaSerializedValue (cyclomatic 21) apps/desktop/src/lib/redis/codec/javaSerialized.ts:392 — javaSerialized.normalizeJavaSerializedValue has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · redisCommandTokenizer.tokenizeRedisLine (cyclomatic 21) · ×1
  • redisCommandTokenizer.tokenizeRedisLine (cyclomatic 21) apps/desktop/src/lib/redis/redisCommandTokenizer.ts:28 — redisCommandTokenizer.tokenizeRedisLine has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.executeOracleRoutineDeployment (cyclomatic 21) · ×1
  • oracleRoutineDeploy.executeOracleRoutineDeployment (cyclomatic 21) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:670 — oracleRoutineDeploy.executeOracleRoutineDeployment has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 679). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: oracleRoutineDeploy.oraclePackageTransferPendingReady (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · settingsTransfer.isSqlShortcutActionItem (cyclomatic 21) · ×1
  • settingsTransfer.isSqlShortcutActionItem (cyclomatic 21) apps/desktop/src/lib/settings/settingsTransfer.ts:507 — settingsTransfer.isSqlShortcutActionItem has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarMenuLayout.sidebarMenuActionGroup (cyclomatic 21) · ×1
  • sidebarMenuLayout.sidebarMenuActionGroup (cyclomatic 21) apps/desktop/src/lib/sidebar/sidebarMenuLayout.ts:132 — sidebarMenuLayout.sidebarMenuActionGroup has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · treeNodeClick.treeNodeRowAction (cyclomatic 21) · ×1
  • treeNodeClick.treeNodeRowAction (cyclomatic 21) apps/desktop/src/lib/sidebar/treeNodeClick.ts:168 — treeNodeClick.treeNodeRowAction has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · treeNodeClick.copyDisplayPathForTreeNode (cyclomatic 21) · ×1
  • treeNodeClick.copyDisplayPathForTreeNode (cyclomatic 21) apps/desktop/src/lib/sidebar/treeNodeClick.ts:239 — treeNodeClick.copyDisplayPathForTreeNode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlServerQueryWrapping.topLevelSqlTokens (cyclomatic 21) · ×1
  • sqlServerQueryWrapping.topLevelSqlTokens (cyclomatic 21) apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts:32 — sqlServerQueryWrapping.topLevelSqlTokens has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · sqlSourcePaste.unescapeLiteralContent (cyclomatic 21) · ×1
  • sqlSourcePaste.unescapeLiteralContent (cyclomatic 21) apps/desktop/src/lib/sql/sqlSourcePaste.ts:99 — sqlSourcePaste.unescapeLiteralContent has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · sqlSourcePaste.readStringLiteral (cyclomatic 21) · ×1
  • sqlSourcePaste.readStringLiteral (cyclomatic 21) apps/desktop/src/lib/sql/sqlSourcePaste.ts:224 — sqlSourcePaste.readStringLiteral has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cyclomatic 21) · ×1
  • connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cyclomatic 21) apps/desktop/src/stores/connectionStore.ts:5076 — connectionStore.useConnectionStore.reloadConnectionDatabaseChildren has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.normalizeGroups (cyclomatic 21) · ×1
  • queryStore.useQueryStore.normalizeGroups (cyclomatic 21) apps/desktop/src/stores/queryStore.ts:1329 — queryStore.useQueryStore.normalizeGroups has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settingsStore.inferAiProviderFromConfig (cyclomatic 21) · ×1
  • settingsStore.inferAiProviderFromConfig (cyclomatic 21) apps/desktop/src/stores/settingsStore.ts:764 — settingsStore.inferAiProviderFromConfig has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · start (cyclomatic 21) · ×1
  • start (cyclomatic 21) plugins/sdk/dev-host/sidecar.mjs:99 — start has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 157, 144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Nb3Archive · ×1
  • Nb3Archive::restore_steps (cyclomatic 20) REDACTED:481 — Nb3Archive::restore_steps has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RetainedResults · ×1
  • RetainedResults::manifest (cyclomatic 20) crates/dbx-core/src/query/pl_debug/results.rs:89 — RetainedResults::manifest has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_driver_support · ×1
  • dbx_driver_support::ssh_config::apply_host_entry (cyclomatic 20) crates/dbx-driver-support/src/ssh_config.rs:198 — dbx_driver_support::ssh_config::apply_host_entry has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExpressionCompiler · ×1
  • ExpressionCompiler::field_condition (cyclomatic 20) crates/dbx-drivers/src/db/dynamodb_driver.rs:218 — ExpressionCompiler::field_condition has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ScalarType · ×1
  • ScalarType::read (cyclomatic 20) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:254 — ScalarType::read has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OceanBaseLobValues.preview (cyclomatic 20) · ×1
  • OceanBaseLobValues.preview (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:65 — OceanBaseLobValues.preview has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.getColumnsInContext (cyclomatic 20) · ×1
  • OceanBaseOracleAgent.getColumnsInContext (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1607 — OceanBaseOracleAgent.getColumnsInContext has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugNative.stackResult (cyclomatic 20) · ×1
  • PlDebugNative.stackResult (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:236 — PlDebugNative.stackResult has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.start (cyclomatic 20) · ×1
  • PlDebugSession.start (cyclomatic 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:279 — PlDebugSession.start has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MongoAgent.parseDropIndexesValue (cyclomatic 20) · ×1
  • MongoAgent.parseDropIndexesValue (cyclomatic 20) REDACTED:1703 — MongoAgent.parseDropIndexesValue has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KafkaAgent.applySecurityProperties (cyclomatic 20) · ×1
  • KafkaAgent.applySecurityProperties (cyclomatic 20) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:522 — KafkaAgent.applySecurityProperties has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DamengAgent.getExplainInfo (cyclomatic 20) · ×1
  • DamengAgent.getExplainInfo (cyclomatic 20) REDACTED:3544 — DamengAgent.getExplainInfo has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cyclomatic 20) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cyclomatic 20) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:518 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cyclomatic 20) · ×1
  • useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cyclomatic 20) apps/desktop/src/composables/useDataGridEditor.ts:2039 — useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cyclomatic 20) · ×1
  • useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cyclomatic 20) apps/desktop/src/composables/useDataGridEditor.ts:2337 — useDataGridEditor.useDataGridEditor.executeConditionalUpdate has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.captureSqlInsertExportData (cyclomatic 20) · ×1
  • useDataGridExport.useDataGridExport.captureSqlInsertExportData (cyclomatic 20) apps/desktop/src/composables/useDataGridExport.ts:2800 — useDataGridExport.useDataGridExport.captureSqlInsertExportData has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · aiPluginConversation.createPluginAiConversation (cyclomatic 20) · ×1
  • aiPluginConversation.createPluginAiConversation (cyclomatic 20) apps/desktop/src/lib/ai/aiPluginConversation.ts:27 — aiPluginConversation.createPluginAiConversation has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionUrl.parseZooKeeperUrl (cyclomatic 20) · ×1
  • connectionUrl.parseZooKeeperUrl (cyclomatic 20) REDACTED:239 — connectionUrl.parseZooKeeperUrl has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridColumnHighlight.computeColumnHighlightMatchKeys (cyclomatic 20) · ×1
  • dataGridColumnHighlight.computeColumnHighlightMatchKeys (cyclomatic 20) apps/desktop/src/lib/dataGrid/dataGridColumnHighlight.ts:91 — dataGridColumnHighlight.computeColumnHighlightMatchKeys has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnVisibility.areCellValuesEqual (cyclomatic 20) · ×1
  • dataGridColumnVisibility.areCellValuesEqual (cyclomatic 20) apps/desktop/src/lib/dataGrid/dataGridColumnVisibility.ts:154 — dataGridColumnVisibility.areCellValuesEqual has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geometryPreview.drawGroups (cyclomatic 20) · ×1
  • geometryPreview.drawGroups (cyclomatic 20) apps/desktop/src/lib/dataGrid/geometryPreview.ts:135 — geometryPreview.drawGroups has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · gridClientFilter.matchesResultClientFilter (cyclomatic 20) · ×1
  • gridClientFilter.matchesResultClientFilter (cyclomatic 20) apps/desktop/src/lib/dataGrid/gridClientFilter.ts:72 — gridClientFilter.matchesResultClientFilter has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.executeTriggerSequence · ×1
  • oracleTriggerPlan.executeTriggerSequence::run (cyclomatic 20) apps/desktop/src/lib/database/oracleTriggerPlan.ts:516 — oracleTriggerPlan.executeTriggerSequence::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · erDiagram.buildDiagramJoinSql (cyclomatic 20) · ×1
  • erDiagram.buildDiagramJoinSql (cyclomatic 20) apps/desktop/src/lib/diagram/erDiagram.ts:371 — erDiagram.buildDiagramJoinSql has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · keyboardShortcuts.matchesShortcut (cyclomatic 20) · ×1
  • keyboardShortcuts.matchesShortcut (cyclomatic 20) apps/desktop/src/lib/editor/keyboardShortcuts.ts:142 — keyboardShortcuts.matchesShortcut has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · diagramSvgExport.buildTableDiagramSvg (cyclomatic 20) · ×1
  • diagramSvgExport.buildTableDiagramSvg (cyclomatic 20) apps/desktop/src/lib/export/diagramSvgExport.ts:218 — diagramSvgExport.buildTableDiagramSvg has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.mergeFragments (cyclomatic 20) · ×1
  • datagripImport.mergeFragments (cyclomatic 20) REDACTED:508 — datagripImport.mergeFragments has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · objectMetadataCache.loadObjectMetadataFacetInternal (cyclomatic 20) · ×1
  • objectMetadataCache.loadObjectMetadataFacetInternal (cyclomatic 20) apps/desktop/src/lib/metadata/objectMetadataCache.ts:140 — objectMetadataCache.loadObjectMetadataFacetInternal has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableMetadataCache.loadTableColumns (cyclomatic 20) · ×1
  • tableMetadataCache.loadTableColumns (cyclomatic 20) apps/desktop/src/lib/metadata/tableMetadataCache.ts:218 — tableMetadataCache.loadTableColumns has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoDocumentValues.formatMongoShellLiteral (cyclomatic 20) · ×1
  • mongoDocumentValues.formatMongoShellLiteral (cyclomatic 20) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:684 — mongoDocumentValues.formatMongoShellLiteral has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · neo4jNodeResult.projectNeo4jNodeResult (cyclomatic 20) · ×1
  • neo4jNodeResult.projectNeo4jNodeResult (cyclomatic 20) apps/desktop/src/lib/neo4j/neo4jNodeResult.ts:62 — neo4jNodeResult.projectNeo4jNodeResult has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dynamicContextMenu.parseEntry (cyclomatic 20) · ×1
  • dynamicContextMenu.parseEntry (cyclomatic 20) apps/desktop/src/lib/plugins/dynamicContextMenu.ts:34 — dynamicContextMenu.parseEntry has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pluginUiHtmlCache.inlineLocalUiAssets (cyclomatic 20) · ×1
  • pluginUiHtmlCache.inlineLocalUiAssets (cyclomatic 20) apps/desktop/src/lib/plugins/pluginUiHtmlCache.ts:88 — pluginUiHtmlCache.inlineLocalUiAssets has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · batchQueryPagination.prepareBatchQueryPagination (cyclomatic 20) · ×1
  • batchQueryPagination.prepareBatchQueryPagination (cyclomatic 20) apps/desktop/src/lib/query/batchQueryPagination.ts:11 — batchQueryPagination.prepareBatchQueryPagination has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 58). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sqlAnalysis.parseTableSourceAt (cyclomatic 20) · ×1
  • sqlAnalysis.parseTableSourceAt (cyclomatic 20) apps/desktop/src/lib/sql/sqlAnalysis.ts:694 — sqlAnalysis.parseTableSourceAt has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlAnalysis.stripSqlComments (cyclomatic 20) · ×1
  • sqlAnalysis.stripSqlComments (cyclomatic 20) apps/desktop/src/lib/sql/sqlAnalysis.ts:878 — sqlAnalysis.stripSqlComments has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.maskSqlForStructureScan (cyclomatic 20) · ×1
  • sqlCompletion.maskSqlForStructureScan (cyclomatic 20) apps/desktop/src/lib/sql/sqlCompletion.ts:2562 — sqlCompletion.maskSqlForStructureScan has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.extractSelectColumnNames (cyclomatic 20) · ×1
  • sqlCompletion.extractSelectColumnNames (cyclomatic 20) apps/desktop/src/lib/sql/sqlCompletion.ts:4400 — sqlCompletion.extractSelectColumnNames has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.buildCompositeHeuristicJoinConditionItems (cyclomatic 20) · ×1
  • sqlCompletion.buildCompositeHeuristicJoinConditionItems (cyclomatic 20) apps/desktop/src/lib/sql/sqlCompletion.ts:6326 — sqlCompletion.buildCompositeHeuristicJoinConditionItems has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlNavigation.matchSqlObject (cyclomatic 20) · ×1
  • sqlNavigation.matchSqlObject (cyclomatic 20) apps/desktop/src/lib/sql/sqlNavigation.ts:729 — sqlNavigation.matchSqlObject has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlVariables.collectDeclarations (cyclomatic 20) · ×1
  • sqlVariables.collectDeclarations (cyclomatic 20) apps/desktop/src/lib/sql/sqlVariables.ts:67 — sqlVariables.collectDeclarations has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · columnDefaultPresets.starRocksDefaultPresets (cyclomatic 20) · ×1
  • columnDefaultPresets.starRocksDefaultPresets (cyclomatic 20) apps/desktop/src/lib/table/columnDefaultPresets.ts:29 — columnDefaultPresets.starRocksDefaultPresets has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleTableRename.maskTriggerCommentsAndStrings (cyclomatic 20) · ×1
  • oracleTableRename.maskTriggerCommentsAndStrings (cyclomatic 20) REDACTED:196 — oracleTableRename.maskTriggerCommentsAndStrings has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · routineParameters.parseXuguRoutineParameter (cyclomatic 20) · ×1
  • routineParameters.parseXuguRoutineParameter (cyclomatic 20) apps/desktop/src/lib/table/routineParameters.ts:353 — routineParameters.parseXuguRoutineParameter has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tabPresentation.resultRunSourceLabel (cyclomatic 20) · ×1
  • tabPresentation.resultRunSourceLabel (cyclomatic 20) apps/desktop/src/lib/tabs/tabPresentation.ts:626 — tabPresentation.resultRunSourceLabel has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cyclomatic 20) · ×1
  • connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cyclomatic 20) apps/desktop/src/stores/connectionStore.ts:4723 — connectionStore.useConnectionStore.updateConnectionDatabaseInfo has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.refreshSidebarObjectPagination · ×1
  • connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes (cyclomatic 20) apps/desktop/src/stores/connectionStore.ts:10853 — connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.setBreakpointEnabled (cyclomatic 20) · ×1
  • plDebugStore.usePlDebugStore.setBreakpointEnabled (cyclomatic 20) apps/desktop/src/stores/plDebugStore.ts:1195 — plDebugStore.usePlDebugStore.setBreakpointEnabled has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.annotateQueryResultSources (cyclomatic 20) · ×1
  • queryStore.annotateQueryResultSources (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:546 — queryStore.annotateQueryResultSources has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openPluginWorkbench (cyclomatic 20) · ×1
  • queryStore.useQueryStore.openPluginWorkbench (cyclomatic 20) apps/desktop/src/stores/queryStore.ts:4453 — queryStore.useQueryStore.openPluginWorkbench has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.reorderFolders (cyclomatic 20) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFolders (cyclomatic 20) apps/desktop/src/stores/savedSqlStore.ts:955 — savedSqlStore.useSavedSqlStore.reorderFolders has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 982, 978, 964). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.moveFolderToFolder (cyclomatic 20) · ×1
  • savedSqlStore.useSavedSqlStore.moveFolderToFolder (cyclomatic 20) apps/desktop/src/stores/savedSqlStore.ts:1001 — savedSqlStore.useSavedSqlStore.moveFolderToFolder has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1016, 1010, 1011). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.moveFolderToFolder (cyclomatic 20) · ×1
  • transferTaskStore.useTransferTaskStore.moveFolderToFolder (cyclomatic 20) apps/desktop/src/stores/transferTaskStore.ts:400 — transferTaskStore.useTransferTaskStore.moveFolderToFolder has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 418, 409, 413). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.reorderFolders (cyclomatic 20) · ×1
  • transferTaskStore.useTransferTaskStore.reorderFolders (cyclomatic 20) apps/desktop/src/stores/transferTaskStore.ts:422 — transferTaskStore.useTransferTaskStore.reorderFolders has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 445, 441, 431). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RouteProgress.RouteProgress (cyclomatic 20) · ×1
  • RouteProgress.RouteProgress (cyclomatic 20) docs/components/RouteProgress.tsx:11 — RouteProgress.RouteProgress has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 74, 65, 17, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ContributorsExperience.ContributorsExperience (cyclomatic 20) · ×1
  • ContributorsExperience.ContributorsExperience (cyclomatic 20) docs/components/contributors/ContributorsExperience.tsx:190 — ContributorsExperience.ContributorsExperience has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · json.hasUnclosedMongoDelimiters (cyclomatic 20) · ×1
  • json.hasUnclosedMongoDelimiters (cyclomatic 20) packages/mongo-shell/src/json.ts:306 — json.hasUnclosedMongoDelimiters has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuckDbWorkerRuntime · ×1
  • DuckDbWorkerRuntime::handle_request (cyclomatic 19) agents/drivers/duckdb/src/runtime.rs:295 — DuckDbWorkerRuntime::handle_request has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.registerDrivers (cyclomatic 19) · ×1
  • DbxJdbcPlugin.registerDrivers (cyclomatic 19) REDACTED:1105 — DbxJdbcPlugin.registerDrivers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OceanBaseOracleAgent.listConstraints (cyclomatic 19) · ×1
  • OceanBaseOracleAgent.listConstraints (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2198 — OceanBaseOracleAgent.listConstraints has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleForeignKeyDefinition.read (cyclomatic 19) · ×1
  • OracleForeignKeyDefinition.read (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OracleForeignKeyDefinition.java:21 — OracleForeignKeyDefinition.read has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.objectValue (cyclomatic 19) · ×1
  • PlDebugCompositeInput.objectValue (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:180 — PlDebugCompositeInput.objectValue has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.requireInputAdapter (cyclomatic 19) · ×1
  • PlDebugCompositeInput.requireInputAdapter (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:70 — PlDebugCompositeInput.requireInputAdapter has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Writer.child (cyclomatic 19) · ×1
  • Writer.child (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:392 — Writer.child has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugManager.mutate (cyclomatic 19) · ×1
  • PlDebugManager.mutate (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:227 — PlDebugManager.mutate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.select (cyclomatic 19) · ×1
  • PlDebugObjectConstructors.select (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:98 — PlDebugObjectConstructors.select has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.evaluateBreakpointRules (cyclomatic 19) · ×1
  • PlDebugSession.evaluateBreakpointRules (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1262 — PlDebugSession.evaluateBreakpointRules has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.rawInput (cyclomatic 19) · ×1
  • PlDebugTarget.rawInput (cyclomatic 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1055 — PlDebugTarget.rawInput has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PlDebugTypeMetadata.resolveObjectOwner (cyclomatic 19) · ×1
  • PlDebugTypeMetadata.resolveObjectOwner (cyclomatic 19) REDACTED:37 — PlDebugTypeMetadata.resolveObjectOwner has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MongoAgent.bulkWriteModel (cyclomatic 19) · ×1
  • MongoAgent.bulkWriteModel (cyclomatic 19) REDACTED:2275 — MongoAgent.bulkWriteModel has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KafkaAgent.peekMessages (cyclomatic 19) · ×1
  • KafkaAgent.peekMessages (cyclomatic 19) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1663 — KafkaAgent.peekMessages has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · BlobBoundStatement.validate (cyclomatic 19) · ×1
  • BlobBoundStatement.validate (cyclomatic 19) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:20 — BlobBoundStatement.validate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EwkbWktDecoder.tryParseHex (cyclomatic 19) · ×1
  • EwkbWktDecoder.tryParseHex (cyclomatic 19) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:238 — EwkbWktDecoder.tryParseHex has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StandardJdbcMetadata.getColumns (cyclomatic 19) · ×1
  • StandardJdbcMetadata.getColumns (cyclomatic 19) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:213 — StandardJdbcMetadata.getColumns has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-partition-ddl.main (cyclomatic 19) · ×1
  • verify-partition-ddl.main (cyclomatic 19) agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts:10 — verify-partition-ddl.main has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cyclomatic 19) · ×1
  • useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cyclomatic 19) apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts:532 — useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cyclomatic 19) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cyclomatic 19) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:609 — useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cyclomatic 19) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cyclomatic 19) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1139 — useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataCompareConfig.sanitizeConfig (cyclomatic 19) · ×1
  • useDataCompareConfig.sanitizeConfig (cyclomatic 19) apps/desktop/src/composables/useDataCompareConfig.ts:67 — useDataCompareConfig.sanitizeConfig has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.stageCellReplacements (cyclomatic 19) · ×1
  • useDataGridEditor.useDataGridEditor.stageCellReplacements (cyclomatic 19) apps/desktop/src/composables/useDataGridEditor.ts:1322 — useDataGridEditor.useDataGridEditor.stageCellReplacements has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cyclomatic 19) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cyclomatic 19) apps/desktop/src/composables/useDataGridLargeValues.ts:694 — useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useQuickOpen.useQuickOpen.remoteSearchContexts (cyclomatic 19) · ×1
  • useQuickOpen.useQuickOpen.remoteSearchContexts (cyclomatic 19) apps/desktop/src/composables/useQuickOpen.ts:833 — useQuickOpen.useQuickOpen.remoteSearchContexts has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decodeText.decodeImportFileText (cyclomatic 19) · ×1
  • decodeText.decodeImportFileText (cyclomatic 19) apps/desktop/src/lib/common/decodeText.ts:11 — decodeText.decodeImportFileText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · columnFormatter.normalizeForeignKeyDisplayFilter (cyclomatic 19) · ×1
  • columnFormatter.normalizeForeignKeyDisplayFilter (cyclomatic 19) apps/desktop/src/lib/dataGrid/columnFormatter.ts:308 — columnFormatter.normalizeForeignKeyDisplayFilter has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dataGridColumnFilter.unwrapOuterParentheses (cyclomatic 19) · ×1
  • dataGridColumnFilter.unwrapOuterParentheses (cyclomatic 19) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:85 — dataGridColumnFilter.unwrapOuterParentheses has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cyclomatic 19) · ×1
  • dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cyclomatic 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:120 — dataGridColumnWidthState.loadPersistentDataGridColumnWidthState has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridColumnWidthState.saveDataGridColumnWidthState (cyclomatic 19) · ×1
  • dataGridColumnWidthState.saveDataGridColumnWidthState (cyclomatic 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:257 — dataGridColumnWidthState.saveDataGridColumnWidthState has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · regexGenerate.parseClass (cyclomatic 19) · ×1
  • regexGenerate.parseClass (cyclomatic 19) REDACTED:190 — regexGenerate.parseClass has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleSessionDiagnostics.collectOracleSessionDiagnostics (cyclomatic 19) · ×1
  • oracleSessionDiagnostics.collectOracleSessionDiagnostics (cyclomatic 19) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:270 — oracleSessionDiagnostics.collectOracleSessionDiagnostics has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codemirrorSqlDialect.codeMirrorBaseDialect (cyclomatic 19) · ×1
  • codemirrorSqlDialect.codeMirrorBaseDialect (cyclomatic 19) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:352 — codemirrorSqlDialect.codeMirrorBaseDialect has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · keyboardShortcuts.eventToShortcut (cyclomatic 19) · ×1
  • keyboardShortcuts.eventToShortcut (cyclomatic 19) apps/desktop/src/lib/editor/keyboardShortcuts.ts:94 — keyboardShortcuts.eventToShortcut has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · databaseExportOptions.loadSavedDatabaseExportOptions (cyclomatic 19) · ×1
  • databaseExportOptions.loadSavedDatabaseExportOptions (cyclomatic 19) apps/desktop/src/lib/export/databaseExportOptions.ts:36 — databaseExportOptions.loadSavedDatabaseExportOptions has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · datagripImport.extractUserName (cyclomatic 19) · ×1
  • datagripImport.extractUserName (cyclomatic 19) REDACTED:335 — datagripImport.extractUserName has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.parseDbForestGroupPaths (cyclomatic 19) · ×1
  • datagripImport.parseDbForestGroupPaths (cyclomatic 19) REDACTED:455 — datagripImport.parseDbForestGroupPaths has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.buildConnection (cyclomatic 19) · ×1
  • datagripImport.buildConnection (cyclomatic 19) REDACTED:554 — datagripImport.buildConnection has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mongoCompletion.classifyJsonSchema (cyclomatic 19) · ×1
  • mongoCompletion.classifyJsonSchema (cyclomatic 19) REDACTED:1285 — mongoCompletion.classifyJsonSchema has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoCompletion.classifyUpdate (cyclomatic 19) · ×1
  • mongoCompletion.classifyUpdate (cyclomatic 19) REDACTED:1315 — mongoCompletion.classifyUpdate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoSql.comparisonToFilter (cyclomatic 19) · ×1
  • mongoSql.comparisonToFilter (cyclomatic 19) apps/desktop/src/lib/mongo/mongoSql.ts:1023 — mongoSql.comparisonToFilter has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginHostBridge.postInit (cyclomatic 19) · ×1
  • PluginHostBridge.postInit (cyclomatic 19) REDACTED:495 — PluginHostBridge.postInit has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pluginShortcuts.normalizePluginShortcutSettings (cyclomatic 19) · ×1
  • pluginShortcuts.normalizePluginShortcutSettings (cyclomatic 19) apps/desktop/src/lib/plugins/pluginShortcuts.ts:15 — pluginShortcuts.normalizePluginShortcutSettings has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RedisCollectionSearchController.scan (cyclomatic 19) · ×1
  • RedisCollectionSearchController.scan (cyclomatic 19) apps/desktop/src/lib/redis/redisCollectionSearchController.ts:178 — RedisCollectionSearchController.scan has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandDocs.commandKeySpecs (cyclomatic 19) · ×1
  • redisCommandDocs.commandKeySpecs (cyclomatic 19) apps/desktop/src/lib/redis/redisCommandDocs.ts:126 — redisCommandDocs.commandKeySpecs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandPreview.redisDeleteKeysPreview (cyclomatic 19) · ×1
  • redisCommandPreview.redisDeleteKeysPreview (cyclomatic 19) apps/desktop/src/lib/redis/redisCommandPreview.ts:248 — redisCommandPreview.redisDeleteKeysPreview has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCompletion.argumentTokenItems (cyclomatic 19) · ×1
  • redisCompletion.argumentTokenItems (cyclomatic 19) apps/desktop/src/lib/redis/redisCompletion.ts:389 — redisCompletion.argumentTokenItems has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.editOraclePackageOptions (cyclomatic 19) · ×1
  • oracleRoutineDeploy.editOraclePackageOptions (cyclomatic 19) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:186 — oracleRoutineDeploy.editOraclePackageOptions has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: oracleRoutineDeploy.oraclePackageTransferPendingReady (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoCollectionMutation.buildMongoCreateIndexRequest (cyclomatic 19) · ×1
  • mongoCollectionMutation.buildMongoCreateIndexRequest (cyclomatic 19) apps/desktop/src/lib/sidebar/mongoCollectionMutation.ts:160 — mongoCollectionMutation.buildMongoCreateIndexRequest has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes · ×1
  • sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit (cyclomatic 19) apps/desktop/src/lib/sidebar/sidebarGlobalSearchIndex.ts:41 — sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cypherFormatter.compressCypherText (cyclomatic 19) · ×1
  • cypherFormatter.compressCypherText (cyclomatic 19) apps/desktop/src/lib/sql/cypherFormatter.ts:524 — cypherFormatter.compressCypherText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddlDisplay.applyDdlDatabaseQualifier (cyclomatic 19) · ×1
  • ddlDisplay.applyDdlDatabaseQualifier (cyclomatic 19) apps/desktop/src/lib/sql/ddlDisplay.ts:347 — ddlDisplay.applyDdlDatabaseQualifier has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · identifierSearch.identifierMatchScore (cyclomatic 19) · ×1
  • identifierSearch.identifierMatchScore (cyclomatic 19) apps/desktop/src/lib/sql/identifierSearch.ts:7 — identifierSearch.identifierMatchScore has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ddl.createTableLayout (cyclomatic 19) · ×1
  • ddl.createTableLayout (cyclomatic 19) apps/desktop/src/lib/sql/layout/ddl.ts:86 — ddl.createTableLayout has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 111, 100, 106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · printer.printStatement (cyclomatic 19) · ×1
  • printer.printStatement (cyclomatic 19) apps/desktop/src/lib/sql/layout/printer.ts:638 — printer.printStatement has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cyclomatic 19) · ×1
  • mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cyclomatic 19) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:138 — mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cteNavigation.findCteColumnResolution (cyclomatic 19) · ×1
  • cteNavigation.findCteColumnResolution (cyclomatic 19) apps/desktop/src/lib/sql/semantic/cteNavigation.ts:118 — cteNavigation.findCteColumnResolution has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.findTopLevelKeyword (cyclomatic 19) · ×1
  • sqlAnalysis.findTopLevelKeyword (cyclomatic 19) apps/desktop/src/lib/sql/sqlAnalysis.ts:981 — sqlAnalysis.findTopLevelKeyword has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.splitQualifiedNameRawParts (cyclomatic 19) · ×1
  • sqlCompletion.splitQualifiedNameRawParts (cyclomatic 19) apps/desktop/src/lib/sql/sqlCompletion.ts:4667 — sqlCompletion.splitQualifiedNameRawParts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.computeMatchScore (cyclomatic 19) · ×1
  • sqlCompletion.computeMatchScore (cyclomatic 19) apps/desktop/src/lib/sql/sqlCompletion.ts:6794 — sqlCompletion.computeMatchScore has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectSetStatementVariables (cyclomatic 19) · ×1
  • sqlParameters.collectSetStatementVariables (cyclomatic 19) apps/desktop/src/lib/sql/sqlParameters.ts:1438 — sqlParameters.collectSetStatementVariables has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sqlParameters.collectExecNamedArgumentStarts) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · sqlParameters.collectExecNamedArgumentStarts (cyclomatic 19) · ×1
  • sqlParameters.collectExecNamedArgumentStarts (cyclomatic 19) apps/desktop/src/lib/sql/sqlParameters.ts:1592 — sqlParameters.collectExecNamedArgumentStarts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sqlParameters.collectSetStatementVariables) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · oracleRoutineRename.prepareOracleRoutineRename · ×1
  • oracleRoutineRename.prepareOracleRoutineRename::walk (cyclomatic 19) apps/desktop/src/lib/table/oracleRoutineRename.ts:292 — oracleRoutineRename.prepareOracleRoutineRename::walk has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · oracleTableRename.verifyFinalSnapshots (cyclomatic 19) · ×1
  • oracleTableRename.verifyFinalSnapshots (cyclomatic 19) REDACTED:759 — oracleTableRename.verifyFinalSnapshots has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableVGroup.reorderTableVGroupEntry (cyclomatic 19) · ×1
  • tableVGroup.reorderTableVGroupEntry (cyclomatic 19) apps/desktop/src/lib/table/tableVGroup.ts:278 — tableVGroup.reorderTableVGroupEntry has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (insertNear, removeEntry, entryId). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: tableVGroup.tableVGroupKindOfContainerNode (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cyclomatic 19) · ×1
  • connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cyclomatic 19) apps/desktop/src/stores/connectionStore.ts:3657 — connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 3682, findPath). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.loadObjectSourceIntoTab (cyclomatic 19) · ×1
  • queryStore.useQueryStore.loadObjectSourceIntoTab (cyclomatic 19) apps/desktop/src/stores/queryStore.ts:3495 — queryStore.useQueryStore.loadObjectSourceIntoTab has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.captureTabResultForExport (cyclomatic 19) · ×1
  • queryStore.useQueryStore.captureTabResultForExport (cyclomatic 19) apps/desktop/src/stores/queryStore.ts:10944 — queryStore.useQueryStore.captureTabResultForExport has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.reorderFiles (cyclomatic 19) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFiles (cyclomatic 19) apps/desktop/src/stores/savedSqlStore.ts:1086 — savedSqlStore.useSavedSqlStore.reorderFiles has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1111, 1109, 1092). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.reorderTasks (cyclomatic 19) · ×1
  • transferTaskStore.useTransferTaskStore.reorderTasks (cyclomatic 19) apps/desktop/src/stores/transferTaskStore.ts:449 — transferTaskStore.useTransferTaskStore.reorderTasks has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 467, 465, 455). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · worker.handleInstallBeacon (cyclomatic 19) · ×1
  • worker.handleInstallBeacon (cyclomatic 19) deploy/plugin-stats-worker/worker.ts:349 — worker.handleInstallBeacon has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InstallTabs.InstallTabs (cyclomatic 19) · ×1
  • InstallTabs.InstallTabs (cyclomatic 19) docs/components/landing/InstallTabs.tsx:231 — InstallTabs.InstallTabs has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 324, 241, 250, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · diagnostics.redact · ×1
  • diagnostics.redact::visit (cyclomatic 19) plugins/sdk/dev-host/diagnostics.mjs:9 — diagnostics.redact::visit has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · outline · ×1
  • outline::walk (cyclomatic 19) REDACTED:66 — outline::walk has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bringIntoView (cyclomatic 19) · ×1
  • bringIntoView (cyclomatic 19) REDACTED:398 — bringIntoView has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 401, 434). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Plan · ×1
  • Plan::after_tables (cyclomatic 18) crates/dbx-core/src/data/transfer/xugu_objects.rs:653 — Plan::after_tables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · McpGlobalPolicy · ×1
  • McpGlobalPolicy::normalized (cyclomatic 18) REDACTED:792 — McpGlobalPolicy::normalized has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugRegistry · ×1
  • PlDebugRegistry::register (cyclomatic 18) crates/dbx-core/src/query/pl_debug.rs:594 — PlDebugRegistry::register has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.listSchemas (cyclomatic 18) · ×1
  • DbxJdbcPlugin.listSchemas (cyclomatic 18) REDACTED:2980 — DbxJdbcPlugin.listSchemas has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PlDebugManager.start (cyclomatic 18) · ×1
  • PlDebugManager.start (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:104 — PlDebugManager.start has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugObjectConstructors.callables (cyclomatic 18) · ×1
  • PlDebugObjectConstructors.callables (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:27 — PlDebugObjectConstructors.callables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSession.recoverOutput (cyclomatic 18) · ×1
  • PlDebugSession.recoverOutput (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1925 — PlDebugSession.recoverOutput has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.zonedInput (cyclomatic 18) · ×1
  • PlDebugTarget.zonedInput (cyclomatic 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1115 — PlDebugTarget.zonedInput has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MongoAgent.collationOrNull (cyclomatic 18) · ×1
  • MongoAgent.collationOrNull (cyclomatic 18) REDACTED:1119 — MongoAgent.collationOrNull has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KafkaAgent.getConsumerGroupSnapshot (cyclomatic 18) · ×1
  • KafkaAgent.getConsumerGroupSnapshot (cyclomatic 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1254 — KafkaAgent.getConsumerGroupSnapshot has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KafkaAgent.listConsumerGroups (cyclomatic 18) · ×1
  • KafkaAgent.listConsumerGroups (cyclomatic 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1094 — KafkaAgent.listConsumerGroups has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: KafkaAgent.dispatch (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · H2DriverVersion.select (cyclomatic 18) · ×1
  • H2DriverVersion.select (cyclomatic 18) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2DriverVersion.java:41 — H2DriverVersion.select has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DamengAgent.queryConstrainedObjectsWithoutValidity (cyclomatic 18) · ×1
  • DamengAgent.queryConstrainedObjectsWithoutValidity (cyclomatic 18) REDACTED:1269 — DamengAgent.queryConstrainedObjectsWithoutValidity has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · JsonRpcServer.legacyJob (cyclomatic 18) · ×1
  • JsonRpcServer.legacyJob (cyclomatic 18) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:668 — JsonRpcServer.legacyJob has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NativeLegacyJobSession.prepare (cyclomatic 18) · ×1
  • NativeLegacyJobSession.prepare (cyclomatic 18) agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:78 — NativeLegacyJobSession.prepare has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.binaryLiteral (cyclomatic 18) · ×1
  • queryResultTransferValues.binaryLiteral (cyclomatic 18) apps/desktop/src/components/transfer/queryResultTransferValues.ts:330 — queryResultTransferValues.binaryLiteral has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGenerateSession.runDataGenerateSession (cyclomatic 18) · ×1
  • useDataGenerateSession.runDataGenerateSession (cyclomatic 18) apps/desktop/src/composables/useDataGenerateSession.ts:265 — useDataGenerateSession.runDataGenerateSession has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cyclomatic 18) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cyclomatic 18) REDACTED:666 — useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.applyDeleteRows (cyclomatic 18) · ×1
  • useDataGridEditor.useDataGridEditor.applyDeleteRows (cyclomatic 18) apps/desktop/src/composables/useDataGridEditor.ts:1726 — useDataGridEditor.useDataGridEditor.applyDeleteRows has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.savePendingSnapshot (cyclomatic 18) · ×1
  • useDataGridEditor.useDataGridEditor.savePendingSnapshot (cyclomatic 18) apps/desktop/src/composables/useDataGridEditor.ts:2820 — useDataGridEditor.useDataGridEditor.savePendingSnapshot has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.captureFullResultProjection (cyclomatic 18) · ×1
  • useDataGridExport.useDataGridExport.captureFullResultProjection (cyclomatic 18) apps/desktop/src/composables/useDataGridExport.ts:563 — useDataGridExport.useDataGridExport.captureFullResultProjection has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 573, 582, 566, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useNativeJobExecution.useNativeJobExecution.prepare (cyclomatic 18) · ×1
  • useNativeJobExecution.useNativeJobExecution.prepare (cyclomatic 18) apps/desktop/src/composables/useNativeJobExecution.ts:78 — useNativeJobExecution.useNativeJobExecution.prepare has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cyclomatic 18) · ×1
  • useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cyclomatic 18) apps/desktop/src/composables/useSidebarTableMutationRuntime.ts:459 — useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cyclomatic 18) · ×1
  • useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cyclomatic 18) apps/desktop/src/composables/useSnippetAutoUpload.ts:40 — useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupRun (cyclomatic 18) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupRun (cyclomatic 18) REDACTED:380 — scheduledDatabaseBackup.normalizeDatabaseBackupRun has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · safeJsonFormat.decodeJsonSource (cyclomatic 18) · ×1
  • safeJsonFormat.decodeJsonSource (cyclomatic 18) apps/desktop/src/lib/common/safeJsonFormat.ts:127 — safeJsonFormat.decodeJsonSource has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentDriverInstallHint.agentDriverInstallKey (cyclomatic 18) · ×1
  • agentDriverInstallHint.agentDriverInstallKey (cyclomatic 18) apps/desktop/src/lib/connection/agentDriverInstallHint.ts:35 — agentDriverInstallHint.agentDriverInstallKey has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · jdbcDialect.connectionObjectTreeNodeSchema (cyclomatic 18) · ×1
  • jdbcDialect.connectionObjectTreeNodeSchema (cyclomatic 18) apps/desktop/src/lib/database/jdbcDialect.ts:385 — jdbcDialect.connectionObjectTreeNodeSchema has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cyclomatic 18) · ×1
  • oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cyclomatic 18) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:125 — oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguUserPermissions.decodeXuguAuthority (cyclomatic 18) · ×1
  • xuguUserPermissions.decodeXuguAuthority (cyclomatic 18) apps/desktop/src/lib/database/xuguUserPermissions.ts:476 — xuguUserPermissions.decodeXuguAuthority has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ltr-auto-layout.orderTablesByConnectivity (cyclomatic 18) · ×1
  • ltr-auto-layout.orderTablesByConnectivity (cyclomatic 18) apps/desktop/src/lib/diagram/ltr-auto-layout.ts:40 — ltr-auto-layout.orderTablesByConnectivity has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseExport.runDatabaseExportUntilTerminal (cyclomatic 18) · ×1
  • databaseExport.runDatabaseExportUntilTerminal (cyclomatic 18) apps/desktop/src/lib/export/databaseExport.ts:133 — databaseExport.runDatabaseExportUntilTerminal has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphCompletionScope.projections (cyclomatic 18) · ×1
  • graphCompletionScope.projections (cyclomatic 18) apps/desktop/src/lib/graph/graphCompletionScope.ts:17 — graphCompletionScope.projections has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (add, a function literal at line 24). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · historyRestoreTarget.canReuseTabForHistoryRestore (cyclomatic 18) · ×1
  • historyRestoreTarget.canReuseTabForHistoryRestore (cyclomatic 18) apps/desktop/src/lib/history/historyRestoreTarget.ts:60 — historyRestoreTarget.canReuseTabForHistoryRestore has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · redisDesktopManagerImport.connection (cyclomatic 18) · ×1
  • redisDesktopManagerImport.connection (cyclomatic 18) apps/desktop/src/lib/imports/redisDesktopManagerImport.ts:42 — redisDesktopManagerImport.connection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · kvValueFormat.detectKvValueFormat (cyclomatic 18) · ×1
  • kvValueFormat.detectKvValueFormat (cyclomatic 18) apps/desktop/src/lib/kv/kvValueFormat.ts:17 — kvValueFormat.detectKvValueFormat has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoCommentAwareBodyEnd (cyclomatic 18) · ×1
  • mongoShellCommand.mongoCommentAwareBodyEnd (cyclomatic 18) REDACTED:1675 — mongoShellCommand.mongoCommentAwareBodyEnd has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoSyntaxDiagnostics.describeMongoWriteRisk (cyclomatic 18) · ×1
  • mongoSyntaxDiagnostics.describeMongoWriteRisk (cyclomatic 18) apps/desktop/src/lib/mongo/mongoSyntaxDiagnostics.ts:81 — mongoSyntaxDiagnostics.describeMongoWriteRisk has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · nacosConfigValidation.closeImplicitHtmlTags (cyclomatic 18) · ×1
  • nacosConfigValidation.closeImplicitHtmlTags (cyclomatic 18) REDACTED:95 — nacosConfigValidation.closeImplicitHtmlTags has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · redisCommandDocs.mapEntries (cyclomatic 18) · ×1
  • redisCommandDocs.mapEntries (cyclomatic 18) apps/desktop/src/lib/redis/redisCommandDocs.ts:37 — redisCommandDocs.mapEntries has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · redisCommandDocs.commandArguments (cyclomatic 18) · ×1
  • redisCommandDocs.commandArguments (cyclomatic 18) apps/desktop/src/lib/redis/redisCommandDocs.ts:97 — redisCommandDocs.commandArguments has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cyclomatic 18) · ×1
  • schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cyclomatic 18) apps/desktop/src/lib/schema/schemaDiffTableMapping.ts:47 — schemaDiffTableMapping.reconcileSchemaDiffTableMappings has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cyclomatic 18) · ×1
  • sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cyclomatic 18) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:742 — sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ddlDisplay.findColumnAttributePositions (cyclomatic 18) · ×1
  • ddlDisplay.findColumnAttributePositions (cyclomatic 18) apps/desktop/src/lib/sql/ddlDisplay.ts:427 — ddlDisplay.findColumnAttributePositions has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · errorPosition.resolveSqlErrorOffset (cyclomatic 18) · ×1
  • errorPosition.resolveSqlErrorOffset (cyclomatic 18) apps/desktop/src/lib/sql/errorPosition.ts:156 — errorPosition.resolveSqlErrorOffset has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.isStandaloneSelectWildcard (cyclomatic 18) · ×1
  • sqlCompletion.isStandaloneSelectWildcard (cyclomatic 18) apps/desktop/src/lib/sql/sqlCompletion.ts:1818 — sqlCompletion.isStandaloneSelectWildcard has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sqlCompletion.splitRoutineSignatureParameters (cyclomatic 18) · ×1
  • sqlCompletion.splitRoutineSignatureParameters (cyclomatic 18) apps/desktop/src/lib/sql/sqlCompletion.ts:5166 — sqlCompletion.splitRoutineSignatureParameters has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.findMatchingXmlTagClose (cyclomatic 18) · ×1
  • sqlParameters.findMatchingXmlTagClose (cyclomatic 18) apps/desktop/src/lib/sql/sqlParameters.ts:761 — sqlParameters.findMatchingXmlTagClose has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectDeclareStatementVariables (cyclomatic 18) · ×1
  • sqlParameters.collectDeclareStatementVariables (cyclomatic 18) apps/desktop/src/lib/sql/sqlParameters.ts:1398 — sqlParameters.collectDeclareStatementVariables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectRoutineDefinitionVariables (cyclomatic 18) · ×1
  • sqlParameters.collectRoutineDefinitionVariables (cyclomatic 18) apps/desktop/src/lib/sql/sqlParameters.ts:1552 — sqlParameters.collectRoutineDefinitionVariables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlFormatter.formatLeadingCommas (cyclomatic 18) · ×1
  • sqlFormatter.formatLeadingCommas (cyclomatic 18) apps/desktop/src/lib/sql/sqlFormatter.ts:863 — sqlFormatter.formatLeadingCommas has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: sqlFormatter.sqlFormatDialectForDbType (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cyclomatic 18) · ×1
  • sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cyclomatic 18) apps/desktop/src/lib/sql/sqlVariableSyntax.ts:192 — sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · objectBrowserRows.buildObjectBrowserRows (cyclomatic 18) · ×1
  • objectBrowserRows.buildObjectBrowserRows (cyclomatic 18) apps/desktop/src/lib/table/objectBrowserRows.ts:169 — objectBrowserRows.buildObjectBrowserRows has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 171). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · objectBrowserRows.groupObjectBrowserRows (cyclomatic 18) · ×1
  • objectBrowserRows.groupObjectBrowserRows (cyclomatic 18) apps/desktop/src/lib/table/objectBrowserRows.ts:294 — objectBrowserRows.groupObjectBrowserRows has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (appendPartitions, a function literal at line 321, a function literal at line 335). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · objectSourceLoad.inspectExactOracleTriggerSource (cyclomatic 18) · ×1
  • objectSourceLoad.inspectExactOracleTriggerSource (cyclomatic 18) apps/desktop/src/lib/table/objectSourceLoad.ts:15 — objectSourceLoad.inspectExactOracleTriggerSource has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pgPartitionPresentation.splitPgPartitionBoundValues (cyclomatic 18) · ×1
  • pgPartitionPresentation.splitPgPartitionBoundValues (cyclomatic 18) apps/desktop/src/lib/table/pgPartitionPresentation.ts:89 — pgPartitionPresentation.splitPgPartitionBoundValues has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · postgresDataTypeHelp.gaussdbMTypeDisplayName (cyclomatic 18) · ×1
  • postgresDataTypeHelp.gaussdbMTypeDisplayName (cyclomatic 18) apps/desktop/src/lib/table/postgresDataTypeHelp.ts:164 — postgresDataTypeHelp.gaussdbMTypeDisplayName has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · routineParameters.sqlServerParameterDeclarationType (cyclomatic 18) · ×1
  • routineParameters.sqlServerParameterDeclarationType (cyclomatic 18) apps/desktop/src/lib/table/routineParameters.ts:512 — routineParameters.sqlServerParameterDeclarationType has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableColumnDefinitionPaste.validateDefaultExpression · ×1
  • tableColumnDefinitionPaste.validateDefaultExpression::operand (cyclomatic 18) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:99 — tableColumnDefinitionPaste.validateDefaultExpression::operand has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.isWrappedByOuterParens (cyclomatic 18) · ×1
  • tableStructureEditorState.isWrappedByOuterParens (cyclomatic 18) apps/desktop/src/lib/table/tableStructureEditorState.ts:1019 — tableStructureEditorState.isWrappedByOuterParens has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableStructureEditorState.isTemporalPrecisionType (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tableTree.coalesceXuguPackageObjects (cyclomatic 18) · ×1
  • tableTree.coalesceXuguPackageObjects (cyclomatic 18) apps/desktop/src/lib/table/tableTree.ts:623 — tableTree.coalesceXuguPackageObjects has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tabPresentation.statementExecutionMarkers (cyclomatic 18) · ×1
  • tabPresentation.statementExecutionMarkers (cyclomatic 18) apps/desktop/src/lib/tabs/tabPresentation.ts:544 — tabPresentation.statementExecutionMarkers has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cyclomatic 18) · ×1
  • connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts:3263 — connectionStore.useConnectionStore.loadPagedSimpleTableChildren has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.manifestTableSearchScopeMatchesTreeRefresh (cyclomatic 18) · ×1
  • connectionStore.useConnectionStore.manifestTableSearchScopeMatchesTreeRefresh (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts:3767 — connectionStore.useConnectionStore.manifestTableSearchScopeMatchesTreeRefresh has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.listCompletionAssistantObjects (cyclomatic 18) · ×1
  • connectionStore.useConnectionStore.listCompletionAssistantObjects (cyclomatic 18) apps/desktop/src/stores/connectionStore.ts:9289 — connectionStore.useConnectionStore.listCompletionAssistantObjects has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plDebugStore.usePlDebugStore.executeInDebuggee (cyclomatic 18) · ×1
  • plDebugStore.usePlDebugStore.executeInDebuggee (cyclomatic 18) apps/desktop/src/stores/plDebugStore.ts:1659 — plDebugStore.usePlDebugStore.executeInDebuggee has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.findMatchingObjectSourceTab (cyclomatic 18) · ×1
  • queryStore.useQueryStore.findMatchingObjectSourceTab (cyclomatic 18) apps/desktop/src/stores/queryStore.ts:3244 — queryStore.useQueryStore.findMatchingObjectSourceTab has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 3246). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transferTaskStore.useTransferTaskStore.moveTaskToFolder (cyclomatic 18) · ×1
  • transferTaskStore.useTransferTaskStore.moveTaskToFolder (cyclomatic 18) apps/desktop/src/stores/transferTaskStore.ts:383 — transferTaskStore.useTransferTaskStore.moveTaskToFolder has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 396, 390, 391). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · json.readMongoRegexLiteral (cyclomatic 18) · ×1
  • json.readMongoRegexLiteral (cyclomatic 18) packages/mongo-shell/src/json.ts:47 — json.readMongoRegexLiteral has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · json.splitTopLevel (cyclomatic 18) · ×1
  • json.splitTopLevel (cyclomatic 18) packages/mongo-shell/src/json.ts:226 — json.splitTopLevel has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Diagnostics.query (cyclomatic 18) · ×1
  • Diagnostics.query (cyclomatic 18) plugins/sdk/dev-host/diagnostics.mjs:70 — Diagnostics.query has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TupleScanner · ×1
  • TupleScanner::next (cyclomatic 17) REDACTED:225 — TupleScanner::next has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupConfig · ×1
  • BackupConfig::validate (cyclomatic 17) crates/dbx-core/src/scheduled_backup/models.rs:146 — BackupConfig::validate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cyclomatic 17) · ×1
  • DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cyclomatic 17) REDACTED:3271 — DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.handleLogicalSession (cyclomatic 17) · ×1
  • DbxJdbcPlugin.handleLogicalSession (cyclomatic 17) REDACTED:641 — DbxJdbcPlugin.handleLogicalSession has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OracleTriggerMetadataReader.listObjects (cyclomatic 17) · ×1
  • OracleTriggerMetadataReader.listObjects (cyclomatic 17) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:57 — OracleTriggerMetadataReader.listObjects has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlServerLegacyAgent.shouldFallbackToJtds (cyclomatic 17) · ×1
  • SqlServerLegacyAgent.shouldFallbackToJtds (cyclomatic 17) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:326 — SqlServerLegacyAgent.shouldFallbackToJtds has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OceanBaseLobValues.mark (cyclomatic 17) · ×1
  • OceanBaseLobValues.mark (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:231 — OceanBaseLobValues.mark has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 2.read (cyclomatic 17) · ×1
  • 2.read (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:444 — 2.read has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugBreakpointRegistry.set (cyclomatic 17) · ×1
  • PlDebugBreakpointRegistry.set (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:94 — PlDebugBreakpointRegistry.set has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Execution.run (cyclomatic 17) · ×1
  • Execution.run (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompile.java:144 — Execution.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeInput.payloadBytes (cyclomatic 17) · ×1
  • PlDebugCompositeInput.payloadBytes (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:49 — PlDebugCompositeInput.payloadBytes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Writer.childDeclaration (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PlDebugCompositeOutput.helperDeclarations (cyclomatic 17) · ×1
  • PlDebugCompositeOutput.helperDeclarations (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:230 — PlDebugCompositeOutput.helperDeclarations has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugCompositeOutput.<init> (cyclomatic 17) · ×1
  • PlDebugCompositeOutput.<init> (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:27 — PlDebugCompositeOutput.<init> has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Plan.bindComposite (cyclomatic 17) · ×1
  • Plan.bindComposite (cyclomatic 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:473 — Plan.bindComposite has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MongoAgent.applyAggregateOptions (cyclomatic 17) · ×1
  • MongoAgent.applyAggregateOptions (cyclomatic 17) REDACTED:878 — MongoAgent.applyAggregateOptions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MongoAgent.dispatch (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FirebirdObjectSource.triggerSource (cyclomatic 17) · ×1
  • FirebirdObjectSource.triggerSource (cyclomatic 17) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdObjectSource.java:57 — FirebirdObjectSource.triggerSource has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DamengAgent.buildCatalogObjectSource (cyclomatic 17) · ×1
  • DamengAgent.buildCatalogObjectSource (cyclomatic 17) REDACTED:1597 — DamengAgent.buildCatalogObjectSource has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · AbstractJdbcAgent.finishPooledRequest (cyclomatic 17) · ×1
  • AbstractJdbcAgent.finishPooledRequest (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:421 — AbstractJdbcAgent.finishPooledRequest has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AgentRpcError.classify (cyclomatic 17) · ×1
  • AgentRpcError.classify (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/AgentRpcError.java:108 — AgentRpcError.classify has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PoolEntry.borrow (cyclomatic 17) · ×1
  • PoolEntry.borrow (cyclomatic 17) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:905 — PoolEntry.borrow has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dbx_tunnel.run_worker (cyclomatic 17) · ×1
  • dbx_tunnel.run_worker (cyclomatic 17) deploy/dbx_tunnel.php:168 — dbx_tunnel.run_worker has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.sapHanaScriptBlockIsComplete (cyclomatic 17) · ×1
  • sqlStatementRanges.sapHanaScriptBlockIsComplete (cyclomatic 17) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2482 — sqlStatementRanges.sapHanaScriptBlockIsComplete has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cyclomatic 17) · ×1
  • useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cyclomatic 17) apps/desktop/src/components/editor/useQueryEditorCompletionKeys.ts:177 — useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorLayout.useQueryEditorLayout (cyclomatic 17) · ×1
  • useQueryEditorLayout.useQueryEditorLayout (cyclomatic 17) apps/desktop/src/components/editor/useQueryEditorLayout.ts:5 — useQueryEditorLayout.useQueryEditorLayout has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 6 function items inside it that branch (editorBoxTrackStep, a function literal at line 72, editorAvailableSize, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · queryResultTransferDdl.columnDefinitions (cyclomatic 17) · ×1
  • queryResultTransferDdl.columnDefinitions (cyclomatic 17) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:56 — queryResultTransferDdl.columnDefinitions has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAppUpdater.compareParsedUpdateVersions (cyclomatic 17) · ×1
  • useAppUpdater.compareParsedUpdateVersions (cyclomatic 17) apps/desktop/src/composables/useAppUpdater.ts:49 — useAppUpdater.compareParsedUpdateVersions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useCellDetailEditor.useCellDetailEditor (cyclomatic 17) · ×1
  • useCellDetailEditor.useCellDetailEditor (cyclomatic 17) apps/desktop/src/composables/useCellDetailEditor.ts:83 — useCellDetailEditor.useCellDetailEditor has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 194, 212, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cyclomatic 17) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cyclomatic 17) REDACTED:492 — useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.sqlExportChoices (cyclomatic 17) · ×1
  • useDataGridExport.useDataGridExport.sqlExportChoices (cyclomatic 17) apps/desktop/src/composables/useDataGridExport.ts:2602 — useDataGridExport.useDataGridExport.sqlExportChoices has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridSearch.useDataGridSearch.matchState (cyclomatic 17) · ×1
  • useDataGridSearch.useDataGridSearch.matchState (cyclomatic 17) apps/desktop/src/composables/useDataGridSearch.ts:55 — useDataGridSearch.useDataGridSearch.matchState has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 80, includes, a function literal at line 75). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cyclomatic 17) · ×1
  • useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cyclomatic 17) apps/desktop/src/composables/useDataGridSelection.ts:264 — useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cyclomatic 17) · ×1
  • useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cyclomatic 17) apps/desktop/src/composables/useSidebarTreeToolRuntime.ts:190 — useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aiSqlTargetTab.resolveAiSqlTargetTabId (cyclomatic 17) · ×1
  • aiSqlTargetTab.resolveAiSqlTargetTabId (cyclomatic 17) apps/desktop/src/lib/ai/aiSqlTargetTab.ts:31 — aiSqlTargetTab.resolveAiSqlTargetTabId has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsonSourceScanner.readNumberToken (cyclomatic 17) · ×1
  • JsonSourceScanner.readNumberToken (cyclomatic 17) apps/desktop/src/lib/common/safeJsonFormat.ts:532 — JsonSourceScanner.readNumberToken has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sessionModel.normalizeConsulSession (cyclomatic 17) · ×1
  • sessionModel.normalizeConsulSession (cyclomatic 17) apps/desktop/src/lib/consul/sessionModel.ts:5 — sessionModel.normalizeConsulSession has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cellValueGeneration.generateCellValues (cyclomatic 17) · ×1
  • cellValueGeneration.generateCellValues (cyclomatic 17) apps/desktop/src/lib/dataGrid/cellValueGeneration.ts:51 — cellValueGeneration.generateCellValues has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cyclomatic 17) · ×1
  • oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cyclomatic 17) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:100 — oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleConstraints.expressionTokens (cyclomatic 17) · ×1
  • oracleConstraints.expressionTokens (cyclomatic 17) apps/desktop/src/lib/database/oracleConstraints.ts:194 — oracleConstraints.expressionTokens has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTriggerPlan.candidateBinding (cyclomatic 17) · ×1
  • oracleTriggerPlan.candidateBinding (cyclomatic 17) apps/desktop/src/lib/database/oracleTriggerPlan.ts:611 — oracleTriggerPlan.candidateBinding has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleUserAdmin.oraclePrivilegeSql (cyclomatic 17) · ×1
  • oracleUserAdmin.oraclePrivilegeSql (cyclomatic 17) apps/desktop/src/lib/database/oracleUserAdmin.ts:92 — oracleUserAdmin.oraclePrivilegeSql has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · xuguUserPermissions.parseXuguAclRows (cyclomatic 17) · ×1
  • xuguUserPermissions.parseXuguAclRows (cyclomatic 17) apps/desktop/src/lib/database/xuguUserPermissions.ts:422 — xuguUserPermissions.parseXuguAclRows has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 426, field). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · elk-layout.extractHierarchicalLayoutResult (cyclomatic 17) · ×1
  • elk-layout.extractHierarchicalLayoutResult (cyclomatic 17) apps/desktop/src/lib/diagram/elk-layout.ts:321 — elk-layout.extractHierarchicalLayoutResult has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · codemirrorSqlBlockFolding.computeBlockFoldRanges (cyclomatic 17) · ×1
  • codemirrorSqlBlockFolding.computeBlockFoldRanges (cyclomatic 17) apps/desktop/src/lib/editor/codemirrorSqlBlockFolding.ts:193 — codemirrorSqlBlockFolding.computeBlockFoldRanges has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editorThemes.resolveEditorTheme (cyclomatic 17) · ×1
  • editorThemes.resolveEditorTheme (cyclomatic 17) apps/desktop/src/lib/editor/editorThemes.ts:700 — editorThemes.resolveEditorTheme has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: editorThemes.loadEditorTheme (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · elasticsearchJsonResponse.elasticsearchJsonResponseForResult (cyclomatic 17) · ×1
  • elasticsearchJsonResponse.elasticsearchJsonResponseForResult (cyclomatic 17) apps/desktop/src/lib/elasticsearch/elasticsearchJsonResponse.ts:16 — elasticsearchJsonResponse.elasticsearchJsonResponseForResult has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · xlsxExport.cellXml (cyclomatic 17) · ×1
  • xlsxExport.cellXml (cyclomatic 17) apps/desktop/src/lib/export/xlsxExport.ts:163 — xlsxExport.cellXml has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · neo4jGraph.applyNeo4jGraphPropertyToResult (cyclomatic 17) · ×1
  • neo4jGraph.applyNeo4jGraphPropertyToResult (cyclomatic 17) apps/desktop/src/lib/graph/neo4jGraph.ts:65 — neo4jGraph.applyNeo4jGraphPropertyToResult has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 76, a function literal at line 97, propertiesDisplay, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · dbeaverImport.parseJdbcUrl (cyclomatic 17) · ×1
  • dbeaverImport.parseJdbcUrl (cyclomatic 17) REDACTED:148 — dbeaverImport.parseJdbcUrl has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pluginData.unwrapVueProxies (cyclomatic 17) · ×1
  • pluginData.unwrapVueProxies (cyclomatic 17) apps/desktop/src/lib/plugins/pluginData.ts:62 — pluginData.unwrapVueProxies has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pluginHostBridge.requirePluginDataQueryRequest (cyclomatic 17) · ×1
  • pluginHostBridge.requirePluginDataQueryRequest (cyclomatic 17) REDACTED:1764 — pluginHostBridge.requirePluginDataQueryRequest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginFloatingWindow.startFloatingWindowReaper (cyclomatic 17) · ×1
  • pluginFloatingWindow.startFloatingWindowReaper (cyclomatic 17) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:768 — pluginFloatingWindow.startFloatingWindowReaper has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 787, 803, 774, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · redisContentSearch.worker.onmessage (cyclomatic 17) · ×1
  • redisContentSearch.worker.onmessage (cyclomatic 17) apps/desktop/src/lib/redis/redisContentSearch.worker.ts:5 — redisContentSearch.worker.onmessage has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · savedSqlDatabaseTree.withDatabaseSavedSqlRoot (cyclomatic 17) · ×1
  • savedSqlDatabaseTree.withDatabaseSavedSqlRoot (cyclomatic 17) apps/desktop/src/lib/savedSql/savedSqlDatabaseTree.ts:87 — savedSqlDatabaseTree.withDatabaseSavedSqlRoot has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · savedSqlTreeRows.compareSiblingItems (cyclomatic 17) · ×1
  • savedSqlTreeRows.compareSiblingItems (cyclomatic 17) apps/desktop/src/lib/savedSql/savedSqlTreeRows.ts:32 — savedSqlTreeRows.compareSiblingItems has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cyclomatic 17) · ×1
  • oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cyclomatic 17) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:253 — oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: oracleRoutineDeploy.oraclePackageTransferPendingReady (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · sidebarSearch.matchSidebarLabelWithRegex (cyclomatic 17) · ×1
  • sidebarSearch.matchSidebarLabelWithRegex (cyclomatic 17) apps/desktop/src/lib/sidebar/sidebarSearch.ts:143 — sidebarSearch.matchSidebarLabelWithRegex has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sidebarTreeArrowNavigation.sidebarTreeArrowAction (cyclomatic 17) · ×1
  • sidebarTreeArrowNavigation.sidebarTreeArrowAction (cyclomatic 17) apps/desktop/src/lib/sidebar/sidebarTreeArrowNavigation.ts:16 — sidebarTreeArrowNavigation.sidebarTreeArrowAction has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xuguTypeMembers.buildXuguTypeMemberNodes (cyclomatic 17) · ×1
  • xuguTypeMembers.buildXuguTypeMemberNodes (cyclomatic 17) apps/desktop/src/lib/sidebar/xuguTypeMembers.ts:12 — xuguTypeMembers.buildXuguTypeMemberNodes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · soqlCompletion.fieldItems (cyclomatic 17) · ×1
  • soqlCompletion.fieldItems (cyclomatic 17) apps/desktop/src/lib/soql/soqlCompletion.ts:420 — soqlCompletion.fieldItems has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · soqlCompletion.valueItems (cyclomatic 17) · ×1
  • soqlCompletion.valueItems (cyclomatic 17) apps/desktop/src/lib/soql/soqlCompletion.ts:456 — soqlCompletion.valueItems has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · executableStatementRangeCache.executableStatementRangeAtCursor (cyclomatic 17) · ×1
  • executableStatementRangeCache.executableStatementRangeAtCursor (cyclomatic 17) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:136 — executableStatementRangeCache.executableStatementRangeAtCursor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · diagnostics.leadingUnquotedSqlKeywords (cyclomatic 17) · ×1
  • diagnostics.leadingUnquotedSqlKeywords (cyclomatic 17) apps/desktop/src/lib/sql/semantic/diagnostics.ts:88 — diagnostics.leadingUnquotedSqlKeywords has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.trailingIdentifier (cyclomatic 17) · ×1
  • model.trailingIdentifier (cyclomatic 17) apps/desktop/src/lib/sql/semantic/model.ts:845 — model.trailingIdentifier has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.parseSelectColumns (cyclomatic 17) · ×1
  • sqlAnalysis.parseSelectColumns (cyclomatic 17) apps/desktop/src/lib/sql/sqlAnalysis.ts:431 — sqlAnalysis.parseSelectColumns has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.shouldAutoOpenSqlCompletion (cyclomatic 17) · ×1
  • sqlCompletion.shouldAutoOpenSqlCompletion (cyclomatic 17) apps/desktop/src/lib/sql/sqlCompletion.ts:2159 — sqlCompletion.shouldAutoOpenSqlCompletion has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlParameters.decodeMyBatisXmlComparisonEntities (cyclomatic 17) · ×1
  • sqlParameters.decodeMyBatisXmlComparisonEntities (cyclomatic 17) apps/desktop/src/lib/sql/sqlParameters.ts:348 — sqlParameters.decodeMyBatisXmlComparisonEntities has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.tryReadQuotedSubstitutionPlaceholder (cyclomatic 17) · ×1
  • sqlParameters.tryReadQuotedSubstitutionPlaceholder (cyclomatic 17) apps/desktop/src/lib/sql/sqlParameters.ts:1759 — sqlParameters.tryReadQuotedSubstitutionPlaceholder has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlFileTreeFilter.filterAndSortSqlFileEntries (cyclomatic 17) · ×1
  • sqlFileTreeFilter.filterAndSortSqlFileEntries (cyclomatic 17) apps/desktop/src/lib/sql/sqlFileTreeFilter.ts:87 — sqlFileTreeFilter.filterAndSortSqlFileEntries has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (filterEntries, countNodes). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · sqlNavigation.resolveSqlObjectNavigationIdentity (cyclomatic 17) · ×1
  • sqlNavigation.resolveSqlObjectNavigationIdentity (cyclomatic 17) apps/desktop/src/lib/sql/sqlNavigation.ts:513 — sqlNavigation.resolveSqlObjectNavigationIdentity has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlSelectionCase.convertSqlSelectionCase (cyclomatic 17) · ×1
  • sqlSelectionCase.convertSqlSelectionCase (cyclomatic 17) apps/desktop/src/lib/sql/sqlSelectionCase.ts:14 — sqlSelectionCase.convertSqlSelectionCase has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · batchTableDrop.runBatchTableDrop (cyclomatic 17) · ×1
  • batchTableDrop.runBatchTableDrop (cyclomatic 17) apps/desktop/src/lib/table/batchTableDrop.ts:36 — batchTableDrop.runBatchTableDrop has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleTableRename.validateDraftRelations (cyclomatic 17) · ×1
  • oracleTableRename.validateDraftRelations (cyclomatic 17) REDACTED:344 — oracleTableRename.validateDraftRelations has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (normalize, a function literal at line 415, a function literal at line 354, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · routineParameters.routineParametersQuery (cyclomatic 17) · ×1
  • routineParameters.routineParametersQuery (cyclomatic 17) apps/desktop/src/lib/table/routineParameters.ts:42 — routineParameters.routineParametersQuery has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · routineParameters.xuguFunctionReturnType (cyclomatic 17) · ×1
  • routineParameters.xuguFunctionReturnType (cyclomatic 17) apps/desktop/src/lib/table/routineParameters.ts:401 — routineParameters.xuguFunctionReturnType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.getDefaultLengthForType (cyclomatic 17) · ×1
  • tableStructureEditorState.getDefaultLengthForType (cyclomatic 17) apps/desktop/src/lib/table/tableStructureEditorState.ts:1816 — tableStructureEditorState.getDefaultLengthForType has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: tableStructureEditorState.isTemporalPrecisionType (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tableTree.mergeTableInfosIntoObjects (cyclomatic 17) · ×1
  • tableTree.mergeTableInfosIntoObjects (cyclomatic 17) apps/desktop/src/lib/table/tableTree.ts:244 — tableTree.mergeTableInfosIntoObjects has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · editorToolbarLayout.resolveNextEditorToolbarTier (cyclomatic 17) · ×1
  • editorToolbarLayout.resolveNextEditorToolbarTier (cyclomatic 17) apps/desktop/src/lib/tabs/editorToolbarLayout.ts:49 — editorToolbarLayout.resolveNextEditorToolbarTier has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadPersistedTreeChildren (cyclomatic 17) · ×1
  • connectionStore.useConnectionStore.loadPersistedTreeChildren (cyclomatic 17) apps/desktop/src/stores/connectionStore.ts:3508 — connectionStore.useConnectionStore.loadPersistedTreeChildren has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadXuguTypeMembers (cyclomatic 17) · ×1
  • connectionStore.useConnectionStore.loadXuguTypeMembers (cyclomatic 17) apps/desktop/src/stores/connectionStore.ts:9069 — connectionStore.useConnectionStore.loadXuguTypeMembers has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.closeResultSession (cyclomatic 17) · ×1
  • queryStore.useQueryStore.closeResultSession (cyclomatic 17) apps/desktop/src/stores/queryStore.ts:1870 — queryStore.useQueryStore.closeResultSession has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.moveFileToFolder (cyclomatic 17) · ×1
  • savedSqlStore.useSavedSqlStore.moveFileToFolder (cyclomatic 17) apps/desktop/src/stores/savedSqlStore.ts:1020 — savedSqlStore.useSavedSqlStore.moveFileToFolder has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1045, 1028, 1027). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · settingsStore.normalizeSqlShortcuts (cyclomatic 17) · ×1
  • settingsStore.normalizeSqlShortcuts (cyclomatic 17) apps/desktop/src/stores/settingsStore.ts:1943 — settingsStore.normalizeSqlShortcuts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agentBundle.extractDriverPackage (cyclomatic 17) · ×1
  • agentBundle.extractDriverPackage (cyclomatic 17) docs/lib/agentBundle.ts:239 — agentBundle.extractDriverPackage has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · i18n.localizeManifest (cyclomatic 17) · ×1
  • i18n.localizeManifest (cyclomatic 17) plugins/sdk/dev-host/ui/i18n.js:98 — i18n.localizeManifest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NacosOpenApiAdmin · ×1
  • NacosOpenApiAdmin::test_connection (cyclomatic 16) crates/dbx-core/src/admin/nacos/http.rs:1800 — NacosOpenApiAdmin::test_connection has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DegradationChain · ×1
  • DegradationChain::decide (cyclomatic 16) REDACTED:1680 — DegradationChain::decide has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Nb3ExportWriter · ×1
  • Nb3ExportWriter::handle_statement (cyclomatic 16) REDACTED:1396 — Nb3ExportWriter::handle_statement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Expansion · ×1
  • Expansion::file (cyclomatic 16) crates/dbx-core/src/data/sql_file_import/includes.rs:141 — Expansion::file has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OwnedPoolSession · ×1
  • OwnedPoolSession::legacy_call (cyclomatic 16) crates/dbx-core/src/schema/native_jobs/operations.rs:1169 — OwnedPoolSession::legacy_call has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LegacyReader · ×1
  • LegacyReader::summaries (cyclomatic 16) crates/dbx-core/src/schema/oracle_triggers.rs:395 — LegacyReader::summaries has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · OracleSchemaSyncTableDdl · ×1
  • OracleSchemaSyncTableDdl::render_triggers (cyclomatic 16) crates/dbx-sql-schema/src/schema_diff/oracle_indexes.rs:185 — OracleSchemaSyncTableDdl::render_triggers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.executeQueryOnConnection (cyclomatic 16) · ×1
  • DbxJdbcPlugin.executeQueryOnConnection (cyclomatic 16) REDACTED:1572 — DbxJdbcPlugin.executeQueryOnConnection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.openConnection (cyclomatic 16) · ×1
  • DbxJdbcPlugin.openConnection (cyclomatic 16) REDACTED:1175 — DbxJdbcPlugin.openConnection has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DbxJdbcPlugin.oracleListObjects (cyclomatic 16) · ×1
  • DbxJdbcPlugin.oracleListObjects (cyclomatic 16) REDACTED:5289 — DbxJdbcPlugin.oracleListObjects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SpannerAgent.completionAssistantSearch (cyclomatic 16) · ×1
  • SpannerAgent.completionAssistantSearch (cyclomatic 16) agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:344 — SpannerAgent.completionAssistantSearch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Entry.snapshot (cyclomatic 16) · ×1
  • Entry.snapshot (cyclomatic 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:650 — Entry.snapshot has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugSource.reference (cyclomatic 16) · ×1
  • PlDebugSource.reference (cyclomatic 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:20 — PlDebugSource.reference has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlDebugTarget.inputPayloadBytes (cyclomatic 16) · ×1
  • PlDebugTarget.inputPayloadBytes (cyclomatic 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:908 — PlDebugTarget.inputPayloadBytes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: PlDebugTarget.declare (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DamengAgent.splitTableDdlDefinitions (cyclomatic 16) · ×1
  • DamengAgent.splitTableDdlDefinitions (cyclomatic 16) REDACTED:2339 — DamengAgent.splitTableDdlDefinitions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DamengAgent.resultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ConnectionFactoryDataSource.getConnection (cyclomatic 16) · ×1
  • ConnectionFactoryDataSource.getConnection (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1115 — ConnectionFactoryDataSource.getConnection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JdbcExecutor.executePage (cyclomatic 16) · ×1
  • JdbcExecutor.executePage (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:560 — JdbcExecutor.executePage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: JdbcExecutor.defaultResultValue (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · JsonRpcServer.ensureLiveConnection (cyclomatic 16) · ×1
  • JsonRpcServer.ensureLiveConnection (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:790 — JsonRpcServer.ensureLiveConnection has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MultiSessionJsonRpcServer.handleRequest (cyclomatic 16) · ×1
  • MultiSessionJsonRpcServer.handleRequest (cyclomatic 16) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198 — MultiSessionJsonRpcServer.handleRequest has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · configure-docker-mirror.configure (cyclomatic 16) · ×1
  • configure-docker-mirror.configure (cyclomatic 16) .github/scripts/configure-docker-mirror.py:16 — configure-docker-mirror.configure has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlStatementRanges.nextSqlWordToken (cyclomatic 16) · ×1
  • sqlStatementRanges.nextSqlWordToken (cyclomatic 16) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1627 — sqlStatementRanges.nextSqlWordToken has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cyclomatic 16) · ×1
  • sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cyclomatic 16) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2188 — sqlStatementRanges.advanceMysqlRoutineBlockCompleteness has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlStatementRanges.startsWithFirebirdRoutineBlock (cyclomatic 16) · ×1
  • sqlStatementRanges.startsWithFirebirdRoutineBlock (cyclomatic 16) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2531 — sqlStatementRanges.startsWithFirebirdRoutineBlock has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · build_offline_jdbc_payload.validateAndCopyBundle (cyclomatic 16) · ×1
  • build_offline_jdbc_payload.validateAndCopyBundle (cyclomatic 16) agents/scripts/build_offline_jdbc_payload.mjs:75 — build_offline_jdbc_payload.validateAndCopyBundle has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldTriggerSqlCompletionForPosition (cyclomatic 16) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldTriggerSqlCompletionForPosition (cyclomatic 16) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1114 — useQueryEditorCompletion.useQueryEditorCompletion.shouldTriggerSqlCompletionForPosition has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useQueryEditorExecution.useQueryEditorExecution.requestExecuteFromView (cyclomatic 16) · ×1
  • useQueryEditorExecution.useQueryEditorExecution.requestExecuteFromView (cyclomatic 16) apps/desktop/src/components/editor/useQueryEditorExecution.ts:75 — useQueryEditorExecution.useQueryEditorExecution.requestExecuteFromView has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryResultTransferDdl.transactionalMysqlTableDdl (cyclomatic 16) · ×1
  • queryResultTransferDdl.transactionalMysqlTableDdl (cyclomatic 16) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:34 — queryResultTransferDdl.transactionalMysqlTableDdl has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryResultTransferValues.temporalFractionalPrecision (cyclomatic 16) · ×1
  • queryResultTransferValues.temporalFractionalPrecision (cyclomatic 16) apps/desktop/src/components/transfer/queryResultTransferValues.ts:96 — queryResultTransferValues.temporalFractionalPrecision has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useAppUpdater.useAppUpdater.downloadUpdateInBackground · ×1
  • useAppUpdater.useAppUpdater.downloadUpdateInBackground::run (cyclomatic 16) apps/desktop/src/composables/useAppUpdater.ts:302 — useAppUpdater.useAppUpdater.downloadUpdateInBackground::run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cyclomatic 16) · ×1
  • useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cyclomatic 16) apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:140 — useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.restoreCellValue (cyclomatic 16) · ×1
  • useDataGridEditor.useDataGridEditor.restoreCellValue (cyclomatic 16) apps/desktop/src/composables/useDataGridEditor.ts:1351 — useDataGridEditor.useDataGridEditor.restoreCellValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.prepareAddedRows (cyclomatic 16) · ×1
  • useDataGridEditor.useDataGridEditor.prepareAddedRows (cyclomatic 16) apps/desktop/src/composables/useDataGridEditor.ts:1472 — useDataGridEditor.useDataGridEditor.prepareAddedRows has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridEditor.useDataGridEditor.syncCurrentSave (cyclomatic 16) · ×1
  • useDataGridEditor.useDataGridEditor.syncCurrentSave (cyclomatic 16) apps/desktop/src/composables/useDataGridEditor.ts:2152 — useDataGridEditor.useDataGridEditor.syncCurrentSave has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cyclomatic 16) · ×1
  • useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cyclomatic 16) apps/desktop/src/composables/useDataGridExport.ts:2121 — useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2125, 2146, 2159). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cyclomatic 16) · ×1
  • useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cyclomatic 16) apps/desktop/src/composables/useScheduledDatabaseBackups.ts:26 — useScheduledDatabaseBackups.useScheduledDatabaseBackups.update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.tryExecute (cyclomatic 16) · ×1
  • useSqlExecution.useSqlExecution.tryExecute (cyclomatic 16) apps/desktop/src/composables/useSqlExecution.ts:299 — useSqlExecution.useSqlExecution.tryExecute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useSqlExecution.useSqlExecution.continueExecute (cyclomatic 16) · ×1
  • useSqlExecution.useSqlExecution.continueExecute (cyclomatic 16) apps/desktop/src/composables/useSqlExecution.ts:353 — useSqlExecution.useSqlExecution.continueExecute has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai.buildBasePromptLines (cyclomatic 16) · ×1
  • ai.buildBasePromptLines (cyclomatic 16) apps/desktop/src/lib/ai/ai.ts:559 — ai.buildBasePromptLines has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai.formatSchema (cyclomatic 16) · ×1
  • ai.formatSchema (cyclomatic 16) apps/desktop/src/lib/ai/ai.ts:799 — ai.formatSchema has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 803). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · aiAgentStepPresentation.upsertAgentStep (cyclomatic 16) · ×1
  • aiAgentStepPresentation.upsertAgentStep (cyclomatic 16) apps/desktop/src/lib/ai/aiAgentStepPresentation.ts:66 — aiAgentStepPresentation.upsertAgentStep has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · aiSqlActionFeedback.aiSqlActionFeedback (cyclomatic 16) · ×1
  • aiSqlActionFeedback.aiSqlActionFeedback (cyclomatic 16) apps/desktop/src/lib/ai/aiSqlActionFeedback.ts:43 — aiSqlActionFeedback.aiSqlActionFeedback has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · documentStoreProvider.buildElasticsearchRuleQuery (cyclomatic 16) · ×1
  • documentStoreProvider.buildElasticsearchRuleQuery (cyclomatic 16) apps/desktop/src/lib/app/documentStoreProvider.ts:506 — documentStoreProvider.buildElasticsearchRuleQuery has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · tauri.startTableExport (cyclomatic 16) · ×1
  • tauri.startTableExport (cyclomatic 16) apps/desktop/src/lib/backend/tauri.ts:6778 — tauri.startTableExport has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (tauri.startQueryResultExport) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · tauri.startQueryResultExport (cyclomatic 16) · ×1
  • tauri.startQueryResultExport (cyclomatic 16) apps/desktop/src/lib/backend/tauri.ts:6830 — tauri.startQueryResultExport has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (tauri.startTableExport) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · connectionDeepLink.parseConnectionDeepLink (cyclomatic 16) · ×1
  • connectionDeepLink.parseConnectionDeepLink (cyclomatic 16) REDACTED:274 — connectionDeepLink.parseConnectionDeepLink has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · connectionUrl.parseJdbcSqlServerUrl (cyclomatic 16) · ×1
  • connectionUrl.parseJdbcSqlServerUrl (cyclomatic 16) REDACTED:466 — connectionUrl.parseJdbcSqlServerUrl has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · columnFormatter.parseIoTDBTimestampEditorValue (cyclomatic 16) · ×1
  • columnFormatter.parseIoTDBTimestampEditorValue (cyclomatic 16) apps/desktop/src/lib/dataGrid/columnFormatter.ts:383 — columnFormatter.parseIoTDBTimestampEditorValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGenerate.generatePhone (cyclomatic 16) · ×1
  • dataGenerate.generatePhone (cyclomatic 16) apps/desktop/src/lib/dataGrid/dataGenerate.ts:949 — dataGenerate.generatePhone has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dataGridColumnFilter.splitTopLevelAnd (cyclomatic 16) · ×1
  • dataGridColumnFilter.splitTopLevelAnd (cyclomatic 16) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:121 — dataGridColumnFilter.splitTopLevelAnd has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dataGridSort.compareDataGridValues (cyclomatic 16) · ×1
  • dataGridSort.compareDataGridValues (cyclomatic 16) apps/desktop/src/lib/dataGrid/dataGridSort.ts:109 — dataGridSort.compareDataGridValues has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geometryPreview.tokenize (cyclomatic 16) · ×1
  • geometryPreview.tokenize (cyclomatic 16) apps/desktop/src/lib/dataGrid/geometryPreview.ts:14 — geometryPreview.tokenize has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · joinedRowChanges.joinedRowChanges (cyclomatic 16) · ×1
  • joinedRowChanges.joinedRowChanges (cyclomatic 16) apps/desktop/src/lib/dataGrid/joinedRowChanges.ts:54 — joinedRowChanges.joinedRowChanges has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · databaseStructureSearch.mapStructureSearchRows (cyclomatic 16) · ×1
  • databaseStructureSearch.mapStructureSearchRows (cyclomatic 16) apps/desktop/src/lib/database/databaseStructureSearch.ts:70 — databaseStructureSearch.mapStructureSearchRows has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleForeignKeys.parseOracleCanonicalType (cyclomatic 16) · ×1
  • oracleForeignKeys.parseOracleCanonicalType (cyclomatic 16) apps/desktop/src/lib/database/oracleForeignKeys.ts:392 — oracleForeignKeys.parseOracleCanonicalType has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · oracleIndexes.expectedCreatedIndex (cyclomatic 16) · ×1
  • oracleIndexes.expectedCreatedIndex (cyclomatic 16) apps/desktop/src/lib/database/oracleIndexes.ts:207 — oracleIndexes.expectedCreatedIndex has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: oracleIndexes.sameExpectedIndexes (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · oracleInvalidObjects.buildOracleCompileSql (cyclomatic 16) · ×1
  • oracleInvalidObjects.buildOracleCompileSql (cyclomatic 16) apps/desktop/src/lib/database/oracleInvalidObjects.ts:136 — oracleInvalidObjects.buildOracleCompileSql has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oracleSessionDiagnostics.captureOracleDiagnosticTarget (cyclomatic 16) · ×1
  • oracleSessionDiagnostics.captureOracleDiagnosticTarget (cyclomatic 16) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:93 — oracleSessionDiagnostics.captureOracleDiagnosticTarget has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · productionSafety.referencedDatabases (cyclomatic 16) · ×1
  • productionSafety.referencedDatabases (cyclomatic 16) apps/desktop/src/lib/database/productionSafety.ts:148 — productionSafety.referencedDatabases has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plDebugAnonymousBlock.stripPlSqlComments (cyclomatic 16) · ×1
  • plDebugAnonymousBlock.stripPlSqlComments (cyclomatic 16) apps/desktop/src/lib/debug/plDebugAnonymousBlock.ts:22 — plDebugAnonymousBlock.stripPlSqlComments has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.buildBatchQualifyActions (cyclomatic 16) · ×1
  • sqlIntentionActions.buildBatchQualifyActions (cyclomatic 16) apps/desktop/src/lib/editor/sqlIntentionActions.ts:199 — sqlIntentionActions.buildBatchQualifyActions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlIntentionActions.resolveNavigationTarget (cyclomatic 16) · ×1
  • sqlIntentionActions.resolveNavigationTarget (cyclomatic 16) apps/desktop/src/lib/editor/sqlIntentionActions.ts:749 — sqlIntentionActions.resolveNavigationTarget has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlSemanticSelectionRanges.stringContentRange (cyclomatic 16) · ×1
  • sqlSemanticSelectionRanges.stringContentRange (cyclomatic 16) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:406 — sqlSemanticSelectionRanges.stringContentRange has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · elasticsearchCompletion.flattenElasticsearchMappingFields (cyclomatic 16) · ×1
  • elasticsearchCompletion.flattenElasticsearchMappingFields (cyclomatic 16) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:232 — elasticsearchCompletion.flattenElasticsearchMappingFields has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · datagripImport.inferProfile (cyclomatic 16) · ×1
  • datagripImport.inferProfile (cyclomatic 16) REDACTED:302 — datagripImport.inferProfile has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · influxDbV1Delete.validRfc3339Timestamp (cyclomatic 16) · ×1
  • influxDbV1Delete.validRfc3339Timestamp (cyclomatic 16) apps/desktop/src/lib/influxdb/influxDbV1Delete.ts:145 — influxDbV1Delete.validRfc3339Timestamp has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mongoCompletion.skipMongoStringOrComment (cyclomatic 16) · ×1
  • mongoCompletion.skipMongoStringOrComment (cyclomatic 16) REDACTED:2298 — mongoCompletion.skipMongoStringOrComment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: mongoCompletion.buildMongoCompletionItemsFromContext (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mongoDocumentValues.mongoTypedNumberInputValue (cyclomatic 16) · ×1
  • mongoDocumentValues.mongoTypedNumberInputValue (cyclomatic 16) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:422 — mongoDocumentValues.mongoTypedNumberInputValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoFilterContainsOpaqueLogic (cyclomatic 16) · ×1
  • mongoShellCommand.mongoFilterContainsOpaqueLogic (cyclomatic 16) REDACTED:2006 — mongoShellCommand.mongoFilterContainsOpaqueLogic has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 2007). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoPureFieldPredicate (cyclomatic 16) · ×1
  • mongoShellCommand.mongoPureFieldPredicate (cyclomatic 16) REDACTED:2041 — mongoShellCommand.mongoPureFieldPredicate has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mongoShellCommand.mongoFilterObjectIsUnbounded (cyclomatic 16) · ×1
  • mongoShellCommand.mongoFilterObjectIsUnbounded (cyclomatic 16) REDACTED:2120 — mongoShellCommand.mongoFilterObjectIsUnbounded has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 2125). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · pluginData.snapshotValue (cyclomatic 16) · ×1
  • pluginData.snapshotValue (cyclomatic 16) apps/desktop/src/lib/plugins/pluginData.ts:30 — pluginData.snapshotValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · frontendPlugin.pluginConnectionFormValues (cyclomatic 16) · ×1
  • frontendPlugin.pluginConnectionFormValues (cyclomatic 16) apps/desktop/src/lib/plugins/frontendPlugin.ts:241 — frontendPlugin.pluginConnectionFormValues has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pluginHostBridge.requirePluginAiRecommendationUpdate.items (cyclomatic 16) · ×1
  • pluginHostBridge.requirePluginAiRecommendationUpdate.items (cyclomatic 16) REDACTED:1812 — pluginHostBridge.requirePluginAiRecommendationUpdate.items has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · pluginMarketplace.comparePrerelease (cyclomatic 16) · ×1
  • pluginMarketplace.comparePrerelease (cyclomatic 16) apps/desktop/src/lib/plugins/pluginMarketplace.ts:364 — pluginMarketplace.comparePrerelease has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCommandTable.firstRedisArgvUpper (cyclomatic 16) · ×1
  • redisCommandTable.firstRedisArgvUpper (cyclomatic 16) apps/desktop/src/lib/redis/redisCommandTable.ts:463 — redisCommandTable.firstRedisArgvUpper has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redisCompletion.argumentGrammar (cyclomatic 16) · ×1
  • redisCompletion.argumentGrammar (cyclomatic 16) apps/desktop/src/lib/redis/redisCompletion.ts:323 — redisCompletion.argumentGrammar has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (compileContent, compileArgument, a function literal at line 334, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · schemaDiffTableFilter.compileExcludePatterns (cyclomatic 16) · ×1
  • schemaDiffTableFilter.compileExcludePatterns (cyclomatic 16) REDACTED:27 — schemaDiffTableFilter.compileExcludePatterns has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sidebarDatabaseStorage.applySidebarTableStorage (cyclomatic 16) · ×1
  • sidebarDatabaseStorage.applySidebarTableStorage (cyclomatic 16) apps/desktop/src/lib/sidebar/sidebarDatabaseStorage.ts:49 — sidebarDatabaseStorage.applySidebarTableStorage has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, a function literal at line 51). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · sidebarLayout.reorderEntry (cyclomatic 16) · ×1
  • sidebarLayout.reorderEntry (cyclomatic 16) apps/desktop/src/lib/sidebar/sidebarLayout.ts:476 — sidebarLayout.reorderEntry has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aggregateCombinators.buildCombinatorSequences (cyclomatic 16) · ×1
  • aggregateCombinators.buildCombinatorSequences (cyclomatic 16) apps/desktop/src/lib/sql/clickhouse/aggregateCombinators.ts:10 — aggregateCombinators.buildCombinatorSequences has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cypherFormatter.formatCypherText (cyclomatic 16) · ×1
  • cypherFormatter.formatCypherText (cyclomatic 16) apps/desktop/src/lib/sql/cypherFormatter.ts:504 — cypherFormatter.formatCypherText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlAnalysis.hasTopLevelSemicolon (cyclomatic 16) · ×1
  • sqlAnalysis.hasTopLevelSemicolon (cyclomatic 16) apps/desktop/src/lib/sql/sqlAnalysis.ts:938 — sqlAnalysis.hasTopLevelSemicolon has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.preferredKeywordsForCompletion (cyclomatic 16) · ×1
  • sqlCompletion.preferredKeywordsForCompletion (cyclomatic 16) apps/desktop/src/lib/sql/sqlCompletion.ts:3701 — sqlCompletion.preferredKeywordsForCompletion has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlCompletion.buildSelectAllColumnItems (cyclomatic 16) · ×1
  • sqlCompletion.buildSelectAllColumnItems (cyclomatic 16) apps/desktop/src/lib/sql/sqlCompletion.ts:5454 — sqlCompletion.buildSelectAllColumnItems has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlCompletion.completionColumnPrefixCandidates (cyclomatic 16) · ×1
  • sqlCompletion.completionColumnPrefixCandidates (cyclomatic 16) apps/desktop/src/lib/sql/sqlCompletion.ts:5858 — sqlCompletion.completionColumnPrefixCandidates has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.collectComplexTypeFieldSeparators (cyclomatic 16) · ×1
  • sqlParameters.collectComplexTypeFieldSeparators (cyclomatic 16) apps/desktop/src/lib/sql/sqlParameters.ts:1129 — sqlParameters.collectComplexTypeFieldSeparators has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlParameters.readSubstitutionParameterOccurrence (cyclomatic 16) · ×1
  • sqlParameters.readSubstitutionParameterOccurrence (cyclomatic 16) apps/desktop/src/lib/sql/sqlParameters.ts:1801 — sqlParameters.readSubstitutionParameterOccurrence has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sqlDiagnostics.sqlErrorDecorationRange (cyclomatic 16) · ×1
  • sqlDiagnostics.sqlErrorDecorationRange (cyclomatic 16) apps/desktop/src/lib/sql/sqlDiagnostics.ts:160 — sqlDiagnostics.sqlErrorDecorationRange has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sqlServerActivityTraceRuntime.pollEvents (cyclomatic 16) · ×1
  • sqlServerActivityTraceRuntime.pollEvents (cyclomatic 16) apps/desktop/src/lib/sqlserver/sqlServerActivityTraceRuntime.ts:230 — sqlServerActivityTraceRuntime.pollEvents has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 240, 249, 256). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · objectBrowserRowAction.doubleClickRowAction (cyclomatic 16) · ×1
  • objectBrowserRowAction.doubleClickRowAction (cyclomatic 16) apps/desktop/src/lib/table/objectBrowserRowAction.ts:37 — objectBrowserRowAction.doubleClickRowAction has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · oraclePackageSaveAs.verifyCreatedPackage (cyclomatic 16) · ×1
  • oraclePackageSaveAs.verifyCreatedPackage (cyclomatic 16) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:245 — oraclePackageSaveAs.verifyCreatedPackage has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · starrocksPhysicalOptions.buildStarRocksDialectOptions (cyclomatic 16) · ×1
  • starrocksPhysicalOptions.buildStarRocksDialectOptions (cyclomatic 16) apps/desktop/src/lib/table/starrocksPhysicalOptions.ts:76 — starrocksPhysicalOptions.buildStarRocksDialectOptions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableDataExport.fetchTableDataForExport (cyclomatic 16) · ×1
  • tableDataExport.fetchTableDataForExport (cyclomatic 16) apps/desktop/src/lib/table/tableDataExport.ts:28 — tableDataExport.fetchTableDataForExport has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tableStructureEditorState.specialIndexColumnIssue (cyclomatic 16) · ×1
  • tableStructureEditorState.specialIndexColumnIssue (cyclomatic 16) apps/desktop/src/lib/table/tableStructureEditorState.ts:1413 — tableStructureEditorState.specialIndexColumnIssue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableStructureEditorState.isTemporalPrecisionType (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · tableTree.simpleObjectNodeType (cyclomatic 16) · ×1
  • tableTree.simpleObjectNodeType (cyclomatic 16) apps/desktop/src/lib/table/tableTree.ts:790 — tableTree.simpleObjectNodeType has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tableVGroup.normalizeTableVGroupLayout · ×1
  • tableVGroup.normalizeTableVGroupLayout::normalizeEntries (cyclomatic 16) apps/desktop/src/lib/table/tableVGroup.ts:701 — tableVGroup.normalizeTableVGroupLayout::normalizeEntries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: tableVGroup.tableVGroupKindOfContainerNode (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.loadCachedMetadataListPage (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.loadCachedMetadataListPage (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:773 — connectionStore.useConnectionStore.loadCachedMetadataListPage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.syncOracleTriggerNodeState (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.syncOracleTriggerNodeState (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:2777 — connectionStore.useConnectionStore.syncOracleTriggerNodeState has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cyclomatic 16) · ×1
  • connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cyclomatic 16) apps/desktop/src/stores/connectionStore.ts:3971 — connectionStore.useConnectionStore.buildSidebarTableSearchIndex has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.bindColumnsForSource.columns (cyclomatic 16) · ×1
  • queryStore.bindColumnsForSource.columns (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:998 — queryStore.bindColumnsForSource.columns has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.recoverDetachedTabsToMain (cyclomatic 16) · ×1
  • queryStore.useQueryStore.recoverDetachedTabsToMain (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:2814 — queryStore.useQueryStore.recoverDetachedTabsToMain has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.adoptDetachedTab (cyclomatic 16) · ×1
  • queryStore.useQueryStore.adoptDetachedTab (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:3119 — queryStore.useQueryStore.adoptDetachedTab has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.closeTabsWhere (cyclomatic 16) · ×1
  • queryStore.useQueryStore.closeTabsWhere (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:5667 — queryStore.useQueryStore.closeTabsWhere has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.commitTransaction (cyclomatic 16) · ×1
  • queryStore.useQueryStore.commitTransaction (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:6271 — queryStore.useQueryStore.commitTransaction has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.openSavedSql (cyclomatic 16) · ×1
  • queryStore.useQueryStore.openSavedSql (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:6576 — queryStore.useQueryStore.openSavedSql has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · queryStore.useQueryStore.restoreCachedResultPayload (cyclomatic 16) · ×1
  • queryStore.useQueryStore.restoreCachedResultPayload (cyclomatic 16) apps/desktop/src/stores/queryStore.ts:10792 — queryStore.useQueryStore.restoreCachedResultPayload has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · savedSqlStore.useSavedSqlStore.reserveFileName (cyclomatic 16) · ×1
  • savedSqlStore.useSavedSqlStore.reserveFileName (cyclomatic 16) apps/desktop/src/stores/savedSqlStore.ts:409 — savedSqlStore.useSavedSqlStore.reserveFileName has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · settingsStore.normalizeTabGroupCustomizations (cyclomatic 16) · ×1
  • settingsStore.normalizeTabGroupCustomizations (cyclomatic 16) apps/desktop/src/stores/settingsStore.ts:1696 — settingsStore.normalizeTabGroupCustomizations has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · platformDetection.detectPlatformId (cyclomatic 16) · ×1
  • platformDetection.detectPlatformId (cyclomatic 16) docs/lib/platformDetection.ts:22 — platformDetection.detectPlatformId has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · seedApi (cyclomatic 16) · ×1
  • seedApi (cyclomatic 16) .github/ui-preview/seed.mjs:130 — seedApi has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 8 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D10 · Test Quality · No assertions · ×1
  • No assertions: removes a previous mode's function signature when the mode changes apps/desktop/src/components/editor/__tests__/QueryEditor.kingbase.integration.spec.ts:98 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D12 · Dependency Hygiene · No REDACTED committed (plugins/sdk/cli/templates/go/backend/go.mod) · ×1
  • No REDACTED committed (plugins/sdk/cli/templates/go/backend/go.mod) — plugins/sdk/cli/templates/go/backend/go.mod requires 1 module(s) but no `REDACTED` is committed beside it, so nothing records the expected checksum of the code this module builds against — `go build` accepts whatever the module proxy serves, and two builds of this commit are not guaranteed to be the same build. Run `go mod tidy` and commit the resulting `REDACTED`.
D2 · Cognitive Complexity · queryStore.useQueryStore.executeTabSql (cognitive 683) · ×1
  • queryStore.useQueryStore.executeTabSql (cognitive 683) apps/desktop/src/stores/queryStore.ts:8102 — queryStore.useQueryStore.executeTabSql has cognitive complexity 683 (threshold 15). Drivers by points: if/else 204 (403 pts), boolean chains 171, ternaries 75 (169 pts), error handling 7 (17 pts), loops 7 (13 pts), match/switch 1 (3 pts) (nesting depth added 311). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (queryStore.useQueryStore.executeTabSql::bindLargeValueContext, queryStore.useQueryStore.executeTabSql::executeWithoutManualTransaction) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · queryStore.useQueryStore.fetchCapturedTabResultForExport (cognitive 272) · ×1
  • queryStore.useQueryStore.fetchCapturedTabResultForExport (cognitive 272) apps/desktop/src/stores/queryStore.ts:10991 — queryStore.useQueryStore.fetchCapturedTabResultForExport has cognitive complexity 272 (threshold 15). Drivers by points: if/else 66 (134 pts), boolean chains 63, ternaries 31 (60 pts), error handling 6 (10 pts), loops 3 (5 pts) (nesting depth added 103). Of this number, 226 points are the body's own statements and 46 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHostBridge.dispatch (cognitive 261) · ×1
  • PluginHostBridge.dispatch (cognitive 261) REDACTED:648 — PluginHostBridge.dispatch has cognitive complexity 261 (threshold 15). Drivers by points: if/else 119 (193 pts), ternaries 21 (42 pts), boolean chains 20, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 98). Of this number, 259 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsStore.useSettingsStore.applyEditorSettingsPatch (cognitive 254) · ×1
  • settingsStore.useSettingsStore.applyEditorSettingsPatch (cognitive 254) apps/desktop/src/stores/settingsStore.ts:3005 — settingsStore.useSettingsStore.applyEditorSettingsPatch has cognitive complexity 254 (threshold 15). Drivers by points: if/else 241 (242 pts), boolean chains 12 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Plan.read (cognitive 220) · ×1
  • Plan.read (cognitive 220) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:510 — Plan.read has cognitive complexity 220 (threshold 15). Drivers by points: if/else 40 (119 pts), ternaries 14 (50 pts), error handling 8 (32 pts), boolean chains 18, loops 1 (nesting depth added 139). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · oracleTypeManagement.prepareOracleTypeManagement (cognitive 208) · ×1
  • oracleTypeManagement.prepareOracleTypeManagement (cognitive 208) apps/desktop/src/lib/table/oracleTypeManagement.ts:230 — oracleTypeManagement.prepareOracleTypeManagement has cognitive complexity 208 (threshold 15). Drivers by points: if/else 53 (105 pts), boolean chains 49, loops 12 (23 pts), ternaries 9 (23 pts), error handling 4 (8 pts) (nesting depth added 81). Of this number, 196 points are the body's own statements and 12 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferDdl.rewriteCreateTableName (cognitive 188) · ×1
  • queryResultTransferDdl.rewriteCreateTableName (cognitive 188) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:231 — queryResultTransferDdl.rewriteCreateTableName has cognitive complexity 188 (threshold 15). Drivers by points: if/else 43 (112 pts), ternaries 10 (35 pts), boolean chains 29, loops 5 (12 pts) (nesting depth added 101). Of this number, 179 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cognitive 184) · ×1
  • useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown (cognitive 184) apps/desktop/src/components/editor/useQueryEditorObjectNavigation.ts:91 — useQueryEditorObjectNavigation.useQueryEditorObjectNavigation.onEditorMouseDown has cognitive complexity 184 (threshold 15). Drivers by points: if/else 56 (124 pts), boolean chains 34, ternaries 12 (17 pts), error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 77). Most of this is not in the body itself: 14 of the 184 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 133, 221, 220, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tableColumnDefinitionPaste.parseColumn (cognitive 183) · ×1
  • tableColumnDefinitionPaste.parseColumn (cognitive 183) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:156 — tableColumnDefinitionPaste.parseColumn has cognitive complexity 183 (threshold 15). Drivers by points: if/else 66 (140 pts), boolean chains 29, ternaries 3 (9 pts), loops 3 (5 pts) (nesting depth added 82). Of this number, 168 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlStatementRanges.splitSqlStatementRanges (cognitive 181) · ×1
  • sqlStatementRanges.splitSqlStatementRanges (cognitive 181) apps/desktop/src/lib/sql/sqlStatementRanges.ts:411 — sqlStatementRanges.splitSqlStatementRanges has cognitive complexity 181 (threshold 15). Drivers by points: if/else 55 (141 pts), boolean chains 29, loops 2 (6 pts), ternaries 2 (5 pts) (nesting depth added 93). Of this number, 170 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SqlStatementSplitter · ×1
  • SqlStatementSplitter::push_chunk_with_control (cognitive 175) crates/dbx-sql-core/src/sql.rs:742 — SqlStatementSplitter::push_chunk_with_control has cognitive complexity 175 (threshold 15). Drivers by points: if/else 47 (133 pts), boolean chains 30, loops 3 (10 pts), match/switch 1 (2 pts) (nesting depth added 94). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.explainTabSql (cognitive 174) · ×1
  • queryStore.useQueryStore.explainTabSql (cognitive 174) apps/desktop/src/stores/queryStore.ts:10029 — queryStore.useQueryStore.explainTabSql has cognitive complexity 174 (threshold 15). Drivers by points: if/else 58 (112 pts), ternaries 11 (25 pts), error handling 11 (23 pts), boolean chains 14 (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.queryResultTransferTargetType (cognitive 166) · ×1
  • queryResultTransferValues.queryResultTransferTargetType (cognitive 166) apps/desktop/src/components/transfer/queryResultTransferValues.ts:158 — queryResultTransferValues.queryResultTransferTargetType has cognitive complexity 166 (threshold 15). Drivers by points: if/else 61 (115 pts), ternaries 10 (28 pts), boolean chains 23 (nesting depth added 72). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · JsonRpcServer.dispatch (cognitive 164) · ×1
  • JsonRpcServer.dispatch (cognitive 164) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:211 — JsonRpcServer.dispatch has cognitive complexity 164 (threshold 15). Drivers by points: if/else 78 (112 pts), ternaries 9 (22 pts), boolean chains 15, error handling 5 (11 pts), loops 2 (4 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cognitive 164) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult (cognitive 164) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1582 — useQueryEditorCompletion.useQueryEditorCompletion.performAsyncCompletionWithResult has cognitive complexity 164 (threshold 15). Drivers by points: if/else 52 (90 pts), boolean chains 35, ternaries 14 (27 pts), error handling 3 (7 pts), loops 3 (5 pts) (nesting depth added 57). Of this number, 132 points are the body's own statements and 32 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMockHost (cognitive 160) · ×1
  • createMockHost (cognitive 160) plugins/sdk/dev-host/server.mjs:77 — createMockHost has cognitive complexity 160 (threshold 15). Drivers by points: if/else 40 (68 pts), boolean chains 35, ternaries 16 (30 pts), error handling 10 (15 pts), loops 6 (10 pts), other 2 (nesting depth added 51). Of this number, 22 points are the body's own statements and 138 belong to 28 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.compressSqlText (cognitive 153) · ×1
  • sqlFormatter.compressSqlText (cognitive 153) apps/desktop/src/lib/sql/sqlFormatter.ts:982 — sqlFormatter.compressSqlText has cognitive complexity 153 (threshold 15). Drivers by points: if/else 34 (89 pts), boolean chains 29, loops 10 (22 pts), ternaries 4 (13 pts) (nesting depth added 76). Of this number, 133 points are the body's own statements and 20 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsStore.normalizeEditorSettings (cognitive 150) · ×1
  • settingsStore.normalizeEditorSettings (cognitive 150) apps/desktop/src/stores/settingsStore.ts:2014 — settingsStore.normalizeEditorSettings has cognitive complexity 150 (threshold 15). Drivers by points: ternaries 109 (119 pts), boolean chains 28, if/else 3 (nesting depth added 10). Of this number, 139 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlDebugObjectConstructors.parse (cognitive 139) · ×1
  • PlDebugObjectConstructors.parse (cognitive 139) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:175 — PlDebugObjectConstructors.parse has cognitive complexity 139 (threshold 15). Drivers by points: if/else 42 (102 pts), boolean chains 20, loops 7 (13 pts), ternaries 2 (4 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canvasDataGridRenderer.drawCanvasDataGrid (cognitive 133) · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid (cognitive 133) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:406 — canvasDataGridRenderer.drawCanvasDataGrid has cognitive complexity 133 (threshold 15). Drivers by points: ternaries 32 (118 pts), if/else 37 (73 pts), boolean chains 39, loops 5 (9 pts) (nesting depth added 126). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid::drawCell) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.saveChanges (cognitive 129) · ×1
  • useDataGridEditor.useDataGridEditor.saveChanges (cognitive 129) apps/desktop/src/composables/useDataGridEditor.ts:2440 — useDataGridEditor.useDataGridEditor.saveChanges has cognitive complexity 129 (threshold 15). Drivers by points: if/else 51 (80 pts), error handling 12 (22 pts), boolean chains 20, ternaries 4 (5 pts), loops 1 (2 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.maskStringAndCommentSpans (cognitive 126) · ×1
  • sqlFormatter.maskStringAndCommentSpans (cognitive 126) apps/desktop/src/lib/sql/sqlFormatter.ts:613 — sqlFormatter.maskStringAndCommentSpans has cognitive complexity 126 (threshold 15). Drivers by points: if/else 29 (78 pts), boolean chains 26, loops 8 (20 pts), ternaries 2 (nesting depth added 61). Of this number, 116 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportLocalSnapshot (cognitive 125) · ×1
  • useDataGridExport.useDataGridExport.exportLocalSnapshot (cognitive 125) apps/desktop/src/composables/useDataGridExport.ts:1139 — useDataGridExport.useDataGridExport.exportLocalSnapshot has cognitive complexity 125 (threshold 15). Drivers by points: if/else 38 (46 pts), boolean chains 36, ternaries 25 (29 pts), error handling 5 (9 pts), loops 2 (5 pts) (nesting depth added 19). Of this number, 47 points are the body's own statements and 78 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cognitive 125) · ×1
  • useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData (cognitive 125) apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38 — useSidebarDataOpenRuntime.useSidebarDataOpenRuntime.openData has cognitive complexity 125 (threshold 15). Drivers by points: if/else 49 (66 pts), boolean chains 32, ternaries 16 (22 pts), error handling 4 (5 pts) (nesting depth added 24). Of this number, 104 points are the body's own statements and 21 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.executeTargetSql (cognitive 125) · ×1
  • useSqlExecution.useSqlExecution.executeTargetSql (cognitive 125) apps/desktop/src/composables/useSqlExecution.ts:625 — useSqlExecution.useSqlExecution.executeTargetSql has cognitive complexity 125 (threshold 15). Drivers by points: if/else 45 (67 pts), ternaries 16 (29 pts), boolean chains 18, error handling 5 (7 pts), loops 2 (4 pts) (nesting depth added 39). Of this number, 107 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MysqlDumpBinaryLiteralNormalizer · ×1
  • MysqlDumpBinaryLiteralNormalizer::normalize (cognitive 123) REDACTED:1701 — MysqlDumpBinaryLiteralNormalizer::normalize has cognitive complexity 123 (threshold 15). Drivers by points: if/else 36 (91 pts), boolean chains 13, match/switch 4 (13 pts), loops 2 (6 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.executeOracleRoutineRename (cognitive 120) · ×1
  • oracleRoutineRename.executeOracleRoutineRename (cognitive 120) apps/desktop/src/lib/table/oracleRoutineRename.ts:470 — oracleRoutineRename.executeOracleRoutineRename has cognitive complexity 120 (threshold 15). Drivers by points: if/else 34 (79 pts), boolean chains 22, ternaries 3 (11 pts), error handling 3 (7 pts), loops 1 (nesting depth added 57). Of this number, 118 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.buildGroupedObjectTreeNodes (cognitive 120) · ×1
  • tableTree.buildGroupedObjectTreeNodes (cognitive 120) apps/desktop/src/lib/table/tableTree.ts:999 — tableTree.buildGroupedObjectTreeNodes has cognitive complexity 120 (threshold 15). Drivers by points: ternaries 27 (83 pts), boolean chains 19, if/else 7 (16 pts), loops 2 (nesting depth added 65). Of this number, 35 points are the body's own statements and 85 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 119) · ×1
  • main (cognitive 119) REDACTED:593 — main has cognitive complexity 119 (threshold 15). Drivers by points: error handling 13 (46 pts), if/else 11 (36 pts), loops 6 (19 pts), boolean chains 11, ternaries 5 (7 pts) (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.findSqlParameterOccurrences (cognitive 118) · ×1
  • sqlParameters.findSqlParameterOccurrences (cognitive 118) apps/desktop/src/lib/sql/sqlParameters.ts:408 — sqlParameters.findSqlParameterOccurrences has cognitive complexity 118 (threshold 15). Drivers by points: if/else 36 (90 pts), boolean chains 22, ternaries 5, loops 1 (nesting depth added 54). Of this number, 116 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doltVersionControl.layoutDoltCommitGraph (cognitive 117) · ×1
  • doltVersionControl.layoutDoltCommitGraph (cognitive 117) apps/desktop/src/lib/dolt/doltVersionControl.ts:467 — doltVersionControl.layoutDoltCommitGraph has cognitive complexity 117 (threshold 15). Drivers by points: if/else 27 (68 pts), loops 10 (19 pts), boolean chains 16, ternaries 6 (14 pts) (nesting depth added 58). Of this number, 64 points are the body's own statements and 53 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.onReloadData (cognitive 116) · ×1
  • useDataGridActions.useDataGridActions.onReloadData (cognitive 116) apps/desktop/src/composables/useDataGridActions.ts:319 — useDataGridActions.useDataGridActions.onReloadData has cognitive complexity 116 (threshold 15). Drivers by points: if/else 28 (58 pts), boolean chains 24, ternaries 10 (22 pts), error handling 4 (12 pts) (nesting depth added 50). Of this number, 105 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadDatabases (cognitive 116) · ×1
  • connectionStore.useConnectionStore.loadDatabases (cognitive 116) apps/desktop/src/stores/connectionStore.ts:6018 — connectionStore.useConnectionStore.loadDatabases has cognitive complexity 116 (threshold 15). Drivers by points: if/else 40 (91 pts), boolean chains 15, ternaries 4 (9 pts), error handling 1 (nesting depth added 56). Most of this is not in the body itself: 4 of the 116 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6036, 6178). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cognitive 115) · ×1
  • oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan (cognitive 115) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:260 — oceanbasePrimaryKey.executeOceanbasePrimaryKeyPlan has cognitive complexity 115 (threshold 15). Drivers by points: if/else 29 (60 pts), ternaries 10 (26 pts), boolean chains 20, error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoWriteCommand (cognitive 115) · ×1
  • mongoShellCommand.parseMongoWriteCommand (cognitive 115) REDACTED:912 — mongoShellCommand.parseMongoWriteCommand has cognitive complexity 115 (threshold 15). Drivers by points: if/else 38 (67 pts), ternaries 13 (27 pts), boolean chains 19, loops 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Loader.load (cognitive 114) · ×1
  • Loader.load (cognitive 114) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:66 — Loader.load has cognitive complexity 114 (threshold 15). Drivers by points: if/else 24 (68 pts), loops 13 (29 pts), boolean chains 12, ternaries 2 (5 pts) (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.buildNativeJobDefinitionEdit (cognitive 113) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionEdit (cognitive 113) apps/desktop/src/lib/database/nativeJobAdmin.ts:147 — nativeJobAdmin.buildNativeJobDefinitionEdit has cognitive complexity 113 (threshold 15). Drivers by points: if/else 29 (42 pts), ternaries 16 (42 pts), boolean chains 24, loops 3 (5 pts) (nesting depth added 41). Of this number, 103 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.executeOracleConstraintPlan (cognitive 113) · ×1
  • oracleConstraints.executeOracleConstraintPlan (cognitive 113) apps/desktop/src/lib/database/oracleConstraints.ts:720 — oracleConstraints.executeOracleConstraintPlan has cognitive complexity 113 (threshold 15). Drivers by points: if/else 35 (63 pts), boolean chains 22, ternaries 7 (15 pts), error handling 5 (12 pts), loops 1 (nesting depth added 43). Of this number, 111 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cognitive 111) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions (cognitive 111) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:774 — useQueryEditorCompletion.useQueryEditorCompletion.provideSqlCompletions has cognitive complexity 111 (threshold 15). Drivers by points: if/else 47 (74 pts), boolean chains 24, error handling 4 (8 pts), ternaries 3 (5 pts) (nesting depth added 33). Of this number, 106 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.buildDefaultGeneratorParams (cognitive 111) · ×1
  • dataGenerate.buildDefaultGeneratorParams (cognitive 111) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1259 — dataGenerate.buildDefaultGeneratorParams has cognitive complexity 111 (threshold 15). Drivers by points: if/else 72 (94 pts), boolean chains 17 (nesting depth added 22). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · oracleTableRename.prepareOracleTableRename (cognitive 111) · ×1
  • oracleTableRename.prepareOracleTableRename (cognitive 111) REDACTED:542 — oracleTableRename.prepareOracleTableRename has cognitive complexity 111 (threshold 15). Drivers by points: if/else 27 (59 pts), ternaries 7 (22 pts), boolean chains 17, error handling 4 (7 pts), loops 4 (6 pts) (nesting depth added 52). Of this number, 100 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cognitive 108) · ×1
  • useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip (cognitive 108) apps/desktop/src/components/editor/useQueryEditorHover.ts:83 — useQueryEditorHover.useQueryEditorHover.resolveSqlHoverTooltip has cognitive complexity 108 (threshold 15). Drivers by points: if/else 25 (45 pts), ternaries 19 (28 pts), boolean chains 22, error handling 5 (12 pts), loops 1 (nesting depth added 36). Of this number, 89 points are the body's own statements and 19 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlRoutineVariables.collectMysqlRoutineVariables (cognitive 108) · ×1
  • mysqlRoutineVariables.collectMysqlRoutineVariables (cognitive 108) apps/desktop/src/lib/sql/mysqlRoutineVariables.ts:34 — mysqlRoutineVariables.collectMysqlRoutineVariables has cognitive complexity 108 (threshold 15). Drivers by points: if/else 27 (74 pts), boolean chains 21, loops 5 (11 pts), ternaries 1 (2 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.convertToSchemaDiffObjects (cognitive 106) · ×1
  • schemaDiff.convertToSchemaDiffObjects (cognitive 106) apps/desktop/src/lib/schema/schemaDiff.ts:686 — schemaDiff.convertToSchemaDiffObjects has cognitive complexity 106 (threshold 15). Drivers by points: ternaries 31 (75 pts), if/else 4 (13 pts), loops 7 (10 pts), boolean chains 8 (nesting depth added 56). Of this number, 75 points are the body's own statements and 31 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.executeOracleTableRename (cognitive 104) · ×1
  • oracleTableRename.executeOracleTableRename (cognitive 104) REDACTED:825 — oracleTableRename.executeOracleTableRename has cognitive complexity 104 (threshold 15). Drivers by points: if/else 33 (71 pts), boolean chains 15, ternaries 5 (14 pts), error handling 2 (3 pts), loops 1 (nesting depth added 48). Of this number, 102 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.resolve (cognitive 100) · ×1
  • PlDebugTarget.resolve (cognitive 100) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:803 — PlDebugTarget.resolve has cognitive complexity 100 (threshold 15). Drivers by points: if/else 30 (63 pts), boolean chains 17, ternaries 9 (15 pts), loops 4 (5 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.executeOracleForeignKeyPlan (cognitive 100) · ×1
  • oracleForeignKeys.executeOracleForeignKeyPlan (cognitive 100) apps/desktop/src/lib/database/oracleForeignKeys.ts:699 — oracleForeignKeys.executeOracleForeignKeyPlan has cognitive complexity 100 (threshold 15). Drivers by points: if/else 31 (61 pts), boolean chains 25, ternaries 5 (9 pts), error handling 2 (3 pts), loops 2 (nesting depth added 35). Of this number, 98 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oraclePackageSource.rewriteOraclePackageSource (cognitive 100) · ×1
  • oraclePackageSource.rewriteOraclePackageSource (cognitive 100) apps/desktop/src/lib/table/oraclePackageSource.ts:103 — oraclePackageSource.rewriteOraclePackageSource has cognitive complexity 100 (threshold 15). Drivers by points: if/else 29 (61 pts), boolean chains 20, loops 8 (16 pts), ternaries 2 (3 pts) (nesting depth added 41). Of this number, 93 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.topLevelSoftStatementLineStarts (cognitive 99) · ×1
  • sqlStatementRanges.topLevelSoftStatementLineStarts (cognitive 99) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1185 — sqlStatementRanges.topLevelSoftStatementLineStarts has cognitive complexity 99 (threshold 15). Drivers by points: if/else 34 (87 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tokens.tokenizeSqlSemantic (cognitive 99) · ×1
  • tokens.tokenizeSqlSemantic (cognitive 99) apps/desktop/src/lib/sql/semantic/tokens.ts:106 — tokens.tokenizeSqlSemantic has cognitive complexity 99 (threshold 15). Drivers by points: if/else 20 (47 pts), boolean chains 25, loops 7 (19 pts), ternaries 3 (8 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyTree.buildRedisKeySnapshotCooperatively (cognitive 98) · ×1
  • redisKeyTree.buildRedisKeySnapshotCooperatively (cognitive 98) apps/desktop/src/lib/redis/redisKeyTree.ts:303 — redisKeyTree.buildRedisKeySnapshotCooperatively has cognitive complexity 98 (threshold 15). Drivers by points: if/else 23 (64 pts), loops 9 (20 pts), boolean chains 12, ternaries 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starrocksAlterOptions.starRocksAlterOptionsFromDdl (cognitive 98) · ×1
  • starrocksAlterOptions.starRocksAlterOptionsFromDdl (cognitive 98) apps/desktop/src/lib/table/starrocksAlterOptions.ts:45 — starrocksAlterOptions.starRocksAlterOptionsFromDdl has cognitive complexity 98 (threshold 15). Drivers by points: if/else 24 (48 pts), boolean chains 34, ternaries 5 (9 pts), loops 4 (7 pts) (nesting depth added 31). Of this number, 80 points are the body's own statements and 18 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.topLevelWordsInRange (cognitive 97) · ×1
  • sqlStatementRanges.topLevelWordsInRange (cognitive 97) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1442 — sqlStatementRanges.topLevelWordsInRange has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (89 pts), boolean chains 7, loops 1 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.scanMongoCallArguments (cognitive 96) · ×1
  • mongoCompletion.scanMongoCallArguments (cognitive 96) REDACTED:871 — mongoCompletion.scanMongoCallArguments has cognitive complexity 96 (threshold 15). Drivers by points: if/else 22 (64 pts), boolean chains 16, ternaries 6 (15 pts), loops 1 (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Plan.render (cognitive 94) · ×1
  • Plan.render (cognitive 94) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:262 — Plan.render has cognitive complexity 94 (threshold 15). Drivers by points: if/else 38 (63 pts), loops 13 (18 pts), ternaries 4 (9 pts), boolean chains 4 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabDisplayTitle (cognitive 94) · ×1
  • tabPresentation.tabDisplayTitle (cognitive 94) apps/desktop/src/lib/tabs/tabPresentation.ts:270 — tabPresentation.tabDisplayTitle has cognitive complexity 94 (threshold 15). Drivers by points: if/else 47 (72 pts), ternaries 6 (12 pts), boolean chains 10 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginDetailClient.PluginDetailClient (cognitive 94) · ×1
  • PluginDetailClient.PluginDetailClient (cognitive 94) docs/app/[lang]/plugins/[id]/PluginDetailClient.tsx:107 — PluginDetailClient.PluginDetailClient has cognitive complexity 94 (threshold 15). Drivers by points: ternaries 25 (78 pts), if/else 11, boolean chains 5 (nesting depth added 53). Of this number, 56 points are the body's own statements and 38 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlStatementRanges.oraclePlSqlBlockEnd (cognitive 92) · ×1
  • sqlStatementRanges.oraclePlSqlBlockEnd (cognitive 92) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2589 — sqlStatementRanges.oraclePlSqlBlockEnd has cognitive complexity 92 (threshold 15). Drivers by points: if/else 26 (64 pts), boolean chains 14, ternaries 5 (13 pts), loops 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.injectColumnRenameSql (cognitive 92) · ×1
  • schemaDiff.injectColumnRenameSql (cognitive 92) apps/desktop/src/lib/schema/schemaDiff.ts:1025 — schemaDiff.injectColumnRenameSql has cognitive complexity 92 (threshold 15). Drivers by points: if/else 16 (47 pts), loops 9 (22 pts), boolean chains 15, ternaries 2 (8 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.setSchemaDiffObjectSelectedWithDependencies · ×1
  • schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply (cognitive 90) apps/desktop/src/lib/schema/schemaDiff.ts:1203 — schemaDiff.setSchemaDiffObjectSelectedWithDependencies::apply has cognitive complexity 90 (threshold 15). Drivers by points: if/else 20 (54 pts), loops 7 (19 pts), boolean chains 11, ternaries 3 (6 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyStageOptions (cognitive 88) · ×1
  • mongoCompletion.classifyStageOptions (cognitive 88) REDACTED:1644 — mongoCompletion.classifyStageOptions has cognitive complexity 88 (threshold 15). Drivers by points: if/else 27 (68 pts), ternaries 5 (14 pts), boolean chains 6 (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · graphCompletion.getGraphCompletionContext (cognitive 87) · ×1
  • graphCompletion.getGraphCompletionContext (cognitive 87) apps/desktop/src/lib/graph/graphCompletion.ts:23 — graphCompletion.getGraphCompletionContext has cognitive complexity 87 (threshold 15). Drivers by points: if/else 31 (59 pts), boolean chains 19, loops 5 (9 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeContext (cognitive 87) · ×1
  • codeContext (cognitive 87) REDACTED:164 — codeContext has cognitive complexity 87 (threshold 15). Drivers by points: if/else 14 (47 pts), loops 9 (24 pts), boolean chains 6, ternaries 3 (5 pts), error handling 2 (4 pts), other 1 (nesting depth added 52). Of this number, 73 points are the body's own statements and 14 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.scalarInput (cognitive 86) · ×1
  • PlDebugTarget.scalarInput (cognitive 86) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:986 — PlDebugTarget.scalarInput has cognitive complexity 86 (threshold 15). Drivers by points: if/else 31 (51 pts), ternaries 6 (20 pts), boolean chains 13, error handling 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrlBuilder.buildSpecialJdbcUrl (cognitive 86) · ×1
  • connectionUrlBuilder.buildSpecialJdbcUrl (cognitive 86) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:367 — connectionUrlBuilder.buildSpecialJdbcUrl has cognitive complexity 86 (threshold 15). Drivers by points: ternaries 23 (47 pts), if/else 11 (23 pts), boolean chains 15, match/switch 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printer.printRuleElement (cognitive 86) · ×1
  • printer.printRuleElement (cognitive 86) apps/desktop/src/lib/sql/layout/printer.ts:252 — printer.printRuleElement has cognitive complexity 86 (threshold 15). Drivers by points: if/else 29 (54 pts), ternaries 6 (20 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · aliasHighlights.sqlAliasHighlightGroups (cognitive 86) · ×1
  • aliasHighlights.sqlAliasHighlightGroups (cognitive 86) apps/desktop/src/lib/sql/semantic/aliasHighlights.ts:34 — aliasHighlights.sqlAliasHighlightGroups has cognitive complexity 86 (threshold 15). Drivers by points: if/else 22 (54 pts), loops 10 (16 pts), boolean chains 15, ternaries 1 (nesting depth added 38). Of this number, 83 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphCompletionScope.graphCompletionScope (cognitive 85) · ×1
  • graphCompletionScope.graphCompletionScope (cognitive 85) apps/desktop/src/lib/graph/graphCompletionScope.ts:41 — graphCompletionScope.graphCompletionScope has cognitive complexity 85 (threshold 15). Drivers by points: if/else 18 (54 pts), boolean chains 13, ternaries 4 (13 pts), loops 2 (5 pts) (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SqlCompletionProvider.build (cognitive 85) · ×1
  • SqlCompletionProvider.build (cognitive 85) apps/desktop/src/lib/sql/sqlCompletion.ts:1997 — SqlCompletionProvider.build has cognitive complexity 85 (threshold 15). Drivers by points: if/else 32 (48 pts), boolean chains 28, ternaries 3 (7 pts), loops 1 (2 pts) (nesting depth added 21). Of this number, 84 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.buildSimpleObjectTreeNodes (cognitive 85) · ×1
  • tableTree.buildSimpleObjectTreeNodes (cognitive 85) apps/desktop/src/lib/table/tableTree.ts:685 — tableTree.buildSimpleObjectTreeNodes has cognitive complexity 85 (threshold 15). Drivers by points: ternaries 18 (55 pts), boolean chains 15, if/else 7 (14 pts), loops 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · run_proof.main (cognitive 84) · ×1
  • run_proof.main (cognitive 84) scripts/ai-proxy-12277/run_proof.py:32 — run_proof.main has cognitive complexity 84 (threshold 15). Drivers by points: if/else 24 (38 pts), ternaries 6 (16 pts), loops 7 (14 pts), boolean chains 13, error handling 2 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cognitive 84) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx (cognitive 84) apps/desktop/src/composables/useDataGridExport.ts:1929 — useDataGridExport.useDataGridExport.exportMemoryResultSheetsXlsx has cognitive complexity 84 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 21, ternaries 12 (16 pts), error handling 4 (7 pts), loops 3 (6 pts) (nesting depth added 23). Most of this is not in the body itself: 12 of the 84 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 2025, a function literal at line 2019, resourcesCurrent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cognitive 84) · ×1
  • useQuickOpen.useQuickOpen.processDatabaseTreeNodes (cognitive 84) apps/desktop/src/composables/useQuickOpen.ts:612 — useQuickOpen.useQuickOpen.processDatabaseTreeNodes has cognitive complexity 84 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 29, ternaries 8 (24 pts), loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cognitive 84) · ×1
  • connectionStore.useConnectionStore.loadMoreObjectGroupChildren (cognitive 84) apps/desktop/src/stores/connectionStore.ts:7604 — connectionStore.useConnectionStore.loadMoreObjectGroupChildren has cognitive complexity 84 (threshold 15). Drivers by points: if/else 27 (40 pts), boolean chains 33, ternaries 6 (10 pts), error handling 1 (nesting depth added 17). Most of this is not in the body itself: 11 of the 84 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 7647, searchIsCurrent, a function literal at line 7680, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.listCompletionObjects (cognitive 84) · ×1
  • connectionStore.useConnectionStore.listCompletionObjects (cognitive 84) apps/desktop/src/stores/connectionStore.ts:10082 — connectionStore.useConnectionStore.listCompletionObjects has cognitive complexity 84 (threshold 15). Drivers by points: if/else 18 (40 pts), ternaries 9 (24 pts), boolean chains 13, error handling 2 (7 pts) (nesting depth added 42). Most of this is not in the body itself: 15 of the 84 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 10108, 10149). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlCompletion.getFunctionDescriptions (cognitive 83) · ×1
  • sqlCompletion.getFunctionDescriptions (cognitive 83) apps/desktop/src/lib/sql/sqlCompletion.ts:1051 — sqlCompletion.getFunctionDescriptions has cognitive complexity 83 (threshold 15). Drivers by points: boolean chains 83. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTreeNodeChildren (cognitive 83) · ×1
  • connectionStore.useConnectionStore.loadTreeNodeChildren (cognitive 83) apps/desktop/src/stores/connectionStore.ts:8584 — connectionStore.useConnectionStore.loadTreeNodeChildren has cognitive complexity 83 (threshold 15). Drivers by points: if/else 47 (51 pts), boolean chains 32 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sqlStatementRanges.trimRangeEndBeforeNextBoundary (cognitive 82) · ×1
  • sqlStatementRanges.trimRangeEndBeforeNextBoundary (cognitive 82) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1880 — sqlStatementRanges.trimRangeEndBeforeNextBoundary has cognitive complexity 82 (threshold 15). Drivers by points: if/else 29 (75 pts), boolean chains 6, loops 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openTabsPersistence.serializeOpenTabs (cognitive 81) · ×1
  • openTabsPersistence.serializeOpenTabs (cognitive 81) apps/desktop/src/lib/app/openTabsPersistence.ts:180 — openTabsPersistence.serializeOpenTabs has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 61 (71 pts), boolean chains 10 (nesting depth added 10). None of this is in the body itself: all 81 points belong to 2 function literals inside it that branch (lines 181, 243). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plDebugComposite.compositeInputComplete (cognitive 81) · ×1
  • plDebugComposite.compositeInputComplete (cognitive 81) apps/desktop/src/lib/debug/plDebugComposite.ts:91 — plDebugComposite.compositeInputComplete has cognitive complexity 81 (threshold 15). Drivers by points: if/else 33 (57 pts), boolean chains 22, ternaries 1 (2 pts) (nesting depth added 25). Of this number, 59 points are the body's own statements and 22 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · database-env.validateRecipe (cognitive 81) · ×1
  • database-env.validateRecipe (cognitive 81) scripts/database-env.mjs:235 — database-env.validateRecipe has cognitive complexity 81 (threshold 15). Drivers by points: if/else 34 (56 pts), boolean chains 17, loops 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cognitive 80) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult (cognitive 80) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1171 — useQueryEditorCompletion.useQueryEditorCompletion.buildLocalSqlCompletionResult has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 17 (37 pts), if/else 14 (24 pts), boolean chains 18, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportMemoryDataFile (cognitive 80) · ×1
  • useDataGridExport.useDataGridExport.exportMemoryDataFile (cognitive 80) apps/desktop/src/composables/useDataGridExport.ts:1373 — useDataGridExport.useDataGridExport.exportMemoryDataFile has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 20 (29 pts), if/else 22 (27 pts), boolean chains 22, error handling 1 (2 pts) (nesting depth added 15). Of this number, 35 points are the body's own statements and 45 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cognitive 80) · ×1
  • oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot (cognitive 80) apps/desktop/src/lib/database/oceanbasePrimaryKey.ts:111 — oceanbasePrimaryKey.readOceanbasePrimaryKeySnapshot has cognitive complexity 80 (threshold 15). Drivers by points: if/else 28 (43 pts), boolean chains 28, ternaries 6, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.mutateBreakpoint (cognitive 79) · ×1
  • PlDebugSession.mutateBreakpoint (cognitive 79) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:788 — PlDebugSession.mutateBreakpoint has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (53 pts), boolean chains 15, ternaries 4 (7 pts), loops 1 (3 pts), error handling 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.runDebuggeeTarget (cognitive 79) · ×1
  • PlDebugSession.runDebuggeeTarget (cognitive 79) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2284 — PlDebugSession.runDebuggeeTarget has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 17 (39 pts), if/else 20 (31 pts), error handling 4 (6 pts), boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSchemaDiffSession.runSchemaDiffSession (cognitive 79) · ×1
  • useSchemaDiffSession.runSchemaDiffSession (cognitive 79) apps/desktop/src/composables/useSchemaDiffSession.ts:163 — useSchemaDiffSession.runSchemaDiffSession has cognitive complexity 79 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 27, ternaries 12 (13 pts), loops 3 (6 pts), error handling 1 (nesting depth added 18). Of this number, 77 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.generateValue (cognitive 79) · ×1
  • dataGenerate.generateValue (cognitive 79) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1610 — dataGenerate.generateValue has cognitive complexity 79 (threshold 15). Drivers by points: if/else 34 (51 pts), ternaries 7 (15 pts), boolean chains 7, loops 2 (6 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoFormatter.formatMongoShellText (cognitive 79) · ×1
  • mongoFormatter.formatMongoShellText (cognitive 79) apps/desktop/src/lib/mongo/mongoFormatter.ts:20 — mongoFormatter.formatMongoShellText has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 13, loops 1, ternaries 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarMenuLayout.buildSidebarMenuLayout (cognitive 79) · ×1
  • sidebarMenuLayout.buildSidebarMenuLayout (cognitive 79) apps/desktop/src/lib/sidebar/sidebarMenuLayout.ts:174 — sidebarMenuLayout.buildSidebarMenuLayout has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 13 (47 pts), if/else 11 (17 pts), boolean chains 13, loops 2 (nesting depth added 40). Of this number, 78 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mongoSql.tokenize (cognitive 78) · ×1
  • mongoSql.tokenize (cognitive 78) apps/desktop/src/lib/mongo/mongoSql.ts:577 — mongoSql.tokenize has cognitive complexity 78 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 8 (23 pts), boolean chains 16, ternaries 1 (3 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedisKeyGroupIndex.project (cognitive 78) · ×1
  • RedisKeyGroupIndex.project (cognitive 78) apps/desktop/src/lib/redis/redisKeyGroupIndex.ts:124 — RedisKeyGroupIndex.project has cognitive complexity 78 (threshold 15). Drivers by points: if/else 22 (46 pts), loops 7 (14 pts), ternaries 8 (10 pts), boolean chains 8 (nesting depth added 33). Of this number, 55 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.invalidateCompletionCache (cognitive 78) · ×1
  • connectionStore.useConnectionStore.invalidateCompletionCache (cognitive 78) apps/desktop/src/stores/connectionStore.ts:4491 — connectionStore.useConnectionStore.invalidateCompletionCache has cognitive complexity 78 (threshold 15). Drivers by points: if/else 22 (42 pts), loops 20, boolean chains 14, ternaries 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.queryResultTransferSqlLiteral (cognitive 77) · ×1
  • queryResultTransferValues.queryResultTransferSqlLiteral (cognitive 77) apps/desktop/src/components/transfer/queryResultTransferValues.ts:412 — queryResultTransferValues.queryResultTransferSqlLiteral has cognitive complexity 77 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 23, ternaries 9 (17 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferSource.loadQueryResultTransferSourceDdl (cognitive 77) · ×1
  • queryResultTransferSource.loadQueryResultTransferSourceDdl (cognitive 77) apps/desktop/src/components/transfer/queryResultTransferSource.ts:23 — queryResultTransferSource.loadQueryResultTransferSourceDdl has cognitive complexity 77 (threshold 15). Drivers by points: if/else 26 (45 pts), boolean chains 24, ternaries 4 (5 pts), loops 1 (2 pts), error handling 1 (nesting depth added 21). Of this number, 68 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableColumnDefinitionPaste.parseTableColumnDefinitions (cognitive 77) · ×1
  • tableColumnDefinitionPaste.parseTableColumnDefinitions (cognitive 77) apps/desktop/src/lib/table/tableColumnDefinitionPaste.ts:321 — tableColumnDefinitionPaste.parseTableColumnDefinitions has cognitive complexity 77 (threshold 15). Drivers by points: if/else 25 (59 pts), boolean chains 15, loops 2, error handling 1 (nesting depth added 34). Of this number, 63 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadObjectGroupFirstPage (cognitive 77) · ×1
  • connectionStore.useConnectionStore.loadObjectGroupFirstPage (cognitive 77) apps/desktop/src/stores/connectionStore.ts:7378 — connectionStore.useConnectionStore.loadObjectGroupFirstPage has cognitive complexity 77 (threshold 15). Drivers by points: if/else 28 (41 pts), boolean chains 21, loops 3 (8 pts), ternaries 5 (6 pts), error handling 1 (nesting depth added 19). Most of this is not in the body itself: 15 of the 77 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 7427, 7465). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.onPaginate (cognitive 76) · ×1
  • useDataGridActions.useDataGridActions.onPaginate (cognitive 76) apps/desktop/src/composables/useDataGridActions.ts:586 — useDataGridActions.useDataGridActions.onPaginate has cognitive complexity 76 (threshold 15). Drivers by points: if/else 16 (40 pts), ternaries 13 (23 pts), boolean chains 10, loops 1 (3 pts) (nesting depth added 36). Of this number, 67 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mongoShellCommand.diagnoseMongoCommand (cognitive 76) · ×1
  • mongoShellCommand.diagnoseMongoCommand (cognitive 76) REDACTED:132 — mongoShellCommand.diagnoseMongoCommand has cognitive complexity 76 (threshold 15). Drivers by points: if/else 26 (40 pts), ternaries 11 (22 pts), boolean chains 13, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.validateOracleRoutineDeployment (cognitive 76) · ×1
  • oracleRoutineDeploy.validateOracleRoutineDeployment (cognitive 76) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:468 — oracleRoutineDeploy.validateOracleRoutineDeployment has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (35 pts), ternaries 9 (20 pts), boolean chains 17, error handling 2, loops 2 (nesting depth added 26). Of this number, 73 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsTransfer.parseSettingsTransferFile (cognitive 76) · ×1
  • settingsTransfer.parseSettingsTransferFile (cognitive 76) apps/desktop/src/lib/settings/settingsTransfer.ts:645 — settingsTransfer.parseSettingsTransferFile has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (44 pts), boolean chains 14, ternaries 9 (10 pts), loops 5 (7 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StarRocksAlter · ×1
  • StarRocksAlter::build (cognitive 75) crates/dbx-sql-schema/src/table_structure_sql/alter_dialect.rs:63 — StarRocksAlter::build has cognitive complexity 75 (threshold 15). Drivers by points: if/else 28 (54 pts), boolean chains 19, loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugObjectConstructors.tokens (cognitive 74) · ×1
  • PlDebugObjectConstructors.tokens (cognitive 74) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:298 — PlDebugObjectConstructors.tokens has cognitive complexity 74 (threshold 15). Drivers by points: if/else 22 (48 pts), boolean chains 16, loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hoverTableSql.normalizeAlignedSqlWhitespace (cognitive 74) · ×1
  • hoverTableSql.normalizeAlignedSqlWhitespace (cognitive 74) apps/desktop/src/lib/editor/hoverTableSql.ts:163 — hoverTableSql.normalizeAlignedSqlWhitespace has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (55 pts), loops 4 (10 pts), boolean chains 9 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canvasDataGridRenderer.drawCanvasDataGrid · ×1
  • canvasDataGridRenderer.drawCanvasDataGrid::drawCell (cognitive 73) apps/desktop/src/lib/dataGrid/canvasDataGridRenderer.ts:610 — canvasDataGridRenderer.drawCanvasDataGrid::drawCell has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 14 (31 pts), if/else 19 (22 pts), boolean chains 20 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (canvasDataGridRenderer.drawCanvasDataGrid) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PlDebugSession.setBreakpoints (cognitive 72) · ×1
  • PlDebugSession.setBreakpoints (cognitive 72) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:893 — PlDebugSession.setBreakpoints has cognitive complexity 72 (threshold 15). Drivers by points: if/else 13 (31 pts), ternaries 11 (26 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.preparePastedRows (cognitive 72) · ×1
  • useDataGridEditor.useDataGridEditor.preparePastedRows (cognitive 72) apps/desktop/src/composables/useDataGridEditor.ts:1535 — useDataGridEditor.useDataGridEditor.preparePastedRows has cognitive complexity 72 (threshold 15). Drivers by points: if/else 29 (44 pts), boolean chains 14, ternaries 6 (9 pts), loops 3 (5 pts) (nesting depth added 20). Of this number, 67 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai.buildModePromptLines (cognitive 71) · ×1
  • ai.buildModePromptLines (cognitive 71) apps/desktop/src/lib/ai/ai.ts:681 — ai.buildModePromptLines has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 22 (61 pts), if/else 7 (10 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlIntentionActions.buildQualifierActions (cognitive 71) · ×1
  • sqlIntentionActions.buildQualifierActions (cognitive 71) apps/desktop/src/lib/editor/sqlIntentionActions.ts:562 — sqlIntentionActions.buildQualifierActions has cognitive complexity 71 (threshold 15). Drivers by points: if/else 18 (40 pts), ternaries 5 (13 pts), loops 3 (10 pts), boolean chains 8 (nesting depth added 37). Of this number, 70 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTables (cognitive 71) · ×1
  • connectionStore.useConnectionStore.loadTables (cognitive 71) apps/desktop/src/stores/connectionStore.ts:7212 — connectionStore.useConnectionStore.loadTables has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (27 pts), ternaries 17 (22 pts), boolean chains 21, error handling 1 (nesting depth added 12). Most of this is not in the body itself: 13 of the 71 points are its own statements and the rest belongs to one function literal inside it that branches (line 7252). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · EwkbWktDecoder.parseGeometry (cognitive 70) · ×1
  • EwkbWktDecoder.parseGeometry (cognitive 70) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:300 — EwkbWktDecoder.parseGeometry has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (45 pts), loops 8 (17 pts), ternaries 2 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseTableClone.buildOceanbaseTableClone (cognitive 70) · ×1
  • oceanbaseTableClone.buildOceanbaseTableClone (cognitive 70) apps/desktop/src/lib/database/oceanbaseTableClone.ts:41 — oceanbaseTableClone.buildOceanbaseTableClone has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (37 pts), boolean chains 20, ternaries 6 (10 pts), loops 3 (nesting depth added 14). Of this number, 54 points are the body's own statements and 16 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineBlockLayout.indentRoutineBlocks (cognitive 70) · ×1
  • routineBlockLayout.indentRoutineBlocks (cognitive 70) apps/desktop/src/lib/sql/routineBlockLayout.ts:90 — routineBlockLayout.indentRoutineBlocks has cognitive complexity 70 (threshold 15). Drivers by points: boolean chains 30, if/else 22 (29 pts), ternaries 5 (10 pts), loops 1 (nesting depth added 12). Of this number, 68 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cognitive 70) · ×1
  • sqlDatabaseLinks.collectSqlDatabaseLinkStarts (cognitive 70) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:46 — sqlDatabaseLinks.collectSqlDatabaseLinkStarts has cognitive complexity 70 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 25, loops 4 (9 pts), ternaries 2 (nesting depth added 25). Of this number, 64 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMockHost.bridge (cognitive 70) · ×1
  • createMockHost.bridge (cognitive 70) plugins/sdk/dev-host/server.mjs:267 — createMockHost.bridge has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 21, ternaries 6 (13 pts), other 3, match/switch 1 (nesting depth added 22). Of this number, 58 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeferredLobValues.readAhead (cognitive 69) · ×1
  • DeferredLobValues.readAhead (cognitive 69) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:152 — DeferredLobValues.readAhead has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (36 pts), ternaries 7 (15 pts), boolean chains 6, error handling 2 (6 pts), loops 4 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTypeManagement.executeOracleTypeManagement (cognitive 69) · ×1
  • oracleTypeManagement.executeOracleTypeManagement (cognitive 69) apps/desktop/src/lib/table/oracleTypeManagement.ts:572 — oracleTypeManagement.executeOracleTypeManagement has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 17, error handling 6 (12 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 24). Of this number, 67 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.temporal (cognitive 68) · ×1
  • PlDebugTemporalJson.temporal (cognitive 68) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:145 — PlDebugTemporalJson.temporal has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 16, ternaries 7 (15 pts), loops 2 (3 pts), error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.splitTopLevelStatements (cognitive 68) · ×1
  • dataGridInsertPaste.splitTopLevelStatements (cognitive 68) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:26 — dataGridInsertPaste.splitTopLevelStatements has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 9, ternaries 3 (9 pts), loops 2 (5 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cognitive 67) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics (cognitive 67) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:342 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.refreshSemanticDiagnostics has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (34 pts), ternaries 8 (14 pts), boolean chains 13, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 19). Of this number, 65 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.buildRequest (cognitive 67) · ×1
  • useDataGridExtractor.useDataGridExtractor.buildRequest (cognitive 67) apps/desktop/src/composables/useDataGridExtractor.ts:181 — useDataGridExtractor.useDataGridExtractor.buildRequest has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 30, if/else 13 (19 pts), ternaries 13 (16 pts), loops 1 (2 pts) (nesting depth added 10). Of this number, 60 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.getSqlLexicalContext (cognitive 67) · ×1
  • sqlCompletion.getSqlLexicalContext (cognitive 67) apps/desktop/src/lib/sql/sqlCompletion.ts:2423 — sqlCompletion.getSqlLexicalContext has cognitive complexity 67 (threshold 15). Drivers by points: if/else 29 (54 pts), boolean chains 12, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.listCompletionTables (cognitive 67) · ×1
  • connectionStore.useConnectionStore.listCompletionTables (cognitive 67) apps/desktop/src/stores/connectionStore.ts:9926 — connectionStore.useConnectionStore.listCompletionTables has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (36 pts), error handling 5 (21 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 36). Most of this is not in the body itself: 5 of the 67 points are its own statements and the rest belongs to one function literal inside it that branches (line 9948). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sync-connection-types.validateDescriptor (cognitive 67) · ×1
  • sync-connection-types.validateDescriptor (cognitive 67) scripts/sync-connection-types.mjs:97 — sync-connection-types.validateDescriptor has cognitive complexity 67 (threshold 15). Drivers by points: if/else 34 (42 pts), boolean chains 23, loops 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TableRestoreFilter · ×1
  • TableRestoreFilter::classify (cognitive 66) REDACTED:67 — TableRestoreFilter::classify has cognitive complexity 66 (threshold 15). Drivers by points: if/else 30 (50 pts), boolean chains 11, loops 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cognitive 66) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports (cognitive 66) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:689 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.submitTableExports has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 11, ternaries 4 (8 pts), error handling 2 (4 pts), loops 2 (nesting depth added 24). Most of this is not in the body itself: 6 of the 66 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 715, 739, 733, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ai.buildAiContext (cognitive 66) · ×1
  • ai.buildAiContext (cognitive 66) apps/desktop/src/lib/ai/ai.ts:905 — ai.buildAiContext has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (30 pts), ternaries 9 (16 pts), boolean chains 8, loops 4 (8 pts), error handling 2 (4 pts) (nesting depth added 30). Of this number, 61 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlDisplay.collectDdlStatementNameTargets (cognitive 66) · ×1
  • ddlDisplay.collectDdlStatementNameTargets (cognitive 66) apps/desktop/src/lib/sql/ddlDisplay.ts:207 — ddlDisplay.collectDdlStatementNameTargets has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (51 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableImport.importDataTypeForDatabase (cognitive 66) · ×1
  • tableImport.importDataTypeForDatabase (cognitive 66) apps/desktop/src/lib/table/tableImport.ts:321 — tableImport.importDataTypeForDatabase has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (50 pts), boolean chains 15, match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · tableSelectSql.qualifiedTableName (cognitive 66) · ×1
  • tableSelectSql.qualifiedTableName (cognitive 66) apps/desktop/src/lib/table/tableSelectSql.ts:204 — tableSelectSql.qualifiedTableName has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (34 pts), ternaries 8 (17 pts), boolean chains 15 (nesting depth added 23). Of this number, 64 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createMockHost.bridge (cognitive 66) · ×1
  • server.createMockHost.bridge (cognitive 66) plugins/sdk/dev-host/server.mjs:267 — server.createMockHost.bridge has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 19, ternaries 6 (14 pts), match/switch 1 (nesting depth added 23). Of this number, 54 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.mysqlRoutineTokens (cognitive 65) · ×1
  • sqlStatementRanges.mysqlRoutineTokens (cognitive 65) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2250 — sqlStatementRanges.mysqlRoutineTokens has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (56 pts), boolean chains 8, loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cognitive 65) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh (cognitive 65) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1335 — useQueryEditorCompletion.useQueryEditorCompletion.scheduleCompletionMetadataRefresh has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (47 pts), boolean chains 13, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 25). Of this number, 46 points are the body's own statements and 19 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.applyCellValueToItem (cognitive 65) · ×1
  • useDataGridEditor.useDataGridEditor.applyCellValueToItem (cognitive 65) apps/desktop/src/composables/useDataGridEditor.ts:1223 — useDataGridEditor.useDataGridEditor.applyCellValueToItem has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33 (58 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cellValueTransform.transformCellValue (cognitive 65) · ×1
  • cellValueTransform.transformCellValue (cognitive 65) apps/desktop/src/lib/dataGrid/cellValueTransform.ts:111 — cellValueTransform.transformCellValue has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 13 (30 pts), if/else 12 (25 pts), boolean chains 6, error handling 2 (3 pts), match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cognitive 65) · ×1
  • oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan (cognitive 65) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:33 — oracleTriggerStructurePlan.prepareOracleTriggerStructurePlan has cognitive complexity 65 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 16, ternaries 5 (11 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.buildGrantAuthorizationPlan (cognitive 64) · ×1
  • databaseAuthorizationPlan.buildGrantAuthorizationPlan (cognitive 64) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:275 — databaseAuthorizationPlan.buildGrantAuthorizationPlan has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 13 (38 pts), if/else 8 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DdlBuilder.buildTableDdl (cognitive 63) · ×1
  • DdlBuilder.buildTableDdl (cognitive 63) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:77 — DdlBuilder.buildTableDdl has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 7 (18 pts), loops 9 (13 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.parseExplainLikePrefixAt (cognitive 63) · ×1
  • sqlStatementRanges.parseExplainLikePrefixAt (cognitive 63) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1672 — sqlStatementRanges.parseExplainLikePrefixAt has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (49 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 30). Of this number, 54 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.doExecute (cognitive 63) · ×1
  • useSqlExecution.useSqlExecution.doExecute (cognitive 63) apps/desktop/src/composables/useSqlExecution.ts:489 — useSqlExecution.useSqlExecution.doExecute has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (29 pts), ternaries 14 (19 pts), boolean chains 15 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.prepareOracleTriggerPlan (cognitive 63) · ×1
  • oracleTriggerPlan.prepareOracleTriggerPlan (cognitive 63) apps/desktop/src/lib/database/oracleTriggerPlan.ts:166 — oracleTriggerPlan.prepareOracleTriggerPlan has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 14, ternaries 3 (5 pts), error handling 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrl.parseConnectionUrl (cognitive 62) · ×1
  • connectionUrl.parseConnectionUrl (cognitive 62) REDACTED:698 — connectionUrl.parseConnectionUrl has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 22 (33 pts), if/else 16, boolean chains 12, error handling 1 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · databaseTableEmpty.buildLayers (cognitive 62) · ×1
  • databaseTableEmpty.buildLayers (cognitive 62) apps/desktop/src/lib/sidebar/databaseTableEmpty.ts:46 — databaseTableEmpty.buildLayers has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 9 (17 pts), ternaries 6 (13 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 31). Of this number, 54 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.tokenizeCypher (cognitive 62) · ×1
  • cypherFormatter.tokenizeCypher (cognitive 62) apps/desktop/src/lib/sql/cypherFormatter.ts:176 — cypherFormatter.tokenizeCypher has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 4 (10 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.ensureConnected (cognitive 62) · ×1
  • connectionStore.useConnectionStore.ensureConnected (cognitive 62) apps/desktop/src/stores/connectionStore.ts:5647 — connectionStore.useConnectionStore.ensureConnected has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 13, error handling 3 (4 pts) (nesting depth added 17). Of this number, 43 points are the body's own statements and 19 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Db2ExplainPlan.singleQuery (cognitive 61) · ×1
  • Db2ExplainPlan.singleQuery (cognitive 61) REDACTED:277 — Db2ExplainPlan.singleQuery has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (40 pts), loops 4 (11 pts), boolean chains 9, ternaries 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · db2ExplainPlan.parseDb2ExplainText (cognitive 61) · ×1
  • db2ExplainPlan.parseDb2ExplainText (cognitive 61) apps/desktop/src/lib/diagram/db2ExplainPlan.ts:50 — db2ExplainPlan.parseDb2ExplainText has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 7 (17 pts), loops 6 (7 pts), boolean chains 6, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.collectInnermostObjectKeys (cognitive 61) · ×1
  • mongoCompletion.collectInnermostObjectKeys (cognitive 61) REDACTED:972 — mongoCompletion.collectInnermostObjectKeys has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (46 pts), boolean chains 7, ternaries 2 (7 pts), loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.mongoTopLevelCommandLineStarts (cognitive 61) · ×1
  • mongoShellCommand.mongoTopLevelCommandLineStarts (cognitive 61) REDACTED:1562 — mongoShellCommand.mongoTopLevelCommandLineStarts has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 16, loops 1, ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherReadOnly.isProvenReadOnlyCypher (cognitive 61) · ×1
  • cypherReadOnly.isProvenReadOnlyCypher (cognitive 61) apps/desktop/src/lib/sql/cypherReadOnly.ts:4 — cypherReadOnly.isProvenReadOnlyCypher has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 5 (13 pts), boolean chains 12 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.splitStatementRangeAtSoftStarts (cognitive 60) · ×1
  • sqlStatementRanges.splitStatementRangeAtSoftStarts (cognitive 60) apps/desktop/src/lib/sql/sqlStatementRanges.ts:854 — sqlStatementRanges.splitStatementRangeAtSoftStarts has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 17, ternaries 2 (3 pts), loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentStoreProvider.rewriteUnsafeIntegerTokens (cognitive 60) · ×1
  • documentStoreProvider.rewriteUnsafeIntegerTokens (cognitive 60) apps/desktop/src/lib/app/documentStoreProvider.ts:772 — documentStoreProvider.rewriteUnsafeIntegerTokens has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 5 (16 pts), boolean chains 4, error handling 1 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · regexGenerate.parseEscape (cognitive 60) · ×1
  • regexGenerate.parseEscape (cognitive 60) REDACTED:123 — regexGenerate.parseEscape has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (29 pts), ternaries 13 (28 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.stripSqlCommentsAndStringLiterals (cognitive 60) · ×1
  • schemaDiff.stripSqlCommentsAndStringLiterals (cognitive 60) apps/desktop/src/lib/schema/schemaDiff.ts:496 — schemaDiff.stripSqlCommentsAndStringLiterals has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (46 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aggregateCombinators.buildCombinatorSequences (cognitive 60) · ×1
  • aggregateCombinators.buildCombinatorSequences (cognitive 60) apps/desktop/src/lib/sql/clickhouse/aggregateCombinators.ts:10 — aggregateCombinators.buildCombinatorSequences has cognitive complexity 60 (threshold 15). Drivers by points: if/else 8 (42 pts), loops 7 (18 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriversClient.DriversClient (cognitive 60) · ×1
  • DriversClient.DriversClient (cognitive 60) docs/app/[lang]/drivers/DriversClient.tsx:216 — DriversClient.DriversClient has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 18 (51 pts), boolean chains 29, if/else 16 (25 pts), loops 5 (7 pts), error handling 2 (3 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (DriversClient.DriversClient::fetchBundlePackage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · DbxJdbcPlugin.listObjects (cognitive 59) · ×1
  • DbxJdbcPlugin.listObjects (cognitive 59) REDACTED:3128 — DbxJdbcPlugin.listObjects has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 13, error handling 3 (7 pts), ternaries 3 (7 pts), loops 3 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundStatement.scanSql (cognitive 59) · ×1
  • BlobBoundStatement.scanSql (cognitive 59) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:58 — BlobBoundStatement.scanSql has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 7 (26 pts), if/else 9 (19 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useNavigationTargets.openTableTarget (cognitive 59) · ×1
  • useNavigationTargets.openTableTarget (cognitive 59) apps/desktop/src/composables/useNavigationTargets.ts:65 — useNavigationTargets.openTableTarget has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (34 pts), boolean chains 18, error handling 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 11). Of this number, 57 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jdbcProperties.parseJdbcProperties (cognitive 59) · ×1
  • jdbcProperties.parseJdbcProperties (cognitive 59) apps/desktop/src/lib/connection/jdbcProperties.ts:39 — jdbcProperties.parseJdbcProperties has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 7 (16 pts), boolean chains 8, ternaries 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.getSqlCompletionContext (cognitive 59) · ×1
  • sqlCompletion.getSqlCompletionContext (cognitive 59) apps/desktop/src/lib/sql/sqlCompletion.ts:2914 — sqlCompletion.getSqlCompletionContext has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 31, ternaries 11 (12 pts), if/else 5 (10 pts), loops 4 (6 pts) (nesting depth added 8). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cognitive 58) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData (cognitive 58) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:549 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportTableData has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 18, ternaries 7 (10 pts), error handling 1 (nesting depth added 12). Of this number, 39 points are the body's own statements and 19 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.readTableReferenceToken (cognitive 58) · ×1
  • dataGridInsertPaste.readTableReferenceToken (cognitive 58) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:174 — dataGridInsertPaste.readTableReferenceToken has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (43 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarActiveTabTarget.activeTabSidebarTarget (cognitive 58) · ×1
  • sidebarActiveTabTarget.activeTabSidebarTarget (cognitive 58) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:125 — sidebarActiveTabTarget.activeTabSidebarTarget has cognitive complexity 58 (threshold 15). Drivers by points: if/else 36 (46 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadAllObjectGroupChildren (cognitive 58) · ×1
  • connectionStore.useConnectionStore.loadAllObjectGroupChildren (cognitive 58) apps/desktop/src/stores/connectionStore.ts:7977 — connectionStore.useConnectionStore.loadAllObjectGroupChildren has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 19, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 18). Of this number, 51 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · installBridge (cognitive 58) · ×1
  • installBridge (cognitive 58) REDACTED:2 — installBridge has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 17, loops 7 (12 pts), error handling 2 (3 pts), ternaries 3 (nesting depth added 9). None of this is in the body itself: all 58 points belong to 51 function items inside it that branch (a function literal at line 165, stream::start::onEvent, applyTheme, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionPickerTree.buildConnectionPickerRows (cognitive 57) · ×1
  • connectionPickerTree.buildConnectionPickerRows (cognitive 57) apps/desktop/src/lib/connection/connectionPickerTree.ts:47 — connectionPickerTree.buildConnectionPickerRows has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 30). Most of this is not in the body itself: 14 of the 57 points are its own statements and the rest belongs to 3 function items inside it that branch (visitSearch, visitTree, subtreeHasConnection). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · sidebarActiveTabTarget.matchesTarget (cognitive 57) · ×1
  • sidebarActiveTabTarget.matchesTarget (cognitive 57) apps/desktop/src/lib/sidebar/sidebarActiveTabTarget.ts:312 — sidebarActiveTabTarget.matchesTarget has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 31, if/else 23 (26 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cognitive 57) · ×1
  • sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration (cognitive 57) apps/desktop/src/lib/sql/sqlParameters.ts:1184 — sqlParameters.collectComplexTypeFieldSeparatorsInDeclaration has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 8, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.protectDuckDbPrefixAliasSeparators (cognitive 57) · ×1
  • sqlFormatter.protectDuckDbPrefixAliasSeparators (cognitive 57) apps/desktop/src/lib/sql/sqlFormatter.ts:336 — sqlFormatter.protectDuckDbPrefixAliasSeparators has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 11, loops 5 (11 pts), ternaries 2 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariables.readValueEnd (cognitive 57) · ×1
  • sqlVariables.readValueEnd (cognitive 57) apps/desktop/src/lib/sql/sqlVariables.ts:175 — sqlVariables.readValueEnd has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 14, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oraclePackageSource.tokens (cognitive 57) · ×1
  • oraclePackageSource.tokens (cognitive 57) apps/desktop/src/lib/table/oraclePackageSource.ts:10 — oraclePackageSource.tokens has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 4 (10 pts), boolean chains 6 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.commitEdit (cognitive 56) · ×1
  • useDataGridEditor.useDataGridEditor.commitEdit (cognitive 56) apps/desktop/src/composables/useDataGridEditor.ts:1098 — useDataGridEditor.useDataGridEditor.commitEdit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (42 pts), ternaries 5 (8 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cognitive 56) · ×1
  • useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables (cognitive 56) apps/desktop/src/composables/useDatabaseTableEmpty.ts:40 — useDatabaseTableEmpty.useDatabaseTableEmpty.requestDatabaseTables has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 17 (22 pts), if/else 15 (20 pts), boolean chains 9, error handling 3, loops 1 (2 pts) (nesting depth added 11). Of this number, 47 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · kvValueFormat.validateKvValue (cognitive 56) · ×1
  • kvValueFormat.validateKvValue (cognitive 56) apps/desktop/src/lib/kv/kvValueFormat.ts:33 — kvValueFormat.validateKvValue has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 10, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 21). Of this number, 45 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarTableNameCopy.qualifiedNameForSidebarNode (cognitive 56) · ×1
  • sidebarTableNameCopy.qualifiedNameForSidebarNode (cognitive 56) apps/desktop/src/lib/sidebar/sidebarTableNameCopy.ts:96 — sidebarTableNameCopy.qualifiedNameForSidebarNode has cognitive complexity 56 (threshold 15). Drivers by points: if/else 23 (34 pts), boolean chains 16, ternaries 4 (6 pts) (nesting depth added 13). Of this number, 51 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractSelectList (cognitive 56) · ×1
  • sqlCompletion.extractSelectList (cognitive 56) apps/desktop/src/lib/sql/sqlCompletion.ts:4255 — sqlCompletion.extractSelectList has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 15, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.buildQueryMetadataPatch (cognitive 56) · ×1
  • queryStore.useQueryStore.buildQueryMetadataPatch (cognitive 56) apps/desktop/src/stores/queryStore.ts:7712 — queryStore.useQueryStore.buildQueryMetadataPatch has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (24 pts), ternaries 11 (19 pts), boolean chains 12, error handling 1 (nesting depth added 16). Of this number, 49 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeJobRegistry · ×1
  • NativeJobRegistry::remember (cognitive 55) crates/dbx-core/src/schema/native_jobs/service.rs:102 — NativeJobRegistry::remember has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (36 pts), match/switch 5 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlDebugCompositeInput.composite (cognitive 55) · ×1
  • PlDebugCompositeInput.composite (cognitive 55) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:113 — PlDebugCompositeInput.composite has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 6, loops 3 (5 pts), error handling 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useFileDrop.useFileDrop.setupFileDrop (cognitive 55) · ×1
  • useFileDrop.useFileDrop.setupFileDrop (cognitive 55) apps/desktop/src/composables/useFileDrop.ts:44 — useFileDrop.useFileDrop.setupFileDrop has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (30 pts), error handling 3 (11 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 31). Most of this is not in the body itself: 2 of the 55 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 48, 125, 139). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · datagripImport.parseJdbcUrl (cognitive 55) · ×1
  • datagripImport.parseJdbcUrl (cognitive 55) REDACTED:135 — datagripImport.parseJdbcUrl has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (39 pts), boolean chains 8, loops 2 (4 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cognitive 54) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews (cognitive 54) apps/desktop/src/composables/useDataGridLargeValues.ts:276 — useDataGridLargeValues.useDataGridLargeValues.hydrateVisibleLargeValuePreviews has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 12, loops 5 (7 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.verifyStep (cognitive 54) · ×1
  • oracleTriggerPlan.verifyStep (cognitive 54) apps/desktop/src/lib/database/oracleTriggerPlan.ts:669 — oracleTriggerPlan.verifyStep has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (29 pts), ternaries 7 (14 pts), boolean chains 11 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectDuckDbStructFieldSeparators (cognitive 54) · ×1
  • sqlParameters.collectDuckDbStructFieldSeparators (cognitive 54) apps/desktop/src/lib/sql/sqlParameters.ts:871 — sqlParameters.collectDuckDbStructFieldSeparators has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (36 pts), ternaries 2 (7 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seo.auditPages (cognitive 54) · ×1
  • seo.auditPages (cognitive 54) docs/scripts/seo.mjs:84 — seo.auditPages has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 9, loops 4 (9 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Projection · ×1
  • Projection::read (cognitive 53) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:673 — Projection::read has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (41 pts), boolean chains 9, match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StarRocksCreateTable · ×1
  • StarRocksCreateTable::validate (cognitive 53) crates/dbx-sql-schema/src/table_structure_sql/create_dialect.rs:107 — StarRocksCreateTable::validate has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (38 pts), match/switch 2 (6 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.skipBalancedParens (cognitive 53) · ×1
  • sqlStatementRanges.skipBalancedParens (cognitive 53) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1771 — sqlStatementRanges.skipBalancedParens has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (46 pts), boolean chains 6, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridContextMenu.createDataGridColumnContextMenuItems (cognitive 53) · ×1
  • dataGridContextMenu.createDataGridColumnContextMenuItems (cognitive 53) apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts:116 — dataGridContextMenu.createDataGridColumnContextMenuItems has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (42 pts), boolean chains 11 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.parseOracleForeignKeyDdl (cognitive 53) · ×1
  • oracleForeignKeys.parseOracleForeignKeyDdl (cognitive 53) apps/desktop/src/lib/database/oracleForeignKeys.ts:26 — oracleForeignKeys.parseOracleForeignKeyDdl has cognitive complexity 53 (threshold 15). Drivers by points: if/else 29 (43 pts), boolean chains 5, loops 5 (nesting depth added 14). Of this number, 35 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridCellCoercion.parsePostgresArrayText (cognitive 52) · ×1
  • dataGridCellCoercion.parsePostgresArrayText (cognitive 52) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:381 — dataGridCellCoercion.parsePostgresArrayText has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 6 (14 pts), boolean chains 6 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandPreview.quoteRedisBytes (cognitive 52) · ×1
  • redisCommandPreview.quoteRedisBytes (cognitive 52) apps/desktop/src/lib/redis/redisCommandPreview.ts:67 — redisCommandPreview.quoteRedisBytes has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 10, error handling 1 (4 pts), loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleViewRename.prepareOracleViewRename (cognitive 52) · ×1
  • oracleViewRename.prepareOracleViewRename (cognitive 52) apps/desktop/src/lib/table/oracleViewRename.ts:128 — oracleViewRename.prepareOracleViewRename has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 10, ternaries 4 (10 pts), error handling 4 (9 pts), loops 2 (nesting depth added 19). Of this number, 46 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.bind (cognitive 51) · ×1
  • Plan.bind (cognitive 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:432 — Plan.bind has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (27 pts), ternaries 6 (19 pts), loops 4, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.node (cognitive 51) · ×1
  • PlDebugTemporalJson.node (cognitive 51) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:58 — PlDebugTemporalJson.node has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 9, ternaries 4 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridCopyExtractor.normalizeDataGridExtractorOptions (cognitive 51) · ×1
  • dataGridCopyExtractor.normalizeDataGridExtractorOptions (cognitive 51) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:230 — dataGridCopyExtractor.normalizeDataGridExtractorOptions has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 28 (29 pts), boolean chains 22 (nesting depth added 1). Of this number, 49 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoShellCommand.validateBulkWriteOperations (cognitive 51) · ×1
  • mongoShellCommand.validateBulkWriteOperations (cognitive 51) REDACTED:1919 — mongoShellCommand.validateBulkWriteOperations has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 5, ternaries 1 (4 pts), loops 2 (3 pts), error handling 1 (nesting depth added 25). Of this number, 50 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.mergeSidebarRegexIndexScopes (cognitive 51) · ×1
  • sidebarSearchTree.mergeSidebarRegexIndexScopes (cognitive 51) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:256 — sidebarSearchTree.mergeSidebarRegexIndexScopes has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 8 (10 pts), ternaries 5 (9 pts), boolean chains 3 (nesting depth added 21). Of this number, 37 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.refreshTreeNode (cognitive 51) · ×1
  • connectionStore.useConnectionStore.refreshTreeNode (cognitive 51) apps/desktop/src/stores/connectionStore.ts:8701 — connectionStore.useConnectionStore.refreshTreeNode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, loops 2 (8 pts), ternaries 3 (6 pts), error handling 1 (nesting depth added 19). Of this number, 47 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.readOracleConstraintSnapshot (cognitive 50) · ×1
  • oracleConstraints.readOracleConstraintSnapshot (cognitive 50) apps/desktop/src/lib/database/oracleConstraints.ts:274 — oracleConstraints.readOracleConstraintSnapshot has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 20, if/else 15 (17 pts), ternaries 9, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 4). Of this number, 47 points are the body's own statements and 3 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlCompletion.currentLineBlockEnd (cognitive 50) · ×1
  • sqlCompletion.currentLineBlockEnd (cognitive 50) apps/desktop/src/lib/sql/sqlCompletion.ts:2677 — sqlCompletion.currentLineBlockEnd has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 11, loops 4 (6 pts), ternaries 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.formatSqlText (cognitive 50) · ×1
  • sqlFormatter.formatSqlText (cognitive 50) apps/desktop/src/lib/sql/sqlFormatter.ts:457 — sqlFormatter.formatSqlText has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 16 (25 pts), if/else 10 (13 pts), error handling 4 (7 pts), boolean chains 5 (nesting depth added 15). Of this number, 34 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTypeManagement.restoreOracleTypeManagementDraft (cognitive 50) · ×1
  • oracleTypeManagement.restoreOracleTypeManagementDraft (cognitive 50) apps/desktop/src/lib/table/oracleTypeManagement.ts:706 — oracleTypeManagement.restoreOracleTypeManagementDraft has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 35, if/else 11 (13 pts), loops 2 (nesting depth added 2). Of this number, 29 points are the body's own statements and 21 belong to 10 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · oracleViewRename.executeOracleViewRename (cognitive 50) · ×1
  • oracleViewRename.executeOracleViewRename (cognitive 50) apps/desktop/src/lib/table/oracleViewRename.ts:268 — oracleViewRename.executeOracleViewRename has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cognitive 50) · ×1
  • connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren (cognitive 50) apps/desktop/src/stores/connectionStore.ts:3361 — connectionStore.useConnectionStore.loadSimpleSupplementalObjectChildren has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 7 (13 pts), boolean chains 9, error handling 1 (2 pts), loops 1 (nesting depth added 21). Of this number, 43 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.evaluateCondition (cognitive 50) · ×1
  • plDebugStore.evaluateCondition (cognitive 50) apps/desktop/src/stores/plDebugStore.ts:2104 — plDebugStore.evaluateCondition has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 10 (28 pts), if/else 13 (17 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createMockHost.server (cognitive 50) · ×1
  • server.createMockHost.server (cognitive 50) plugins/sdk/dev-host/server.mjs:474 — server.createMockHost.server has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 15, ternaries 5 (8 pts), loops 1 (2 pts), error handling 1 (nesting depth added 13). Of this number, 37 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TdengineDriver · ×1
  • TdengineDriver::completion_assistant_search (cognitive 49) agents/drivers/tdengine/src/driver.rs:251 — TdengineDriver::completion_assistant_search has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.lobInput (cognitive 49) · ×1
  • PlDebugTarget.lobInput (cognitive 49) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:935 — PlDebugTarget.lobInput has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 5 (13 pts), boolean chains 6, loops 1 (2 pts), error handling 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundExecutor.execute (cognitive 49) · ×1
  • BlobBoundExecutor.execute (cognitive 49) agents/common/src/main/java/com/dbx/agent/BlobBoundExecutor.java:35 — BlobBoundExecutor.execute has cognitive complexity 49 (threshold 15). Drivers by points: error handling 9 (23 pts), if/else 13 (20 pts), boolean chains 5, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan · ×1
  • Plan::after_tables (cognitive 48) crates/dbx-core/src/data/transfer/xugu_objects.rs:653 — Plan::after_tables has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (31 pts), match/switch 4 (14 pts), boolean chains 2, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.oraclePlSqlTokens (cognitive 48) · ×1
  • sqlStatementRanges.oraclePlSqlTokens (cognitive 48) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2712 — sqlStatementRanges.oraclePlSqlTokens has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnHighlight.computeColumnHighlightMatchKeys (cognitive 48) · ×1
  • dataGridColumnHighlight.computeColumnHighlightMatchKeys (cognitive 48) apps/desktop/src/lib/dataGrid/dataGridColumnHighlight.ts:91 — dataGridColumnHighlight.computeColumnHighlightMatchKeys has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 30). Of this number, 47 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSessionDiagnostics.parseOracleCachedPlan (cognitive 48) · ×1
  • oracleSessionDiagnostics.parseOracleCachedPlan (cognitive 48) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:163 — oracleSessionDiagnostics.parseOracleCachedPlan has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 11 (20 pts), boolean chains 12, if/else 7 (12 pts), loops 4 (nesting depth added 14). Of this number, 46 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.executePreparedTriggerPlan · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan::run (cognitive 48) apps/desktop/src/lib/database/oracleTriggerPlan.ts:268 — oracleTriggerPlan.executePreparedTriggerPlan::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 7 (17 pts), boolean chains 7, error handling 3 (6 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · mongoSql.compileSelect (cognitive 48) · ×1
  • mongoSql.compileSelect (cognitive 48) apps/desktop/src/lib/mongo/mongoSql.ts:671 — mongoSql.compileSelect has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 7 (14 pts), boolean chains 10, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frontendPlugin.buildPluginConnectionConfig (cognitive 48) · ×1
  • frontendPlugin.buildPluginConnectionConfig (cognitive 48) apps/desktop/src/lib/plugins/frontendPlugin.ts:259 — frontendPlugin.buildPluginConnectionConfig has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 24, if/else 14 (20 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sqlCompletion.scanCteDefinitions (cognitive 48) · ×1
  • sqlCompletion.scanCteDefinitions (cognitive 48) apps/desktop/src/lib/sql/sqlCompletion.ts:4484 — sqlCompletion.scanCteDefinitions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (15 pts), boolean chains 8 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startDevelopment (cognitive 48) · ×1
  • startDevelopment (cognitive 48) plugins/sdk/dev-host/runtime.mjs:39 — startDevelopment has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 10, error handling 3 (7 pts), ternaries 4, loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 12 of the 48 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 131, spawnCommand, run, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DbxJdbcPlugin.getObjectSource (cognitive 47) · ×1
  • DbxJdbcPlugin.getObjectSource (cognitive 47) REDACTED:5551 — DbxJdbcPlugin.getObjectSource has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (30 pts), ternaries 3 (8 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.collectSqlRanges (cognitive 47) · ×1
  • sqlSemanticSelectionRanges.collectSqlRanges (cognitive 47) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:331 — sqlSemanticSelectionRanges.collectSqlRanges has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 9, ternaries 3 (9 pts), loops 4 (nesting depth added 20). Of this number, 43 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nacosConfigValidation.validateHtml (cognitive 47) · ×1
  • nacosConfigValidation.validateHtml (cognitive 47) REDACTED:108 — nacosConfigValidation.validateHtml has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.collectSqlServerRoutineParameters (cognitive 47) · ×1
  • sqlCompletion.collectSqlServerRoutineParameters (cognitive 47) apps/desktop/src/lib/sql/sqlCompletion.ts:3124 — sqlCompletion.collectSqlServerRoutineParameters has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 24). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractSelectColumnNames (cognitive 47) · ×1
  • sqlCompletion.extractSelectColumnNames (cognitive 47) apps/desktop/src/lib/sql/sqlCompletion.ts:4400 — sqlCompletion.extractSelectColumnNames has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 4 (9 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 27). Of this number, 35 points are the body's own statements and 12 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.parseExtraToColumnExtra (cognitive 47) · ×1
  • tableStructureEditorState.parseExtraToColumnExtra (cognitive 47) apps/desktop/src/lib/table/tableStructureEditorState.ts:884 — tableStructureEditorState.parseExtraToColumnExtra has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (43 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTableForLocate (cognitive 47) · ×1
  • connectionStore.useConnectionStore.loadTableForLocate (cognitive 47) apps/desktop/src/stores/connectionStore.ts:7832 — connectionStore.useConnectionStore.loadTableForLocate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 9, ternaries 4 (9 pts), loops 2 (3 pts) (nesting depth added 19). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7849, 7927, 7884). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · queryResultTransferDdl.temporalColumnTypesFromDdl (cognitive 46) · ×1
  • queryResultTransferDdl.temporalColumnTypesFromDdl (cognitive 46) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:90 — queryResultTransferDdl.temporalColumnTypesFromDdl has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 12, ternaries 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columnFormatter.normalizeColumnFormatter (cognitive 46) · ×1
  • columnFormatter.normalizeColumnFormatter (cognitive 46) apps/desktop/src/lib/dataGrid/columnFormatter.ts:234 — columnFormatter.normalizeColumnFormatter has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 7 (14 pts), boolean chains 13 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cognitive 46) · ×1
  • databaseAuthorizationPlan.buildCreateUserAuthorizationPlan (cognitive 46) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:168 — databaseAuthorizationPlan.buildCreateUserAuthorizationPlan has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 6 (19 pts), if/else 9 (16 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.filterSidebarTreeWithMatcher (cognitive 46) · ×1
  • sidebarSearchTree.filterSidebarTreeWithMatcher (cognitive 46) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:380 — sidebarSearchTree.filterSidebarTreeWithMatcher has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 15, ternaries 4 (10 pts), loops 1 (nesting depth added 16). Of this number, 36 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printer.printRuleList (cognitive 46) · ×1
  • printer.printRuleList (cognitive 46) apps/desktop/src/lib/sql/layout/printer.ts:172 — printer.printRuleList has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 11 (17 pts), boolean chains 11 (nesting depth added 14). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 189, 177). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · oraclePackageSaveAs.prepareOraclePackageSaveAs (cognitive 46) · ×1
  • oraclePackageSaveAs.prepareOraclePackageSaveAs (cognitive 46) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:164 — oraclePackageSaveAs.prepareOraclePackageSaveAs has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 5 (15 pts), error handling 5 (10 pts), boolean chains 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.tokenizeXuguRoutineDefinition (cognitive 46) · ×1
  • routineParameters.tokenizeXuguRoutineDefinition (cognitive 46) apps/desktop/src/lib/table/routineParameters.ts:248 — routineParameters.tokenizeXuguRoutineDefinition has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (10 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.publishSnapshot (cognitive 46) · ×1
  • plDebugStore.usePlDebugStore.publishSnapshot (cognitive 46) apps/desktop/src/stores/plDebugStore.ts:308 — plDebugStore.usePlDebugStore.publishSnapshot has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 19, ternaries 3, loops 1 (2 pts) (nesting depth added 7). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.createMockHost.api (cognitive 46) · ×1
  • server.createMockHost.api (cognitive 46) plugins/sdk/dev-host/server.mjs:374 — server.createMockHost.api has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 9, ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 17). Of this number, 17 points are the body's own statements and 29 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runStep (cognitive 46) · ×1
  • runStep (cognitive 46) REDACTED:482 — runStep has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4 (8 pts), boolean chains 5, other 5, error handling 2 (4 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.listIndexes (cognitive 45) · ×1
  • DbxJdbcPlugin.listIndexes (cognitive 45) REDACTED:3429 — DbxJdbcPlugin.listIndexes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 10, error handling 6 (10 pts), ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.completionAssistantPackageMembers (cognitive 45) · ×1
  • OceanBaseOracleAgent.completionAssistantPackageMembers (cognitive 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:878 — OceanBaseOracleAgent.completionAssistantPackageMembers has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 7 (14 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.load (cognitive 45) · ×1
  • PlDebugTarget.load (cognitive 45) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1321 — PlDebugTarget.load has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (12 pts), boolean chains 8, ternaries 4 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridConditionHighlight.tokenizeDataGridCondition (cognitive 45) · ×1
  • dataGridConditionHighlight.tokenizeDataGridCondition (cognitive 45) apps/desktop/src/lib/dataGrid/dataGridConditionHighlight.ts:51 — dataGridConditionHighlight.tokenizeDataGridCondition has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 15, loops 4 (11 pts), if/else 5 (10 pts), ternaries 3 (9 pts) (nesting depth added 18). Of this number, 43 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyGrouping.compileRedisGroupGlob (cognitive 45) · ×1
  • redisKeyGrouping.compileRedisGroupGlob (cognitive 45) apps/desktop/src/lib/redis/redisKeyGrouping.ts:42 — redisKeyGrouping.compileRedisGroupGlob has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 5 (11 pts), boolean chains 9 (nesting depth added 17). Of this number, 31 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.parseCteSources (cognitive 45) · ×1
  • model.parseCteSources (cognitive 45) apps/desktop/src/lib/sql/semantic/model.ts:400 — model.parseCteSources has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 5 (10 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 23). Of this number, 44 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.parsePostgresRegclassPrefix (cognitive 45) · ×1
  • sqlCompletion.parsePostgresRegclassPrefix (cognitive 45) apps/desktop/src/lib/sql/sqlCompletion.ts:2350 — sqlCompletion.parsePostgresRegclassPrefix has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 10, loops 4 (8 pts), ternaries 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildColumnItems (cognitive 45) · ×1
  • sqlCompletion.buildColumnItems (cognitive 45) apps/desktop/src/lib/sql/sqlCompletion.ts:5922 — sqlCompletion.buildColumnItems has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (14 pts), ternaries 10 (13 pts), loops 2 (nesting depth added 9). Of this number, 33 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariables.replaceReferences (cognitive 45) · ×1
  • sqlVariables.replaceReferences (cognitive 45) apps/desktop/src/lib/sql/sqlVariables.ts:245 — sqlVariables.replaceReferences has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (36 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.listCompletionColumns (cognitive 45) · ×1
  • connectionStore.useConnectionStore.listCompletionColumns (cognitive 45) apps/desktop/src/stores/connectionStore.ts:10243 — connectionStore.useConnectionStore.listCompletionColumns has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 10 (14 pts), boolean chains 13, error handling 1 (3 pts) (nesting depth added 13). Of this number, 23 points are the body's own statements and 22 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.prepareEditableQueryExecution (cognitive 45) · ×1
  • queryStore.useQueryStore.prepareEditableQueryExecution (cognitive 45) apps/desktop/src/stores/queryStore.ts:7492 — queryStore.useQueryStore.prepareEditableQueryExecution has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 15, ternaries 3 (4 pts), error handling 1 (nesting depth added 8). Of this number, 43 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.exportQuerySqlDirect (cognitive 45) · ×1
  • queryStore.useQueryStore.exportQuerySqlDirect (cognitive 45) apps/desktop/src/stores/queryStore.ts:11552 — queryStore.useQueryStore.exportQuerySqlDirect has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 10, ternaries 5 (6 pts), error handling 2 (3 pts) (nesting depth added 13). Most of this is not in the body itself: 10 of the 45 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 11618, assertQueuedSourceAvailable, a function literal at line 11664, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · IssueSubmissionLimiter.fetch (cognitive 45) · ×1
  • IssueSubmissionLimiter.fetch (cognitive 45) docs/worker.ts:565 — IssueSubmissionLimiter.fetch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (26 pts), ternaries 7 (14 pts), boolean chains 4, error handling 1 (nesting depth added 17). Of this number, 29 points are the body's own statements and 16 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeferredLobValues.read (cognitive 44) · ×1
  • DeferredLobValues.read (cognitive 44) plugins/jdbc/src/main/java/app/dbx/jdbc/DeferredLobValues.java:222 — DeferredLobValues.read has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 7 (9 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlDebugSession.debugBefore (cognitive 44) · ×1
  • PlDebugSession.debugBefore (cognitive 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:525 — PlDebugSession.debugBefore has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 8, ternaries 4 (7 pts), error handling 3, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSource.load (cognitive 44) · ×1
  • PlDebugSource.load (cognitive 44) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:64 — PlDebugSource.load has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 3 (7 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cognitive 44) · ×1
  • useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor (cognitive 44) apps/desktop/src/composables/useDataGridExtractor.ts:413 — useDataGridExtractor.useDataGridExtractor.canCopyWithExtractor has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 16 (nesting depth added 9). Of this number, 42 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xmlFormat.parseXmlDocument (cognitive 44) · ×1
  • xmlFormat.parseXmlDocument (cognitive 44) apps/desktop/src/lib/common/xmlFormat.ts:37 — xmlFormat.parseXmlDocument has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 21). Of this number, 42 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cognitive 44) · ×1
  • databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps (cognitive 44) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:440 — databaseAuthorizationPlan.postgresDatabaseAuthorizationSteps has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 8 (18 pts), loops 3 (7 pts) (nesting depth added 24). Of this number, 42 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · productionSafety.sqlTargetSafetyText (cognitive 44) · ×1
  • productionSafety.sqlTargetSafetyText (cognitive 44) apps/desktop/src/lib/database/productionSafety.ts:276 — productionSafety.sqlTargetSafetyText has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 10, loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cognitive 44) · ×1
  • codemirrorTrimmedSelectionLayer.trimmedSelectionLayer (cognitive 44) apps/desktop/src/lib/editor/codemirrorTrimmedSelectionLayer.ts:193 — codemirrorTrimmedSelectionLayer.trimmedSelectionLayer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (32 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 25). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · schemaDiffDdlNormalize.stripSchemaFromSql (cognitive 44) · ×1
  • schemaDiffDdlNormalize.stripSchemaFromSql (cognitive 44) REDACTED:50 — schemaDiffDdlNormalize.stripSchemaFromSql has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 19). Of this number, 42 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.collectSqlServerLocalVariables (cognitive 44) · ×1
  • sqlCompletion.collectSqlServerLocalVariables (cognitive 44) apps/desktop/src/lib/sql/sqlCompletion.ts:3066 — sqlCompletion.collectSqlServerLocalVariables has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 10, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 18). Of this number, 40 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildObjectItems (cognitive 44) · ×1
  • sqlCompletion.buildObjectItems (cognitive 44) apps/desktop/src/lib/sql/sqlCompletion.ts:5115 — sqlCompletion.buildObjectItems has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 16 (22 pts), boolean chains 20, if/else 2 (nesting depth added 6). Most of this is not in the body itself: 4 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5128, 5122). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlParameters.collectTriggerPseudoRecordFieldStarts (cognitive 44) · ×1
  • sqlParameters.collectTriggerPseudoRecordFieldStarts (cognitive 44) apps/desktop/src/lib/sql/sqlParameters.ts:971 — sqlParameters.collectTriggerPseudoRecordFieldStarts has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 8, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlRisk.sqlSafetyText (cognitive 44) · ×1
  • sqlRisk.sqlSafetyText (cognitive 44) apps/desktop/src/lib/sql/sqlRisk.ts:252 — sqlRisk.sqlSafetyText has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 10, loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMockHost.api (cognitive 44) · ×1
  • createMockHost.api (cognitive 44) plugins/sdk/dev-host/server.mjs:374 — createMockHost.api has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 7, ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 17). Of this number, 16 points are the body's own statements and 28 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.isSelectWithClause (cognitive 43) · ×1
  • OceanBaseOracleAgent.isSelectWithClause (cognitive 43) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:277 — OceanBaseOracleAgent.isSelectWithClause has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 10, loops 3 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Loader.ddlSource (cognitive 43) · ×1
  • Loader.ddlSource (cognitive 43) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTypeGraph.java:223 — Loader.ddlSource has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 3 (10 pts), loops 3 (4 pts), error handling 3, boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryMapPreview.buildGeometryMapFeatureCollection (cognitive 43) · ×1
  • geometryMapPreview.buildGeometryMapFeatureCollection (cognitive 43) apps/desktop/src/lib/dataGrid/geometryMapPreview.ts:44 — geometryMapPreview.buildGeometryMapFeatureCollection has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 3 (6 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.extractActiveDatabase (cognitive 43) · ×1
  • mongoCompletion.extractActiveDatabase (cognitive 43) REDACTED:2526 — mongoCompletion.extractActiveDatabase has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (9 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frontendPlugin.pluginConnectionFormValues (cognitive 43) · ×1
  • frontendPlugin.pluginConnectionFormValues (cognitive 43) apps/desktop/src/lib/plugins/frontendPlugin.ts:241 — frontendPlugin.pluginConnectionFormValues has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 8 (36 pts), if/else 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlCompletion.activeSingleQuotedLiteralStart (cognitive 43) · ×1
  • sqlCompletion.activeSingleQuotedLiteralStart (cognitive 43) apps/desktop/src/lib/sql/sqlCompletion.ts:2289 — sqlCompletion.activeSingleQuotedLiteralStart has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 6, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.validateDependentDeclaration (cognitive 43) · ×1
  • oracleTableRename.validateDependentDeclaration (cognitive 43) REDACTED:282 — oracleTableRename.validateDependentDeclaration has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 11, ternaries 5 (6 pts), loops 1 (nesting depth added 14). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IssueSubmissionClient.IssueSubmissionClient (cognitive 43) · ×1
  • IssueSubmissionClient.IssueSubmissionClient (cognitive 43) docs/components/issues/IssueSubmissionClient.tsx:168 — IssueSubmissionClient.IssueSubmissionClient has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (15 pts), ternaries 8 (13 pts), boolean chains 11, error handling 4 (nesting depth added 6). Most of this is not in the body itself: 12 of the 43 points are its own statements and the rest belongs to 11 function items inside it that branch (generateDraft, parseResponse, submitIssue, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SshConfigLoader · ×1
  • SshConfigLoader::parse_lines (cognitive 42) crates/dbx-driver-support/src/ssh_config.rs:343 — SshConfigLoader::parse_lines has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.readValue (cognitive 42) · ×1
  • DbxJdbcPlugin.readValue (cognitive 42) REDACTED:6170 — DbxJdbcPlugin.readValue has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 12, ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlStorage.stripOceanBaseOracleStorageOptions (cognitive 42) · ×1
  • ddlStorage.stripOceanBaseOracleStorageOptions (cognitive 42) apps/desktop/src/lib/sql/ddlStorage.ts:91 — ddlStorage.stripOceanBaseOracleStorageOptions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 3 (9 pts), boolean chains 6, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cognitive 42) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans (cognitive 42) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:547 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.loadSqlUnknownObjectSpans has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (23 pts), ternaries 4 (7 pts), loops 4 (6 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 13). Of this number, 41 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cognitive 42) · ×1
  • useDataGridActions.useDataGridActions.refreshDataTabTableMeta (cognitive 42) apps/desktop/src/composables/useDataGridActions.ts:176 — useDataGridActions.useDataGridActions.refreshDataTabTableMeta has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 12, if/else 8 (nesting depth added 11). Of this number, 16 points are the body's own statements and 26 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.executeOracleIndexPlan (cognitive 42) · ×1
  • oracleIndexes.executeOracleIndexPlan (cognitive 42) apps/desktop/src/lib/database/oracleIndexes.ts:379 — oracleIndexes.executeOracleIndexPlan has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (28 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triggerToggleSql.buildTriggerToggleSql (cognitive 42) · ×1
  • triggerToggleSql.buildTriggerToggleSql (cognitive 42) apps/desktop/src/lib/database/triggerToggleSql.ts:29 — triggerToggleSql.buildTriggerToggleSql has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 8 (14 pts), boolean chains 10, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.parseDamengExplainText (cognitive 42) · ×1
  • explainPlan.parseDamengExplainText (cognitive 42) apps/desktop/src/lib/diagram/explainPlan.ts:89 — explainPlan.parseDamengExplainText has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (27 pts), ternaries 4 (7 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · treeNodeClick.treeNodeRowDoubleClickAction (cognitive 42) · ×1
  • treeNodeClick.treeNodeRowDoubleClickAction (cognitive 42) apps/desktop/src/lib/sidebar/treeNodeClick.ts:195 — treeNodeClick.treeNodeRowDoubleClickAction has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 4 (12 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.parseRowSourcesAtDepth (cognitive 42) · ×1
  • model.parseRowSourcesAtDepth (cognitive 42) apps/desktop/src/lib/sql/semantic/model.ts:705 — model.parseRowSourcesAtDepth has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectNativeSqlServerParameters (cognitive 42) · ×1
  • sqlParameters.collectNativeSqlServerParameters (cognitive 42) apps/desktop/src/lib/sql/sqlParameters.ts:1320 — sqlParameters.collectNativeSqlServerParameters has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.columnDataTypeForEditor (cognitive 42) · ×1
  • tableStructureEditorState.columnDataTypeForEditor (cognitive 42) apps/desktop/src/lib/table/tableStructureEditorState.ts:1082 — tableStructureEditorState.columnDataTypeForEditor has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 12, ternaries 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cognitive 41) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext (cognitive 41) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1513 — useQueryEditorCompletion.useQueryEditorCompletion.listCompletionObjectsForContext has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 20). Of this number, 39 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGenerateSession.streamInsertTable (cognitive 41) · ×1
  • useDataGenerateSession.streamInsertTable (cognitive 41) apps/desktop/src/composables/useDataGenerateSession.ts:161 — useDataGenerateSession.streamInsertTable has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 7, error handling 2 (3 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 15). Of this number, 27 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDialogSources.useDialogSources (cognitive 41) · ×1
  • useDialogSources.useDialogSources (cognitive 41) apps/desktop/src/composables/useDialogSources.ts:151 — useDialogSources.useDialogSources has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (41 pts) (nesting depth added 20). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 20 function literals inside it that branch (lines 162, 179, 188, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · regexGenerate.parseClass (cognitive 41) · ×1
  • regexGenerate.parseClass (cognitive 41) REDACTED:190 — regexGenerate.parseClass has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (33 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 20). Of this number, 37 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlIntentionActions.tokenizeSelectionIdentifiers (cognitive 41) · ×1
  • sqlIntentionActions.tokenizeSelectionIdentifiers (cognitive 41) apps/desktop/src/lib/editor/sqlIntentionActions.ts:292 — sqlIntentionActions.tokenizeSelectionIdentifiers has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphSignatureHelp.getGraphFunctionSignatureHelp (cognitive 41) · ×1
  • graphSignatureHelp.getGraphFunctionSignatureHelp (cognitive 41) apps/desktop/src/lib/graph/graphSignatureHelp.ts:6 — graphSignatureHelp.getGraphFunctionSignatureHelp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 11, ternaries 3 (5 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryCursorOffsetPagination.executeCursorOffsetPage (cognitive 41) · ×1
  • queryCursorOffsetPagination.executeCursorOffsetPage (cognitive 41) apps/desktop/src/lib/query/queryCursorOffsetPagination.ts:4 — queryCursorOffsetPagination.executeCursorOffsetPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 3 (6 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyTree.sortRedisTreeLevelCooperatively (cognitive 41) · ×1
  • redisKeyTree.sortRedisTreeLevelCooperatively (cognitive 41) apps/desktop/src/lib/redis/redisKeyTree.ts:212 — redisKeyTree.sortRedisTreeLevelCooperatively has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 7 (14 pts), boolean chains 9 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.scanSelectListContext (cognitive 41) · ×1
  • sqlCompletion.scanSelectListContext (cognitive 41) apps/desktop/src/lib/sql/sqlCompletion.ts:3466 — sqlCompletion.scanSelectListContext has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectSelectAssignmentVariables (cognitive 41) · ×1
  • sqlParameters.collectSelectAssignmentVariables (cognitive 41) apps/desktop/src/lib/sql/sqlParameters.ts:1478 — sqlParameters.collectSelectAssignmentVariables has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 10, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableSelectSql.sqlCteVisibilities (cognitive 41) · ×1
  • tableSelectSql.sqlCteVisibilities (cognitive 41) apps/desktop/src/lib/table/tableSelectSql.ts:330 — tableSelectSql.sqlCteVisibilities has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.refreshSidebarObjectPagination · ×1
  • connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes (cognitive 41) apps/desktop/src/stores/connectionStore.ts:10853 — connectionStore.useConnectionStore.refreshSidebarObjectPagination::refreshNodes has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 5, loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.refreshDataTabInternal (cognitive 41) · ×1
  • queryStore.useQueryStore.refreshDataTabInternal (cognitive 41) apps/desktop/src/stores/queryStore.ts:5792 — queryStore.useQueryStore.refreshDataTabInternal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 11, error handling 3 (4 pts), ternaries 3 (nesting depth added 8). Of this number, 39 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SnippetSyncClient · ×1
  • SnippetSyncClient::put_snapshot_with_expected_remote_hash (cognitive 40) crates/dbx-core/src/persistence/cloud_sync.rs:2051 — SnippetSyncClient::put_snapshot_with_expected_remote_hash has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 3, match/switch 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.stripCommentsAndLiterals (cognitive 40) · ×1
  • DbxJdbcPlugin.stripCommentsAndLiterals (cognitive 40) REDACTED:2738 — DbxJdbcPlugin.stripCommentsAndLiterals has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.requiresTypedLobConnection (cognitive 40) · ×1
  • PlDebugTarget.requiresTypedLobConnection (cognitive 40) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:113 — PlDebugTarget.requiresTypedLobConnection has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 12, loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridPaintTheme.resolveDataGridPaintTheme (cognitive 40) · ×1
  • dataGridPaintTheme.resolveDataGridPaintTheme (cognitive 40) apps/desktop/src/lib/dataGrid/dataGridPaintTheme.ts:270 — dataGridPaintTheme.resolveDataGridPaintTheme has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 39, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cognitive 40) · ×1
  • oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics (cognitive 40) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:376 — oceanbaseSessionDiagnostics.collectOceanbaseSessionDiagnostics has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 6 (13 pts), boolean chains 8, error handling 4 (6 pts) (nesting depth added 10). Of this number, 39 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.executePreparedTriggerPlan (cognitive 40) · ×1
  • oracleTriggerPlan.executePreparedTriggerPlan (cognitive 40) apps/desktop/src/lib/database/oracleTriggerPlan.ts:257 — oracleTriggerPlan.executePreparedTriggerPlan has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (30 pts), ternaries 9 (22 pts), error handling 7 (14 pts), boolean chains 12, loops 5 (10 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleTriggerPlan.executePreparedTriggerPlan::run) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · insertValueHints.selectProjectionStarts (cognitive 40) · ×1
  • insertValueHints.selectProjectionStarts (cognitive 40) apps/desktop/src/lib/sql/insertValueHints.ts:222 — insertValueHints.selectProjectionStarts has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 11, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · primitives.renderInline (cognitive 40) · ×1
  • primitives.renderInline (cognitive 40) apps/desktop/src/lib/sql/layout/primitives.ts:464 — primitives.renderInline has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateRecord (cognitive 40) · ×1
  • validateRecord (cognitive 40) plugins/sdk/dev-host/connections.mjs:13 — validateRecord has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (16 pts), ternaries 2 (6 pts), loops 1, other 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoutineOperationRegistry · ×1
  • RoutineOperationRegistry::prepare_batch (cognitive 39) crates/dbx-core/src/schema/oracle_routines/operations/retention.rs:186 — RoutineOperationRegistry::prepare_batch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 6 (7 pts), boolean chains 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugObjectConstructors.select (cognitive 39) · ×1
  • PlDebugObjectConstructors.select (cognitive 39) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:98 — PlDebugObjectConstructors.select has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.brokerEndpoints (cognitive 39) · ×1
  • KafkaAgent.brokerEndpoints (cognitive 39) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:432 — KafkaAgent.brokerEndpoints has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 4 (8 pts), boolean chains 7, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cognitive 39) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem (cognitive 39) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:425 — useQueryEditorCompletion.useQueryEditorCompletion.completionOptionForItem has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 12 (18 pts), if/else 10 (15 pts), boolean chains 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.escapedTextLiteral (cognitive 39) · ×1
  • queryResultTransferValues.escapedTextLiteral (cognitive 39) apps/desktop/src/components/transfer/queryResultTransferValues.ts:272 — queryResultTransferValues.escapedTextLiteral has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 3 (9 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 18). Of this number, 32 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · regexGenerate.pickFromClass (cognitive 39) · ×1
  • regexGenerate.pickFromClass (cognitive 39) REDACTED:95 — regexGenerate.pickFromClass has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 5 (16 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbAdminSql.buildDuplicateTableStructurePlan (cognitive 39) · ×1
  • dbAdminSql.buildDuplicateTableStructurePlan (cognitive 39) apps/desktop/src/lib/database/dbAdminSql.ts:246 — dbAdminSql.buildDuplicateTableStructurePlan has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 19, ternaries 6 (11 pts), if/else 7 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cognitive 39) · ×1
  • oracleForeignKeys.readOracleForeignKeyReferenceSnapshot (cognitive 39) apps/desktop/src/lib/database/oracleForeignKeys.ts:312 — oracleForeignKeys.readOracleForeignKeyReferenceSnapshot has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 19, if/else 6 (11 pts), ternaries 6 (7 pts), loops 1 (2 pts) (nesting depth added 7). Of this number, 38 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · mongoCompletion.collectScopeVariables (cognitive 39) · ×1
  • mongoCompletion.collectScopeVariables (cognitive 39) REDACTED:1109 — mongoCompletion.collectScopeVariables has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.stepLexState (cognitive 39) · ×1
  • insertValueHints.stepLexState (cognitive 39) apps/desktop/src/lib/sql/insertValueHints.ts:426 — insertValueHints.stepLexState has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · printer.printClause (cognitive 39) · ×1
  • printer.printClause (cognitive 39) apps/desktop/src/lib/sql/layout/printer.ts:57 — printer.printClause has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 8, ternaries 4 (7 pts) (nesting depth added 9). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 85, 99). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · model.buildCursorIntent (cognitive 39) · ×1
  • model.buildCursorIntent (cognitive 39) apps/desktop/src/lib/sql/semantic/model.ts:974 — model.buildCursorIntent has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 11, if/else 10 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.parseTrailingIdentifierContext (cognitive 39) · ×1
  • sqlCompletion.parseTrailingIdentifierContext (cognitive 39) apps/desktop/src/lib/sql/sqlCompletion.ts:3303 — sqlCompletion.parseTrailingIdentifierContext has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 8 (14 pts), boolean chains 8, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.searchSidebarObjects (cognitive 39) · ×1
  • connectionStore.useConnectionStore.searchSidebarObjects (cognitive 39) apps/desktop/src/stores/connectionStore.ts:3160 — connectionStore.useConnectionStore.searchSidebarObjects has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 5 (9 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 15). Of this number, 27 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginPackageInstaller · ×1
  • PluginPackageInstaller::install_bytes_locked (cognitive 38) crates/dbx-plugin-runtime/src/plugins/installer.rs:528 — PluginPackageInstaller::install_bytes_locked has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (31 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleListIndexes (cognitive 38) · ×1
  • DbxJdbcPlugin.oracleListIndexes (cognitive 38) REDACTED:5441 — DbxJdbcPlugin.oracleListIndexes has cognitive complexity 38 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 11, ternaries 3 (7 pts), error handling 3 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.summaries (cognitive 38) · ×1
  • OracleTriggerMetadataReader.summaries (cognitive 38) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:146 — OracleTriggerMetadataReader.summaries has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 6 (12 pts), boolean chains 7, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSessionDiagnostics.useSessionDiagnostics.refresh (cognitive 38) · ×1
  • useSessionDiagnostics.useSessionDiagnostics.refresh (cognitive 38) apps/desktop/src/composables/useSessionDiagnostics.ts:40 — useSessionDiagnostics.useSessionDiagnostics.refresh has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 3 (7 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 14). Of this number, 34 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentStoreProvider.buildDocumentFilterCondition (cognitive 38) · ×1
  • documentStoreProvider.buildDocumentFilterCondition (cognitive 38) apps/desktop/src/lib/app/documentStoreProvider.ts:555 — documentStoreProvider.buildDocumentFilterCondition has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 5 (8 pts), boolean chains 6, match/switch 1 (nesting depth added 13). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeSnapshot.snapshotElementToPng (cognitive 38) · ×1
  • codeSnapshot.snapshotElementToPng (cognitive 38) apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:343 — codeSnapshot.snapshotElementToPng has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 17, if/else 7 (13 pts), ternaries 6, error handling 1 (2 pts) (nesting depth added 7). Of this number, 29 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.splitMongoSemicolonSeparatedSegments (cognitive 38) · ×1
  • mongoShellCommand.splitMongoSemicolonSeparatedSegments (cognitive 38) REDACTED:1465 — mongoShellCommand.splitMongoSemicolonSeparatedSegments has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 10, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cognitive 38) · ×1
  • oraclePackageSaveAs.executePreparedOraclePackageSaveAs (cognitive 38) apps/desktop/src/lib/table/oraclePackageSaveAs.ts:275 — oraclePackageSaveAs.executePreparedOraclePackageSaveAs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 9, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 6). Of this number, 35 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oracleRoutineRename.prepareOracleRoutineRename (cognitive 38) · ×1
  • oracleRoutineRename.prepareOracleRoutineRename (cognitive 38) apps/desktop/src/lib/table/oracleRoutineRename.ts:253 — oracleRoutineRename.prepareOracleRoutineRename has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (33 pts), error handling 7 (11 pts), boolean chains 8, ternaries 2 (5 pts), loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.connect (cognitive 38) · ×1
  • connectionStore.useConnectionStore.connect (cognitive 38) apps/desktop/src/stores/connectionStore.ts:5215 — connectionStore.useConnectionStore.connect has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 13, error handling 2 (nesting depth added 5). Of this number, 35 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · worker.runAggregation (cognitive 38) · ×1
  • worker.runAggregation (cognitive 38) deploy/plugin-stats-worker/worker.ts:245 — worker.runAggregation has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 5 (10 pts), error handling 3 (5 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginManifest · ×1
  • PluginManifest::compatibility (cognitive 37) crates/dbx-plugin-runtime/src/plugins/manifest.rs:1075 — PluginManifest::compatibility has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 3, match/switch 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlScanner · ×1
  • SqlScanner::step (cognitive 37) crates/dbx-sql-core/src/sql.rs:2956 — SqlScanner::step has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 16, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.getExplainInfo (cognitive 37) · ×1
  • DbxJdbcPlugin.getExplainInfo (cognitive 37) REDACTED:2233 — DbxJdbcPlugin.getExplainInfo has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 5 (12 pts), loops 2 (5 pts), boolean chains 2, ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.inputPayloadBytes (cognitive 37) · ×1
  • PlDebugTarget.inputPayloadBytes (cognitive 37) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:908 — PlDebugTarget.inputPayloadBytes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KafkaAgent.listConsumerGroups (cognitive 37) · ×1
  • KafkaAgent.listConsumerGroups (cognitive 37) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1094 — KafkaAgent.listConsumerGroups has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (13 pts), error handling 3 (9 pts), if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cognitive 37) · ×1
  • useDataGridExport.useDataGridExport.exportFullTableDataViaBackend (cognitive 37) apps/desktop/src/composables/useDataGridExport.ts:2247 — useDataGridExport.useDataGridExport.exportFullTableDataViaBackend has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 17, boolean chains 10, if/else 8 (10 pts) (nesting depth added 2). Of this number, 33 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cognitive 37) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget (cognitive 37) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:397 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataLegacyForTarget has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 8 (12 pts), boolean chains 6, error handling 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 16 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryPreview.drawGroups (cognitive 37) · ×1
  • geometryPreview.drawGroups (cognitive 37) apps/desktop/src/lib/dataGrid/geometryPreview.ts:135 — geometryPreview.drawGroups has cognitive complexity 37 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 9 (15 pts), boolean chains 2 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · joinedRowChanges.joinedRowChanges (cognitive 37) · ×1
  • joinedRowChanges.joinedRowChanges (cognitive 37) apps/desktop/src/lib/dataGrid/joinedRowChanges.ts:54 — joinedRowChanges.joinedRowChanges has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (26 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 22). Of this number, 21 points are the body's own statements and 16 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.getMongoCompletionContext (cognitive 37) · ×1
  • mongoCompletion.getMongoCompletionContext (cognitive 37) REDACTED:368 — mongoCompletion.getMongoCompletionContext has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 13 (20 pts), if/else 12 (13 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · model.cteBodyProjectionShape (cognitive 37) · ×1
  • model.cteBodyProjectionShape (cognitive 37) apps/desktop/src/lib/sql/semantic/model.ts:274 — model.cteBodyProjectionShape has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractReferencedTables (cognitive 37) · ×1
  • sqlCompletion.extractReferencedTables (cognitive 37) apps/desktop/src/lib/sql/sqlCompletion.ts:4022 — sqlCompletion.extractReferencedTables has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 9 (20 pts), boolean chains 8, if/else 4 (8 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildForeignKeyRelatedTableItems (cognitive 37) · ×1
  • sqlCompletion.buildForeignKeyRelatedTableItems (cognitive 37) apps/desktop/src/lib/sql/sqlCompletion.ts:5014 — sqlCompletion.buildForeignKeyRelatedTableItems has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 9, loops 3 (6 pts), ternaries 5 (6 pts) (nesting depth added 15). Of this number, 25 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cognitive 37) · ×1
  • starrocksLayoutCopy.buildStarRocksLayoutCopyDdl (cognitive 37) apps/desktop/src/lib/table/starrocksLayoutCopy.ts:43 — starrocksLayoutCopy.buildStarRocksLayoutCopyDdl has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 11, ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 10). Of this number, 21 points are the body's own statements and 16 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.shellConstructorToExtendedJson (cognitive 37) · ×1
  • json.shellConstructorToExtendedJson (cognitive 37) packages/mongo-shell/src/json.ts:638 — json.shellConstructorToExtendedJson has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 7 (13 pts), boolean chains 7, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentDriverClient · ×1
  • AgentDriverClient::call_typed_with_timeout_and_cancel (cognitive 36) crates/dbx-driver-agent/src/agent_driver.rs:2250 — AgentDriverClient::call_typed_with_timeout_and_cancel has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 8 (15 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OceanBaseOracleAgent.getColumnsInContext (cognitive 36) · ×1
  • OceanBaseOracleAgent.getColumnsInContext (cognitive 36) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1607 — OceanBaseOracleAgent.getColumnsInContext has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.getExplainInfo (cognitive 36) · ×1
  • DamengAgent.getExplainInfo (cognitive 36) REDACTED:3544 — DamengAgent.getExplainInfo has cognitive complexity 36 (threshold 15). Drivers by points: error handling 6 (14 pts), if/else 9 (14 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-schema-objects.main (cognitive 36) · ×1
  • verify-schema-objects.main (cognitive 36) REDACTED:10 — verify-schema-objects.main has cognitive complexity 36 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 11 (12 pts), boolean chains 6, ternaries 3 (4 pts), loops 1 (nesting depth added 8). Of this number, 26 points are the body's own statements and 10 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.submitBackendExport · ×1
  • useDataGridExport.useDataGridExport.submitBackendExport::execute (cognitive 36) apps/desktop/src/composables/useDataGridExport.ts:2414 — useDataGridExport.useDataGridExport.submitBackendExport::execute has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, ternaries 3 (5 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cognitive 36) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells (cognitive 36) apps/desktop/src/composables/useDataGridLargeValues.ts:517 — useDataGridLargeValues.useDataGridLargeValues.resolveLargeValueCells has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 17). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cognitive 36) · ×1
  • useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget (cognitive 36) apps/desktop/src/composables/useMultiDbTargetSelection.ts:241 — useMultiDbTargetSelection.useMultiDbTargetSelection.validateTarget has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 5, error handling 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cognitive 36) · ×1
  • useScheduledDatabaseBackups.useScheduledDatabaseBackups.update (cognitive 36) apps/desktop/src/composables/useScheduledDatabaseBackups.ts:26 — useScheduledDatabaseBackups.useScheduledDatabaseBackups.update has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 6 (14 pts), boolean chains 5, loops 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · http.aiAgentStream (cognitive 36) · ×1
  • http.aiAgentStream (cognitive 36) apps/desktop/src/lib/backend/http.ts:2422 — http.aiAgentStream has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (25 pts), error handling 1 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridClipboard.prepareDataGridClipboard (cognitive 36) · ×1
  • dataGridClipboard.prepareDataGridClipboard (cognitive 36) apps/desktop/src/lib/dataGrid/dataGridClipboard.ts:65 — dataGridClipboard.prepareDataGridClipboard has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 14). Of this number, 32 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.readBracketedGroup (cognitive 36) · ×1
  • dataGridInsertPaste.readBracketedGroup (cognitive 36) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:128 — dataGridInsertPaste.readBracketedGroup has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 5, loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · oracleConstraints.expressionTokens (cognitive 36) · ×1
  • oracleConstraints.expressionTokens (cognitive 36) apps/desktop/src/lib/database/oracleConstraints.ts:194 — oracleConstraints.expressionTokens has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSecurity.oracleGrantSources (cognitive 36) · ×1
  • oracleSecurity.oracleGrantSources (cognitive 36) apps/desktop/src/lib/database/oracleSecurity.ts:166 — oracleSecurity.oracleGrantSources has cognitive complexity 36 (threshold 15). Drivers by points: if/else 3 (12 pts), ternaries 4 (12 pts), loops 5 (11 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguUserPermissions.xuguGrantSql (cognitive 36) · ×1
  • xuguUserPermissions.xuguGrantSql (cognitive 36) apps/desktop/src/lib/database/xuguUserPermissions.ts:580 — xuguUserPermissions.xuguGrantSql has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7, ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · match-engine.inferRelationships (cognitive 36) · ×1
  • match-engine.inferRelationships (cognitive 36) apps/desktop/src/lib/diagram/match-engine.ts:9 — match-engine.inferRelationships has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (21 pts), ternaries 3 (12 pts), loops 2 (3 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · pluginAiCompletion.createPluginAiCompletion.runGeneration (cognitive 36) · ×1
  • pluginAiCompletion.createPluginAiCompletion.runGeneration (cognitive 36) apps/desktop/src/lib/plugins/pluginAiCompletion.ts:131 — pluginAiCompletion.createPluginAiCompletion.runGeneration has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4, error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 12). Of this number, 31 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandTokenizer.tokenizeRedisLine (cognitive 36) · ×1
  • redisCommandTokenizer.tokenizeRedisLine (cognitive 36) apps/desktop/src/lib/redis/redisCommandTokenizer.ts:28 — redisCommandTokenizer.tokenizeRedisLine has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 4, loops 3 (nesting depth added 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solrAdmin.buildSolrQuery (cognitive 36) · ×1
  • solrAdmin.buildSolrQuery (cognitive 36) apps/desktop/src/lib/solr/solrAdmin.ts:302 — solrAdmin.buildSolrQuery has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 10). Of this number, 31 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.needsSpace (cognitive 36) · ×1
  • cypherFormatter.needsSpace (cognitive 36) apps/desktop/src/lib/sql/cypherFormatter.ts:318 — cypherFormatter.needsSpace has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 8 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · locate (cognitive 36) · ×1
  • locate (cognitive 36) REDACTED:316 — locate has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, loops 5 (7 pts), ternaries 3, error handling 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 16 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeInput.requireInputAdapter (cognitive 35) · ×1
  • PlDebugCompositeInput.requireInputAdapter (cognitive 35) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:70 — PlDebugCompositeInput.requireInputAdapter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.helperDeclarations (cognitive 35) · ×1
  • PlDebugCompositeOutput.helperDeclarations (cognitive 35) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:230 — PlDebugCompositeOutput.helperDeclarations has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 8 (24 pts), if/else 5 (8 pts), loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.isIgnorableDbmsOutputError (cognitive 35) · ×1
  • DamengAgent.isIgnorableDbmsOutputError (cognitive 35) REDACTED:396 — DamengAgent.isIgnorableDbmsOutputError has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.queryConstrainedTables (cognitive 35) · ×1
  • DamengAgent.queryConstrainedTables (cognitive 35) REDACTED:592 — DamengAgent.queryConstrainedTables has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (27 pts), error handling 5 (7 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.checkUpdates (cognitive 35) · ×1
  • useAppUpdater.useAppUpdater.checkUpdates (cognitive 35) apps/desktop/src/composables/useAppUpdater.ts:231 — useAppUpdater.useAppUpdater.checkUpdates has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 10, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportXlsxResult (cognitive 35) · ×1
  • useDataGridExport.useDataGridExport.exportXlsxResult (cognitive 35) apps/desktop/src/composables/useDataGridExport.ts:1782 — useDataGridExport.useDataGridExport.exportXlsxResult has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 11, ternaries 2 (3 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1788, 1827). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cognitive 35) · ×1
  • useDataGridExport.useDataGridExport.exportQueryResultViaBackend (cognitive 35) apps/desktop/src/composables/useDataGridExport.ts:2493 — useDataGridExport.useDataGridExport.exportQueryResultViaBackend has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 12, boolean chains 7 (nesting depth added 3). Of this number, 33 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useQuickOpen.useQuickOpen.remoteSearchContexts (cognitive 35) · ×1
  • useQuickOpen.useQuickOpen.remoteSearchContexts (cognitive 35) apps/desktop/src/composables/useQuickOpen.ts:833 — useQuickOpen.useQuickOpen.remoteSearchContexts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 5 (8 pts) (nesting depth added 17). Of this number, 33 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeJsonFormat.myersDiff (cognitive 35) · ×1
  • safeJsonFormat.myersDiff (cognitive 35) apps/desktop/src/lib/common/safeJsonFormat.ts:301 — safeJsonFormat.myersDiff has cognitive complexity 35 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 6 (10 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionDeepLink.parseConnectionDeepLinkUpdate (cognitive 35) · ×1
  • connectionDeepLink.parseConnectionDeepLinkUpdate (cognitive 35) REDACTED:82 — connectionDeepLink.parseConnectionDeepLinkUpdate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 5, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnFilter.unwrapOuterParentheses (cognitive 35) · ×1
  • dataGridColumnFilter.unwrapOuterParentheses (cognitive 35) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:85 — dataGridColumnFilter.unwrapOuterParentheses has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataDictionaryExportTask.startDataDictionaryExport (cognitive 35) · ×1
  • dataDictionaryExportTask.startDataDictionaryExport (cognitive 35) apps/desktop/src/lib/docs/dataDictionaryExportTask.ts:36 — dataDictionaryExportTask.startDataDictionaryExport has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 5 (11 pts), boolean chains 7, error handling 2 (3 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 43, 91, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.collectExpressionSection (cognitive 35) · ×1
  • sqlSemanticSelectionRanges.collectExpressionSection (cognitive 35) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:247 — sqlSemanticSelectionRanges.collectExpressionSection has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 6 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 12). Of this number, 33 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elasticsearchCompletion.inspectJsonBody (cognitive 35) · ×1
  • elasticsearchCompletion.inspectJsonBody (cognitive 35) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:461 — elasticsearchCompletion.inspectJsonBody has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 8, loops 3 (5 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagnostics.buildSqlSemanticDiagnostics (cognitive 35) · ×1
  • diagnostics.buildSqlSemanticDiagnostics (cognitive 35) apps/desktop/src/lib/sql/semantic/diagnostics.ts:268 — diagnostics.buildSqlSemanticDiagnostics has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 4, boolean chains 3, ternaries 2 (3 pts) (nesting depth added 14). Of this number, 33 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.parseTrailingIdentifierPart (cognitive 35) · ×1
  • sqlCompletion.parseTrailingIdentifierPart (cognitive 35) apps/desktop/src/lib/sql/sqlCompletion.ts:3364 — sqlCompletion.parseTrailingIdentifierPart has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildComparisonValueItems (cognitive 35) · ×1
  • sqlCompletion.buildComparisonValueItems (cognitive 35) apps/desktop/src/lib/sql/sqlCompletion.ts:5567 — sqlCompletion.buildComparisonValueItems has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 6, loops 2 (3 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.maskTriggerCommentsAndStrings (cognitive 35) · ×1
  • oracleTableRename.maskTriggerCommentsAndStrings (cognitive 35) REDACTED:196 — oracleTableRename.maskTriggerCommentsAndStrings has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 15). Of this number, 31 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.normalizeConnection (cognitive 35) · ×1
  • connectionStore.useConnectionStore.normalizeConnection (cognitive 35) apps/desktop/src/stores/connectionStore.ts:1751 — connectionStore.useConnectionStore.normalizeConnection has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 17, if/else 9, ternaries 9. Of this number, 33 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.setValue (cognitive 35) · ×1
  • plDebugStore.usePlDebugStore.setValue (cognitive 35) apps/desktop/src/stores/plDebugStore.ts:1702 — plDebugStore.usePlDebugStore.setValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 10, ternaries 6 (8 pts), error handling 3 (nesting depth added 3). Of this number, 34 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.resolveResultMetadataForBatch (cognitive 35) · ×1
  • queryStore.useQueryStore.resolveResultMetadataForBatch (cognitive 35) apps/desktop/src/stores/queryStore.ts:10597 — queryStore.useQueryStore.resolveResultMetadataForBatch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 10, ternaries 4 (8 pts), loops 1 (nesting depth added 12). Of this number, 29 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Nb3Archive · ×1
  • Nb3Archive::restore_steps (cognitive 34) REDACTED:481 — Nb3Archive::restore_steps has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 8 (10 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputResolver · ×1
  • InputResolver::resolve (cognitive 34) crates/dbx-sql-schema/src/sql_parser/input.rs:74 — InputResolver::resolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (9 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.handleRequest (cognitive 34) · ×1
  • DbxJdbcPlugin.handleRequest (cognitive 34) REDACTED:693 — DbxJdbcPlugin.handleRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (8 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugNative.stackResult (cognitive 34) · ×1
  • PlDebugNative.stackResult (cognitive 34) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:236 — PlDebugNative.stackResult has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 13 (28 pts), boolean chains 3, if/else 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTypeMetadata.resolveObjectOwner (cognitive 34) · ×1
  • PlDebugTypeMetadata.resolveObjectOwner (cognitive 34) REDACTED:37 — PlDebugTypeMetadata.resolveObjectOwner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 2 (5 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlStorage.stripOracleStorageAttributes (cognitive 34) · ×1
  • ddlStorage.stripOracleStorageAttributes (cognitive 34) apps/desktop/src/lib/sql/ddlStorage.ts:216 — ddlStorage.stripOracleStorageAttributes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 11, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cognitive 34) · ×1
  • useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable (cognitive 34) apps/desktop/src/components/editor/useQueryEditorCompletionMetadata.ts:421 — useQueryEditorCompletionMetadata.useQueryEditorCompletionMetadata.ensureColumnsForTable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useCellDetailEditor.useCellDetailEditor.create (cognitive 34) · ×1
  • useCellDetailEditor.useCellDetailEditor.create (cognitive 34) apps/desktop/src/composables/useCellDetailEditor.ts:239 — useCellDetailEditor.useCellDetailEditor.create has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 8 (10 pts), boolean chains 4 (nesting depth added 7). Of this number, 20 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useDataGridActions.useDataGridActions.onSort (cognitive 34) · ×1
  • useDataGridActions.useDataGridActions.onSort (cognitive 34) apps/desktop/src/composables/useDataGridActions.ts:751 — useDataGridActions.useDataGridActions.onSort has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 8 (16 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeJsonFormat.decodeJsonSource (cognitive 34) · ×1
  • safeJsonFormat.decodeJsonSource (cognitive 34) apps/desktop/src/lib/common/safeJsonFormat.ts:127 — safeJsonFormat.decodeJsonSource has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 17). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cognitive 34) · ×1
  • legacyLargeValueExport.fetchLegacyLargeValueRequestChunk (cognitive 34) apps/desktop/src/lib/dataGrid/legacyLargeValueExport.ts:86 — legacyLargeValueExport.fetchLegacyLargeValueRequestChunk has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 9 (15 pts), if/else 10 (12 pts), boolean chains 5, loops 2 (nesting depth added 8). Of this number, 24 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.readPlan (cognitive 34) · ×1
  • oceanbaseSessionDiagnostics.readPlan (cognitive 34) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:320 — oceanbaseSessionDiagnostics.readPlan has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 10, if/else 7 (8 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguUserPermissions.xuguRevokeSql (cognitive 34) · ×1
  • xuguUserPermissions.xuguRevokeSql (cognitive 34) apps/desktop/src/lib/database/xuguUserPermissions.ts:627 — xuguUserPermissions.xuguRevokeSql has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7, ternaries 5 (7 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · xuguExplainPlan.parseXuguExplainText (cognitive 34) · ×1
  • xuguExplainPlan.parseXuguExplainText (cognitive 34) REDACTED:20 — xuguExplainPlan.parseXuguExplainText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 3 (6 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlDialect.codeMirrorBaseDialect (cognitive 34) · ×1
  • codemirrorSqlDialect.codeMirrorBaseDialect (cognitive 34) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:352 — codemirrorSqlDialect.codeMirrorBaseDialect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cognitive 34) · ×1
  • queryEditorNativeSelection.createQueryEditorNativeSelectionGuard (cognitive 34) apps/desktop/src/lib/editor/queryEditorNativeSelection.ts:536 — queryEditorNativeSelection.createQueryEditorNativeSelectionGuard has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 12, ternaries 4 (8 pts) (nesting depth added 5). Most of this is not in the body itself: 6 of the 34 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 627, 645, 582, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · elasticsearchCompletion.flattenElasticsearchMappingFields (cognitive 34) · ×1
  • elasticsearchCompletion.flattenElasticsearchMappingFields (cognitive 34) apps/desktop/src/lib/elasticsearch/elasticsearchCompletion.ts:232 — elasticsearchCompletion.flattenElasticsearchMappingFields has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 3 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandPreview.redisDeleteKeysPreview (cognitive 34) · ×1
  • redisCommandPreview.redisDeleteKeysPreview (cognitive 34) apps/desktop/src/lib/redis/redisCommandPreview.ts:248 — redisCommandPreview.redisDeleteKeysPreview has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (9 pts), error handling 1 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisContentSearch.worker.onmessage (cognitive 34) · ×1
  • redisContentSearch.worker.onmessage (cognitive 34) apps/desktop/src/lib/redis/redisContentSearch.worker.ts:5 — redisContentSearch.worker.onmessage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 2 (7 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 18). Of this number, 21 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagnostics.leadingUnquotedSqlKeywords (cognitive 34) · ×1
  • diagnostics.leadingUnquotedSqlKeywords (cognitive 34) apps/desktop/src/lib/sql/semantic/diagnostics.ts:88 — diagnostics.leadingUnquotedSqlKeywords has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 2 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.stripSqlComments (cognitive 34) · ×1
  • sqlAnalysis.stripSqlComments (cognitive 34) apps/desktop/src/lib/sql/sqlAnalysis.ts:878 — sqlAnalysis.stripSqlComments has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.maskSqlForStructureScan (cognitive 34) · ×1
  • sqlCompletion.maskSqlForStructureScan (cognitive 34) apps/desktop/src/lib/sql/sqlCompletion.ts:2562 — sqlCompletion.maskSqlForStructureScan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.currentSqlLikeLineBlockSpan (cognitive 34) · ×1
  • sqlCompletion.currentSqlLikeLineBlockSpan (cognitive 34) apps/desktop/src/lib/sql/sqlCompletion.ts:2615 — sqlCompletion.currentSqlLikeLineBlockSpan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectSourceTabSave.saveObjectSourceTab (cognitive 34) · ×1
  • objectSourceTabSave.saveObjectSourceTab (cognitive 34) apps/desktop/src/lib/table/objectSourceTabSave.ts:18 — objectSourceTabSave.saveObjectSourceTab has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (14 pts), ternaries 3 (5 pts), error handling 1 (nesting depth added 5). Of this number, 29 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.verifyBeforeDrop (cognitive 34) · ×1
  • oracleRoutineRename.verifyBeforeDrop (cognitive 34) apps/desktop/src/lib/table/oracleRoutineRename.ts:614 — oracleRoutineRename.verifyBeforeDrop has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 4 (8 pts), loops 4 (5 pts) (nesting depth added 9). Of this number, 30 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.runPublicOperation (cognitive 34) · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation (cognitive 34) apps/desktop/src/stores/plDebugStore.ts:433 — plDebugStore.usePlDebugStore.runPublicOperation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 28, error handling 3 (6 pts), ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation::dispatch) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · queryStore.useQueryStore.createTab (cognitive 34) · ×1
  • queryStore.useQueryStore.createTab (cognitive 34) apps/desktop/src/stores/queryStore.ts:3177 — queryStore.useQueryStore.createTab has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 13, ternaries 5 (nesting depth added 8). Of this number, 29 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsStore.normalizeMcpGlobalPolicy (cognitive 34) · ×1
  • settingsStore.normalizeMcpGlobalPolicy (cognitive 34) apps/desktop/src/stores/settingsStore.ts:203 — settingsStore.normalizeMcpGlobalPolicy has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 21, ternaries 8 (9 pts), if/else 4 (nesting depth added 1). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 208, 214, 245, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · publish (cognitive 34) · ×1
  • publish (cognitive 34) .github/ui-preview/publish.mjs:167 — publish has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 8 (9 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registerDbxMcpBridge (cognitive 34) · ×1
  • registerDbxMcpBridge (cognitive 34) crates/dbx-ai-provider/assets/pi-mcp-bridge.mjs:43 — registerDbxMcpBridge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (17 pts), other 8, boolean chains 4, error handling 2, loops 2, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 84, a function literal at line 111, execute, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · dbx_sqlite_worker · ×1
  • dbx_sqlite_worker::runtime::query_statement (cognitive 33) crates/dbx-sqlite-worker/src/runtime.rs:141 — dbx_sqlite_worker::runtime::query_statement has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 3 (10 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DbxJdbcPlugin.listSchemas (cognitive 33) · ×1
  • DbxJdbcPlugin.listSchemas (cognitive 33) REDACTED:2980 — DbxJdbcPlugin.listSchemas has cognitive complexity 33 (threshold 15). Drivers by points: error handling 8 (20 pts), if/else 8 (11 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeLegacyJobSession.prepare (cognitive 33) · ×1
  • NativeLegacyJobSession.prepare (cognitive 33) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:139 — NativeLegacyJobSession.prepare has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 6 (7 pts), boolean chains 6, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OceanBaseLobValues.mark (cognitive 33) · ×1
  • OceanBaseLobValues.mark (cognitive 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:231 — OceanBaseLobValues.mark has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 4 (9 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.continueWith (cognitive 33) · ×1
  • PlDebugSession.continueWith (cognitive 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:2179 — PlDebugSession.continueWith has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 4, error handling 1, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.copy (cognitive 33) · ×1
  • PlDebugTemporalJson.copy (cognitive 33) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:132 — PlDebugTemporalJson.copy has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.bulkWriteModel (cognitive 33) · ×1
  • MongoAgent.bulkWriteModel (cognitive 33) REDACTED:2275 — MongoAgent.bulkWriteModel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (6 pts), ternaries 2 (5 pts), match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ci-gradle.acquire_and_run (cognitive 33) · ×1
  • ci-gradle.acquire_and_run (cognitive 33) .github/scripts/ci-gradle.py:122 — ci-gradle.acquire_and_run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 8, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openTabsPersistence.restoreOpenTabsArray (cognitive 33) · ×1
  • openTabsPersistence.restoreOpenTabsArray (cognitive 33) apps/desktop/src/lib/app/openTabsPersistence.ts:276 — openTabsPersistence.restoreOpenTabsArray has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 14 (15 pts), boolean chains 9, if/else 7 (8 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 299, 283, 303). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · dataGridColumnFilter.splitTopLevelAnd (cognitive 33) · ×1
  • dataGridColumnFilter.splitTopLevelAnd (cognitive 33) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:121 — dataGridColumnFilter.splitTopLevelAnd has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSessionDiagnostics.collectOracleSessionDiagnostics (cognitive 33) · ×1
  • oracleSessionDiagnostics.collectOracleSessionDiagnostics (cognitive 33) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:270 — oracleSessionDiagnostics.collectOracleSessionDiagnostics has cognitive complexity 33 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 9 (12 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguUserPermissions.decodeXuguAuthority (cognitive 33) · ×1
  • xuguUserPermissions.decodeXuguAuthority (cognitive 33) apps/desktop/src/lib/database/xuguUserPermissions.ts:476 — xuguUserPermissions.decodeXuguAuthority has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugAnonymousBlock.stripPlSqlComments (cognitive 33) · ×1
  • plDebugAnonymousBlock.stripPlSqlComments (cognitive 33) apps/desktop/src/lib/debug/plDebugAnonymousBlock.ts:22 — plDebugAnonymousBlock.stripPlSqlComments has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shortcutDisplay.shortcutKeyLabel (cognitive 33) · ×1
  • shortcutDisplay.shortcutKeyLabel (cognitive 33) apps/desktop/src/lib/editor/shortcutDisplay.ts:84 — shortcutDisplay.shortcutKeyLabel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16, ternaries 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · pluginUiHtmlCache.inlineLocalUiAssets (cognitive 33) · ×1
  • pluginUiHtmlCache.inlineLocalUiAssets (cognitive 33) apps/desktop/src/lib/plugins/pluginUiHtmlCache.ts:88 — pluginUiHtmlCache.inlineLocalUiAssets has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (7 pts), boolean chains 5, ternaries 2 (nesting depth added 13). Of this number, 23 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandDocs.commandKeySpecs (cognitive 33) · ×1
  • redisCommandDocs.commandKeySpecs (cognitive 33) apps/desktop/src/lib/redis/redisCommandDocs.ts:126 — redisCommandDocs.commandKeySpecs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CypherPrinter.format (cognitive 33) · ×1
  • CypherPrinter.format (cognitive 33) apps/desktop/src/lib/sql/cypherFormatter.ts:369 — CypherPrinter.format has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.singularTableName (cognitive 33) · ×1
  • sqlCompletion.singularTableName (cognitive 33) apps/desktop/src/lib/sql/sqlCompletion.ts:6423 — sqlCompletion.singularTableName has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 12 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.runPublicOperation · ×1
  • plDebugStore.usePlDebugStore.runPublicOperation::dispatch (cognitive 33) apps/desktop/src/stores/plDebugStore.ts:453 — plDebugStore.usePlDebugStore.runPublicOperation::dispatch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 11, error handling 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (plDebugStore.usePlDebugStore.runPublicOperation) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · bringIntoView (cognitive 33) · ×1
  • bringIntoView (cognitive 33) REDACTED:398 — bringIntoView has cognitive complexity 33 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 3 (9 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 16). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 401, 434). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AgentRuntimeClient · ×1
  • AgentRuntimeClient::call_typed_with_policy (cognitive 32) crates/dbx-driver-agent/src/agent_driver.rs:232 — AgentRuntimeClient::call_typed_with_policy has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 5 (10 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DialectYaml · ×1
  • DialectYaml::build_capability_flags (cognitive 32) REDACTED:539 — DialectYaml::build_capability_flags has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PlDebugCompositeInput.payloadBytes (cognitive 32) · ×1
  • PlDebugCompositeInput.payloadBytes (cognitive 32) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:49 — PlDebugCompositeInput.payloadBytes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (9 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KafkaAgent.getConsumerGroupSnapshot (cognitive 32) · ×1
  • KafkaAgent.getConsumerGroupSnapshot (cognitive 32) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1254 — KafkaAgent.getConsumerGroupSnapshot has cognitive complexity 32 (threshold 15). Drivers by points: loops 7 (13 pts), error handling 3 (7 pts), if/else 4 (6 pts), ternaries 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.splitTableDdlDefinitions (cognitive 32) · ×1
  • DamengAgent.splitTableDdlDefinitions (cognitive 32) REDACTED:2339 — DamengAgent.splitTableDdlDefinitions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useTauriEvents.useTauriEvents.setupTauriListeners (cognitive 32) · ×1
  • useTauriEvents.useTauriEvents.setupTauriListeners (cognitive 32) apps/desktop/src/composables/useTauriEvents.ts:28 — useTauriEvents.useTauriEvents.setupTauriListeners has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14, error handling 10, loops 5, boolean chains 3. None of this is in the body itself: all 32 points belong to 11 function literals inside it that branch (lines 41, 87, 64, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · connectionConfigTransfer.prepareConnectionConfigImport (cognitive 32) · ×1
  • connectionConfigTransfer.prepareConnectionConfigImport (cognitive 32) apps/desktop/src/lib/connection/connectionConfigTransfer.ts:209 — connectionConfigTransfer.prepareConnectionConfigImport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 7 (12 pts), boolean chains 4, ternaries 2 (nesting depth added 13). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.readAudit (cognitive 32) · ×1
  • oceanbaseSessionDiagnostics.readAudit (cognitive 32) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:181 — oceanbaseSessionDiagnostics.readAudit has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 6 (10 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cognitive 32) · ×1
  • oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan (cognitive 32) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:268 — oceanbaseSessionDiagnostics.parseOceanbaseCachedPlan has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 6 (10 pts), boolean chains 7, loops 1 (nesting depth added 10). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.validateOracleForeignKeySourceChanges (cognitive 32) · ×1
  • oracleForeignKeys.validateOracleForeignKeySourceChanges (cognitive 32) apps/desktop/src/lib/database/oracleForeignKeys.ts:263 — oracleForeignKeys.validateOracleForeignKeySourceChanges has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 11, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cognitive 32) · ×1
  • oracleIndexes.mergeOracleIndexDraftsAfterRefresh (cognitive 32) apps/desktop/src/lib/database/oracleIndexes.ts:263 — oracleIndexes.mergeOracleIndexDraftsAfterRefresh has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 5 (10 pts), boolean chains 9, loops 2 (nesting depth added 11). Of this number, 27 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.executeTriggerSequence · ×1
  • oracleTriggerPlan.executeTriggerSequence::run (cognitive 32) apps/desktop/src/lib/database/oracleTriggerPlan.ts:516 — oracleTriggerPlan.executeTriggerSequence::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 3 (6 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.parseOracleExplainText (cognitive 32) · ×1
  • explainPlan.parseOracleExplainText (cognitive 32) apps/desktop/src/lib/diagram/explainPlan.ts:175 — explainPlan.parseOracleExplainText has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (10 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 11). Of this number, 30 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keyboardShortcuts.matchesShortcut (cognitive 32) · ×1
  • keyboardShortcuts.matchesShortcut (cognitive 32) apps/desktop/src/lib/editor/keyboardShortcuts.ts:142 — keyboardShortcuts.matchesShortcut has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 8 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nacosAdmin.normalizeNacosEndpoint (cognitive 32) · ×1
  • nacosAdmin.normalizeNacosEndpoint (cognitive 32) apps/desktop/src/lib/nacos/nacosAdmin.ts:129 — nacosAdmin.normalizeNacosEndpoint has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 10, if/else 7 (10 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedisCollectionSearchController.scan (cognitive 32) · ×1
  • RedisCollectionSearchController.scan (cognitive 32) apps/desktop/src/lib/redis/redisCollectionSearchController.ts:178 — RedisCollectionSearchController.scan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.refreshOracleRoutineDeployment (cognitive 32) · ×1
  • oracleRoutineDeploy.refreshOracleRoutineDeployment (cognitive 32) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:569 — oracleRoutineDeploy.refreshOracleRoutineDeployment has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 12, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 6). Of this number, 27 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cognitive 32) · ×1
  • mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql (cognitive 32) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:138 — mysqlRoutineSyntaxDiagnostics.tokenizeMysqlRoutineSql has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (14 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sqlAnalysis.containsTopLevelAggregate (cognitive 32) · ×1
  • sqlAnalysis.containsTopLevelAggregate (cognitive 32) apps/desktop/src/lib/sql/sqlAnalysis.ts:833 — sqlAnalysis.containsTopLevelAggregate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerQueryWrapping.topLevelSqlTokens (cognitive 32) · ×1
  • sqlServerQueryWrapping.topLevelSqlTokens (cognitive 32) apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts:32 — sqlServerQueryWrapping.topLevelSqlTokens has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariables.collectDeclarations (cognitive 32) · ×1
  • sqlVariables.collectDeclarations (cognitive 32) apps/desktop/src/lib/sql/sqlVariables.ts:67 — sqlVariables.collectDeclarations has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.syncTabTitleNumbers (cognitive 32) · ×1
  • tabPresentation.syncTabTitleNumbers (cognitive 32) apps/desktop/src/lib/tabs/tabPresentation.ts:219 — tabPresentation.syncTabTitleNumbers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabTooltipLines (cognitive 32) · ×1
  • tabPresentation.tabTooltipLines (cognitive 32) apps/desktop/src/lib/tabs/tabPresentation.ts:386 — tabPresentation.tabTooltipLines has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, if/else 12 (14 pts), ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · tabPresentation.tabIconClass (cognitive 32) · ×1
  • tabPresentation.tabIconClass (cognitive 32) apps/desktop/src/lib/tabs/tabPresentation.ts:811 — tabPresentation.tabIconClass has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.applyLoadedObjectSource (cognitive 32) · ×1
  • queryStore.useQueryStore.applyLoadedObjectSource (cognitive 32) apps/desktop/src/stores/queryStore.ts:3542 — queryStore.useQueryStore.applyLoadedObjectSource has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 10, ternaries 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cognitive 32) · ×1
  • queryStore.useQueryStore.resolveEditableSourceMetadataTarget (cognitive 32) apps/desktop/src/stores/queryStore.ts:7198 — queryStore.useQueryStore.resolveEditableSourceMetadataTarget has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 24, ternaries 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · json.hasUnclosedMongoDelimiters (cognitive 32) · ×1
  • json.hasUnclosedMongoDelimiters (cognitive 32) packages/mongo-shell/src/json.ts:306 — json.hasUnclosedMongoDelimiters has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (7 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Nb3SqlReader · ×1
  • Nb3SqlReader::next_tuple (cognitive 31) REDACTED:741 — Nb3SqlReader::next_tuple has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Resolver · ×1
  • Resolver::call (cognitive 31) crates/dbx-core/src/schema/oracle_routines/references.rs:363 — Resolver::call has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleSchemaSyncTableDdl · ×1
  • OracleSchemaSyncTableDdl::render_triggers (cognitive 31) crates/dbx-sql-schema/src/schema_diff/oracle_indexes.rs:185 — OracleSchemaSyncTableDdl::render_triggers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.procedure (cognitive 31) · ×1
  • PlDebugCompositeOutput.procedure (cognitive 31) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:174 — PlDebugCompositeOutput.procedure has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (6 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.configureBuilder (cognitive 31) · ×1
  • MongoAgent.configureBuilder (cognitive 31) REDACTED:159 — MongoAgent.configureBuilder has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 11, ternaries 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor (cognitive 31) · ×1
  • useDataGridEditor.useDataGridEditor (cognitive 31) apps/desktop/src/composables/useDataGridEditor.ts:374 — useDataGridEditor.useDataGridEditor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 11 (nesting depth added 5). Of this number, 16 points are the body's own statements and 15 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · regexGenerate.parseAtom (cognitive 31) · ×1
  • regexGenerate.parseAtom (cognitive 31) REDACTED:240 — regexGenerate.parseAtom has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.prepareOracleForeignKeyPlan (cognitive 31) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyPlan (cognitive 31) apps/desktop/src/lib/database/oracleForeignKeys.ts:647 — oracleForeignKeys.prepareOracleForeignKeyPlan has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 12, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datagripImport.extractUserName (cognitive 31) · ×1
  • datagripImport.extractUserName (cognitive 31) REDACTED:335 — datagripImport.extractUserName has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navicatImport.parseConnection (cognitive 31) · ×1
  • navicatImport.parseConnection (cognitive 31) REDACTED:283 — navicatImport.parseConnection has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, ternaries 8 (10 pts), if/else 5 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoCompletion.classifyMethodOptions (cognitive 31) · ×1
  • mongoCompletion.classifyMethodOptions (cognitive 31) REDACTED:1416 — mongoCompletion.classifyMethodOptions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCompletion.argumentTokenItems (cognitive 31) · ×1
  • redisCompletion.argumentTokenItems (cognitive 31) apps/desktop/src/lib/redis/redisCompletion.ts:389 — redisCompletion.argumentTokenItems has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 7 (12 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 15). Of this number, 24 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddl.createTableLayout (cognitive 31) · ×1
  • ddl.createTableLayout (cognitive 31) apps/desktop/src/lib/sql/layout/ddl.ts:86 — ddl.createTableLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 111, 100, 106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · diagnostics.isSqlServerGoSeparatorLine (cognitive 31) · ×1
  • diagnostics.isSqlServerGoSeparatorLine (cognitive 31) apps/desktop/src/lib/sql/semantic/diagnostics.ts:167 — diagnostics.isSqlServerGoSeparatorLine has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 6 (9 pts), boolean chains 8 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.findTopLevelKeyword (cognitive 31) · ×1
  • sqlAnalysis.findTopLevelKeyword (cognitive 31) apps/desktop/src/lib/sql/sqlAnalysis.ts:981 — sqlAnalysis.findTopLevelKeyword has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDatabaseLinks.collectSqlXmlKeywordPositions (cognitive 31) · ×1
  • sqlDatabaseLinks.collectSqlXmlKeywordPositions (cognitive 31) apps/desktop/src/lib/sql/sqlDatabaseLinks.ts:10 — sqlDatabaseLinks.collectSqlXmlKeywordPositions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 9, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starrocksDdlDisplay.formatStarRocksDdlForDisplay (cognitive 31) · ×1
  • starrocksDdlDisplay.formatStarRocksDdlForDisplay (cognitive 31) apps/desktop/src/lib/sql/starrocksDdlDisplay.ts:57 — starrocksDdlDisplay.formatStarRocksDdlForDisplay has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (10 pts), ternaries 1 (3 pts), loops 2 (nesting depth added 4). Of this number, 23 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot (cognitive 31) · ×1
  • connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot (cognitive 31) apps/desktop/src/stores/connectionStore.ts:3556 — connectionStore.useConnectionStore.isReusableTdengineTreeSnapshot has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.closeTab (cognitive 31) · ×1
  • queryStore.useQueryStore.closeTab (cognitive 31) apps/desktop/src/stores/queryStore.ts:5193 — queryStore.useQueryStore.closeTab has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.duplicateTab (cognitive 31) · ×1
  • queryStore.useQueryStore.duplicateTab (cognitive 31) apps/desktop/src/stores/queryStore.ts:5489 — queryStore.useQueryStore.duplicateTab has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 21 (22 pts), if/else 5, boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.commitTransaction (cognitive 31) · ×1
  • queryStore.useQueryStore.commitTransaction (cognitive 31) apps/desktop/src/stores/queryStore.ts:6271 — queryStore.useQueryStore.commitTransaction has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6286, 6321). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · queryStore.useQueryStore.captureQueryResultExportRequest (cognitive 31) · ×1
  • queryStore.useQueryStore.captureQueryResultExportRequest (cognitive 31) apps/desktop/src/stores/queryStore.ts:11451 — queryStore.useQueryStore.captureQueryResultExportRequest has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 11 (12 pts), boolean chains 11, if/else 8 (nesting depth added 1). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 11493, assertSourceAvailable). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PlDebugCompositeInput.child (cognitive 30) · ×1
  • PlDebugCompositeInput.child (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:217 — PlDebugCompositeInput.child has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 11, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Writer.composite (cognitive 30) · ×1
  • Writer.composite (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:321 — Writer.composite has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 4 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.bindComposite (cognitive 30) · ×1
  • Plan.bindComposite (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:473 — Plan.bindComposite has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 4 (15 pts), if/else 6 (9 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.<init> (cognitive 30) · ×1
  • Plan.<init> (cognitive 30) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:203 — Plan.<init> has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundStatement.validate (cognitive 30) · ×1
  • BlobBoundStatement.validate (cognitive 30) agents/common/src/main/java/com/dbx/agent/BlobBoundStatement.java:20 — BlobBoundStatement.validate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.resultToExport (cognitive 30) · ×1
  • useDataGridExport.useDataGridExport.resultToExport (cognitive 30) apps/desktop/src/composables/useDataGridExport.ts:599 — useDataGridExport.useDataGridExport.resultToExport has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (17 pts), boolean chains 9, if/else 3 (4 pts) (nesting depth added 5). Of this number, 27 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useQuickOpen.matchQuickOpenText (cognitive 30) · ×1
  • useQuickOpen.matchQuickOpenText (cognitive 30) apps/desktop/src/composables/useQuickOpen.ts:198 — useQuickOpen.matchQuickOpenText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.localeFromLanguageTag (cognitive 30) · ×1
  • index.localeFromLanguageTag (cognitive 30) apps/desktop/src/i18n/index.ts:39 — index.localeFromLanguageTag has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 14 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ai.buildSystemPrompt (cognitive 30) · ×1
  • ai.buildSystemPrompt (cognitive 30) apps/desktop/src/lib/ai/ai.ts:396 — ai.buildSystemPrompt has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 14 (22 pts), if/else 7, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · http.aiStream (cognitive 30) · ×1
  • http.aiStream (cognitive 30) apps/desktop/src/lib/backend/http.ts:2333 — http.aiStream has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), error handling 1 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.findGeneratorKey (cognitive 30) · ×1
  • dataGenerate.findGeneratorKey (cognitive 30) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1199 — dataGenerate.findGeneratorKey has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 9, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnType.resolveDataGridTypeVisualKind (cognitive 30) · ×1
  • dataGridColumnType.resolveDataGridTypeVisualKind (cognitive 30) apps/desktop/src/lib/dataGrid/dataGridColumnType.ts:353 — dataGridColumnType.resolveDataGridTypeVisualKind has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cognitive 30) · ×1
  • codemirrorCurrentStatementFrameLayer.currentStatementFrameRect (cognitive 30) apps/desktop/src/lib/editor/codemirrorCurrentStatementFrameLayer.ts:70 — codemirrorCurrentStatementFrameLayer.currentStatementFrameRect has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 4 (8 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphCompletion.buildGraphCompletionItems (cognitive 30) · ×1
  • graphCompletion.buildGraphCompletionItems (cognitive 30) apps/desktop/src/lib/graph/graphCompletion.ts:142 — graphCompletion.buildGraphCompletionItems has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, ternaries 3 (4 pts), loops 1 (3 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · neo4jNodeResult.projectNeo4jNodeResult (cognitive 30) · ×1
  • neo4jNodeResult.projectNeo4jNodeResult (cognitive 30) apps/desktop/src/lib/neo4j/neo4jNodeResult.ts:62 — neo4jNodeResult.projectNeo4jNodeResult has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (12 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagnostics.updateSqlServerBatchScanState (cognitive 30) · ×1
  • diagnostics.updateSqlServerBatchScanState (cognitive 30) apps/desktop/src/lib/sql/semantic/diagnostics.ts:206 — diagnostics.updateSqlServerBatchScanState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 2 (7 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.sqlSemanticTableNameSpans (cognitive 30) · ×1
  • model.sqlSemanticTableNameSpans (cognitive 30) apps/desktop/src/lib/sql/semantic/model.ts:155 — model.sqlSemanticTableNameSpans has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFormatter.formatLeadingCommas (cognitive 30) · ×1
  • sqlFormatter.formatLeadingCommas (cognitive 30) apps/desktop/src/lib/sql/sqlFormatter.ts:863 — sqlFormatter.formatLeadingCommas has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.resultRunSourceLabel (cognitive 30) · ×1
  • tabPresentation.resultRunSourceLabel (cognitive 30) apps/desktop/src/lib/tabs/tabPresentation.ts:626 — tabPresentation.resultRunSourceLabel has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 6 (9 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.closeOriginal (cognitive 30) · ×1
  • plDebugStore.usePlDebugStore.closeOriginal (cognitive 30) apps/desktop/src/stores/plDebugStore.ts:1810 — plDebugStore.usePlDebugStore.closeOriginal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, error handling 2 (3 pts) (nesting depth added 7). Of this number, 28 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.annotateQueryResultSources (cognitive 30) · ×1
  • queryStore.annotateQueryResultSources (cognitive 30) apps/desktop/src/stores/queryStore.ts:546 — queryStore.annotateQueryResultSources has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.rollbackTransaction (cognitive 30) · ×1
  • queryStore.useQueryStore.rollbackTransaction (cognitive 30) apps/desktop/src/stores/queryStore.ts:6333 — queryStore.useQueryStore.rollbackTransaction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 6346). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agentBundle.assembleCustomBundle (cognitive 30) · ×1
  • agentBundle.assembleCustomBundle (cognitive 30) docs/lib/agentBundle.ts:469 — agentBundle.assembleCustomBundle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 506, a function literal at line 535, reportDownload). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · McpGlobalPolicy · ×1
  • McpGlobalPolicy::normalized (cognitive 29) REDACTED:792 — McpGlobalPolicy::normalized has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, loops 4, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpannerAgent.completionAssistantSearch (cognitive 29) · ×1
  • SpannerAgent.completionAssistantSearch (cognitive 29) agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:344 — SpannerAgent.completionAssistantSearch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.evaluateBreakpointRules (cognitive 29) · ×1
  • PlDebugSession.evaluateBreakpointRules (cognitive 29) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1262 — PlDebugSession.evaluateBreakpointRules has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.decodeZoned (cognitive 29) · ×1
  • PlDebugTarget.decodeZoned (cognitive 29) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1211 — PlDebugTarget.decodeZoned has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 6 (9 pts), boolean chains 7, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonRpcServer.legacyJob (cognitive 29) · ×1
  • JsonRpcServer.legacyJob (cognitive 29) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:668 — JsonRpcServer.legacyJob has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dbx_tunnel.run_worker (cognitive 29) · ×1
  • dbx_tunnel.run_worker (cognitive 29) deploy/dbx_tunnel.php:168 — dbx_tunnel.run_worker has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, error handling 1, loops 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.statementRangeAtCursor (cognitive 29) · ×1
  • sqlStatementRanges.statementRangeAtCursor (cognitive 29) apps/desktop/src/lib/sql/sqlStatementRanges.ts:761 — sqlStatementRanges.statementRangeAtCursor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 9, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferStrategy.createTransferSubmission.start (cognitive 29) · ×1
  • transferStrategy.createTransferSubmission.start (cognitive 29) apps/desktop/src/components/transfer/transferStrategy.ts:101 — transferStrategy.createTransferSubmission.start has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cognitive 29) · ×1
  • useNavigationTargets.useNavigationTargets.onStructureEditorSaved (cognitive 29) apps/desktop/src/composables/useNavigationTargets.ts:415 — useNavigationTargets.useNavigationTargets.onStructureEditorSaved has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, error handling 3 (6 pts), loops 1, ternaries 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorUtils.normalizeBackendErrorAtDepth (cognitive 29) · ×1
  • errorUtils.normalizeBackendErrorAtDepth (cognitive 29) apps/desktop/src/lib/backend/errorUtils.ts:206 — errorUtils.normalizeBackendErrorAtDepth has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridSelectionPersistence.captureDataGridSelection (cognitive 29) · ×1
  • dataGridSelectionPersistence.captureDataGridSelection (cognitive 29) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:134 — dataGridSelectionPersistence.captureDataGridSelection has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 7 (9 pts), boolean chains 7 (nesting depth added 7). Of this number, 23 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cognitive 29) · ×1
  • databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants (cognitive 29) apps/desktop/src/lib/database/databaseAuthorizationPlan.ts:125 — databaseAuthorizationPlan.databaseAuthorizationsFromTableGrants has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 6, if/else 3 (6 pts), loops 3 (4 pts) (nesting depth added 11). Of this number, 22 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.nativeJobProgramArgumentLayout (cognitive 29) · ×1
  • nativeJobAdmin.nativeJobProgramArgumentLayout (cognitive 29) apps/desktop/src/lib/database/nativeJobAdmin.ts:269 — nativeJobAdmin.nativeJobProgramArgumentLayout has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 10 (17 pts), boolean chains 8, if/else 4 (nesting depth added 7). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 281, 276). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · explainPlan.parseDamengPlanLine (cognitive 29) · ×1
  • explainPlan.parseDamengPlanLine (cognitive 29) apps/desktop/src/lib/diagram/explainPlan.ts:312 — explainPlan.parseDamengPlanLine has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.buildDamengTree (cognitive 29) · ×1
  • explainPlan.buildDamengTree (cognitive 29) apps/desktop/src/lib/diagram/explainPlan.ts:730 — explainPlan.buildDamengTree has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 9, ternaries 2 (4 pts), loops 3 (nesting depth added 8). Of this number, 26 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hoverTableSql.parseColumnLine (cognitive 29) · ×1
  • hoverTableSql.parseColumnLine (cognitive 29) apps/desktop/src/lib/editor/hoverTableSql.ts:549 — hoverTableSql.parseColumnLine has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlIntentionActions.resolveNavigationTarget (cognitive 29) · ×1
  • sqlIntentionActions.resolveNavigationTarget (cognitive 29) apps/desktop/src/lib/editor/sqlIntentionActions.ts:749 — sqlIntentionActions.resolveNavigationTarget has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, error handling 1 (nesting depth added 14). Of this number, 18 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cognitive 29) · ×1
  • influxDbV1Delete.resolveInfluxDbV1DeleteTarget (cognitive 29) apps/desktop/src/lib/influxdb/influxDbV1Delete.ts:84 — influxDbV1Delete.resolveInfluxDbV1DeleteTarget has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 5, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyFilter (cognitive 29) · ×1
  • mongoCompletion.classifyFilter (cognitive 29) REDACTED:1218 — mongoCompletion.classifyFilter has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (8 pts), boolean chains 4, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mqConsoleDefaults.resolveAvailableMqTabs (cognitive 29) · ×1
  • mqConsoleDefaults.resolveAvailableMqTabs (cognitive 29) apps/desktop/src/lib/mq/mqConsoleDefaults.ts:184 — mqConsoleDefaults.resolveAvailableMqTabs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginShortcuts.collectPluginShortcuts (cognitive 29) · ×1
  • pluginShortcuts.collectPluginShortcuts (cognitive 29) apps/desktop/src/lib/plugins/pluginShortcuts.ts:64 — pluginShortcuts.collectPluginShortcuts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 8, loops 3, ternaries 2 (3 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandDocs.commandArguments (cognitive 29) · ×1
  • redisCommandDocs.commandArguments (cognitive 29) apps/desktop/src/lib/redis/redisCommandDocs.ts:97 — redisCommandDocs.commandArguments has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 4, if/else 1 (2 pts), loops 1 (nesting depth added 12). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.objectMatchesCompletionContext (cognitive 29) · ×1
  • sqlCompletion.objectMatchesCompletionContext (cognitive 29) apps/desktop/src/lib/sql/sqlCompletion.ts:5293 — sqlCompletion.objectMatchesCompletionContext has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 9, ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSourcePaste.readStringLiteral (cognitive 29) · ×1
  • sqlSourcePaste.readStringLiteral (cognitive 29) apps/desktop/src/lib/sql/sqlSourcePaste.ts:224 — sqlSourcePaste.readStringLiteral has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (8 pts), boolean chains 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableSqlTemplates.columnPlaceholderValue (cognitive 29) · ×1
  • tableSqlTemplates.columnPlaceholderValue (cognitive 29) apps/desktop/src/lib/table/tableSqlTemplates.ts:197 — tableSqlTemplates.columnPlaceholderValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 7 (13 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.isWrappedByOuterParens (cognitive 29) · ×1
  • tableStructureEditorState.isWrappedByOuterParens (cognitive 29) apps/desktop/src/lib/table/tableStructureEditorState.ts:1019 — tableStructureEditorState.isWrappedByOuterParens has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.mergeTableTreePageChildren (cognitive 29) · ×1
  • tableTree.mergeTableTreePageChildren (cognitive 29) apps/desktop/src/lib/table/tableTree.ts:447 — tableTree.mergeTableTreePageChildren has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 6, boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 5 function items inside it that branch (addNode, collect, addToParent, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · tableTree.coalesceXuguPackageObjects (cognitive 29) · ×1
  • tableTree.coalesceXuguPackageObjects (cognitive 29) apps/desktop/src/lib/table/tableTree.ts:623 — tableTree.coalesceXuguPackageObjects has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadDorisCatalogTables (cognitive 29) · ×1
  • connectionStore.useConnectionStore.loadDorisCatalogTables (cognitive 29) apps/desktop/src/stores/connectionStore.ts:7126 — connectionStore.useConnectionStore.loadDorisCatalogTables has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 9 (10 pts), boolean chains 4, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 7150). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · queryStore.appendQueryResultSegment (cognitive 29) · ×1
  • queryStore.appendQueryResultSegment (cognitive 29) apps/desktop/src/stores/queryStore.ts:428 — queryStore.appendQueryResultSegment has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 13 (15 pts), boolean chains 8, if/else 4, loops 2 (nesting depth added 2). Of this number, 23 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · requireAiRecommendationUpdate (cognitive 29) · ×1
  • requireAiRecommendationUpdate (cognitive 29) plugins/sdk/dev-host/server.mjs:47 — requireAiRecommendationUpdate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 13, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DegradationChain · ×1
  • DegradationChain::decide (cognitive 28) REDACTED:1680 — DegradationChain::decide has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetainedResults · ×1
  • RetainedResults::manifest (cognitive 28) crates/dbx-core/src/query/pl_debug/results.rs:89 — RetainedResults::manifest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.parseDropIndexesValue (cognitive 28) · ×1
  • MongoAgent.parseDropIndexesValue (cognitive 28) REDACTED:1703 — MongoAgent.parseDropIndexesValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StandardJdbcMetadata.getColumns (cognitive 28) · ×1
  • StandardJdbcMetadata.getColumns (cognitive 28) agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:213 — StandardJdbcMetadata.getColumns has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.scanSqlServerControlFlow (cognitive 28) · ×1
  • sqlStatementRanges.scanSqlServerControlFlow (cognitive 28) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1004 — sqlStatementRanges.scanSqlServerControlFlow has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cognitive 28) · ×1
  • sqlStatementRanges.advanceMysqlRoutineBlockCompleteness (cognitive 28) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2188 — sqlStatementRanges.advanceMysqlRoutineBlockCompleteness has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.compareParsedUpdateVersions (cognitive 28) · ×1
  • useAppUpdater.compareParsedUpdateVersions (cognitive 28) apps/desktop/src/composables/useAppUpdater.ts:49 — useAppUpdater.compareParsedUpdateVersions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (10 pts), boolean chains 3, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridCellDetail.useDataGridCellDetail (cognitive 28) · ×1
  • useDataGridCellDetail.useDataGridCellDetail (cognitive 28) apps/desktop/src/composables/useDataGridCellDetail.ts:9 — useDataGridCellDetail.useDataGridCellDetail has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 8). None of this is in the body itself: all 28 points belong to 5 function literals inside it that branch (lines 38, 67, 30, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportCsv (cognitive 28) · ×1
  • useDataGridExport.useDataGridExport.exportCsv (cognitive 28) apps/desktop/src/composables/useDataGridExport.ts:1482 — useDataGridExport.useDataGridExport.exportCsv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). None of this is in the body itself: all 28 points belong to 2 function literals inside it that branch (lines 1484, 1507). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · dataGridColumnWidthState.saveDataGridColumnWidthState (cognitive 28) · ×1
  • dataGridColumnWidthState.saveDataGridColumnWidthState (cognitive 28) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:257 — dataGridColumnWidthState.saveDataGridColumnWidthState has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 8). Of this number, 23 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridSelectionPersistence.restoreDataGridSelection (cognitive 28) · ×1
  • dataGridSelectionPersistence.restoreDataGridSelection (cognitive 28) apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts:200 — dataGridSelectionPersistence.restoreDataGridSelection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 7 (10 pts), boolean chains 3, loops 1 (nesting depth added 7). Of this number, 24 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineEntryLine.routineBodyCandidateLine (cognitive 28) · ×1
  • oracleRoutineEntryLine.routineBodyCandidateLine (cognitive 28) apps/desktop/src/lib/debug/oracleRoutineEntryLine.ts:80 — oracleRoutineEntryLine.routineBodyCandidateLine has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlBlockFolding.computeBlockFoldRanges (cognitive 28) · ×1
  • codemirrorSqlBlockFolding.computeBlockFoldRanges (cognitive 28) apps/desktop/src/lib/editor/codemirrorSqlBlockFolding.ts:193 — codemirrorSqlBlockFolding.computeBlockFoldRanges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridSnapshot.renderGridSnapshotHtml (cognitive 28) · ×1
  • gridSnapshot.renderGridSnapshotHtml (cognitive 28) apps/desktop/src/lib/gridSnapshot/gridSnapshot.ts:130 — gridSnapshot.renderGridSnapshotHtml has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 21 (23 pts), boolean chains 5 (nesting depth added 2). Of this number, 15 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisCommandTable.firstRedisArgvUpper (cognitive 28) · ×1
  • redisCommandTable.firstRedisArgvUpper (cognitive 28) apps/desktop/src/lib/redis/redisCommandTable.ts:463 — redisCommandTable.firstRedisArgvUpper has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.includeOraclePackageCompanion (cognitive 28) · ×1
  • oracleRoutineDeploy.includeOraclePackageCompanion (cognitive 28) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:130 — oracleRoutineDeploy.includeOraclePackageCompanion has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), ternaries 5 (6 pts), loops 1 (nesting depth added 2). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlCompletion.buildTableItems (cognitive 28) · ×1
  • sqlCompletion.buildTableItems (cognitive 28) apps/desktop/src/lib/sql/sqlCompletion.ts:4951 — sqlCompletion.buildTableItems has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 12 (nesting depth added 4). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 4970). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlParameters.findMatchingXmlTagClose (cognitive 28) · ×1
  • sqlParameters.findMatchingXmlTagClose (cognitive 28) apps/desktop/src/lib/sql/sqlParameters.ts:761 — sqlParameters.findMatchingXmlTagClose has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTableGroups (cognitive 28) · ×1
  • connectionStore.useConnectionStore.loadTableGroups (cognitive 28) apps/desktop/src/stores/connectionStore.ts:8127 — connectionStore.useConnectionStore.loadTableGroups has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.readDataGripImportFile (cognitive 28) · ×1
  • connectionStore.useConnectionStore.readDataGripImportFile (cognitive 28) apps/desktop/src/stores/connectionStore.ts:11006 — connectionStore.useConnectionStore.readDataGripImportFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), error handling 3 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.skipAccordingToRules (cognitive 28) · ×1
  • plDebugStore.usePlDebugStore.skipAccordingToRules (cognitive 28) apps/desktop/src/stores/plDebugStore.ts:1368 — plDebugStore.usePlDebugStore.skipAccordingToRules has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.normalizeGroups (cognitive 28) · ×1
  • queryStore.useQueryStore.normalizeGroups (cognitive 28) apps/desktop/src/stores/queryStore.ts:1329 — queryStore.useQueryStore.normalizeGroups has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.loadDdlViewerTab (cognitive 28) · ×1
  • queryStore.useQueryStore.loadDdlViewerTab (cognitive 28) apps/desktop/src/stores/queryStore.ts:3622 — queryStore.useQueryStore.loadDdlViewerTab has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 25 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · start (cognitive 28) · ×1
  • start (cognitive 28) plugins/sdk/dev-host/sidecar.mjs:99 — start has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 3 (5 pts), boolean chains 3, ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 157, 144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · 2.read (cognitive 27) · ×1
  • 2.read (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:444 — 2.read has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.<init> (cognitive 27) · ×1
  • PlDebugCompositeOutput.<init> (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:27 — PlDebugCompositeOutput.<init> has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (10 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugManager.mutate (cognitive 27) · ×1
  • PlDebugManager.mutate (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:227 — PlDebugManager.mutate has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (9 pts), boolean chains 6, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.constructorLobProfile (cognitive 27) · ×1
  • PlDebugTarget.constructorLobProfile (cognitive 27) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:144 — PlDebugTarget.constructorLobProfile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PoolEntry.borrow (cognitive 27) · ×1
  • PoolEntry.borrow (cognitive 27) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:905 — PoolEntry.borrow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (6 pts), boolean chains 2, error handling 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.elasticsearchRequestLineCandidates (cognitive 27) · ×1
  • sqlStatementRanges.elasticsearchRequestLineCandidates (cognitive 27) apps/desktop/src/lib/sql/sqlStatementRanges.ts:132 — sqlStatementRanges.elasticsearchRequestLineCandidates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.renderNotice (cognitive 27) · ×1
  • index.html.renderNotice (cognitive 27) apps/desktop/index.html:409 — index.html.renderNotice has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12 (17 pts), if/else 5, boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cognitive 27) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension (cognitive 27) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:518 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions.createViewDecorations.currentStatementFrameExtension has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFilePreviewLabel.buildDisplayFileNames (cognitive 27) · ×1
  • sqlFilePreviewLabel.buildDisplayFileNames (cognitive 27) apps/desktop/src/components/sql-file/sqlFilePreviewLabel.ts:15 — sqlFilePreviewLabel.buildDisplayFileNames has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 16). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cognitive 27) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection (cognitive 27) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:809 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportQueuedMongoCollection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 7 (11 pts), boolean chains 3, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 833, 841, 882, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · documentStoreProvider.parseMongoFilterValueAs (cognitive 27) · ×1
  • documentStoreProvider.parseMongoFilterValueAs (cognitive 27) apps/desktop/src/lib/app/documentStoreProvider.ts:914 — documentStoreProvider.parseMongoFilterValueAs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · dataGridCellCoercion.coerceDataGridCellValue (cognitive 27) · ×1
  • dataGridCellCoercion.coerceDataGridCellValue (cognitive 27) apps/desktop/src/lib/dataGrid/dataGridCellCoercion.ts:25 — dataGridCellCoercion.coerceDataGridCellValue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 8 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · largeValueSnapshot.readLargeValueSnapshot (cognitive 27) · ×1
  • largeValueSnapshot.readLargeValueSnapshot (cognitive 27) apps/desktop/src/lib/dataGrid/largeValueSnapshot.ts:31 — largeValueSnapshot.readLargeValueSnapshot has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cognitive 27) · ×1
  • oracleForeignKeys.prepareOracleForeignKeyCreatePlan (cognitive 27) apps/desktop/src/lib/database/oracleForeignKeys.ts:515 — oracleForeignKeys.prepareOracleForeignKeyCreatePlan has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 3 (5 pts), loops 1 (nesting depth added 6). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.loadedColumnType (cognitive 27) · ×1
  • oracleIndexes.loadedColumnType (cognitive 27) apps/desktop/src/lib/database/oracleIndexes.ts:104 — oracleIndexes.loadedColumnType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 3 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · productionSafety.referencedDatabases (cognitive 27) · ×1
  • productionSafety.referencedDatabases (cognitive 27) apps/desktop/src/lib/database/productionSafety.ts:148 — productionSafety.referencedDatabases has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cognitive 27) · ×1
  • codemirrorSqlDialect.createDbxCodeMirrorSqlDialect (cognitive 27) apps/desktop/src/lib/editor/codemirrorSqlDialect.ts:375 — codemirrorSqlDialect.createDbxCodeMirrorSqlDialect has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, ternaries 12 (13 pts), if/else 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · editorThemes.resolveEditorTheme (cognitive 27) · ×1
  • editorThemes.resolveEditorTheme (cognitive 27) apps/desktop/src/lib/editor/editorThemes.ts:700 — editorThemes.resolveEditorTheme has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (24 pts), match/switch 1 (2 pts), if/else 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseExport.runDatabaseExportUntilTerminal (cognitive 27) · ×1
  • databaseExport.runDatabaseExportUntilTerminal (cognitive 27) apps/desktop/src/lib/export/databaseExport.ts:133 — databaseExport.runDatabaseExportUntilTerminal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 12). Of this number, 20 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.synchronizeOracleRoutineSelection (cognitive 27) · ×1
  • oracleRoutineDeploy.synchronizeOracleRoutineSelection (cognitive 27) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:94 — oracleRoutineDeploy.synchronizeOracleRoutineSelection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, ternaries 2 (5 pts), loops 3 (4 pts) (nesting depth added 9). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.compressCypherText (cognitive 27) · ×1
  • cypherFormatter.compressCypherText (cognitive 27) apps/desktop/src/lib/sql/cypherFormatter.ts:524 — cypherFormatter.compressCypherText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · identifierSearch.identifierMatchScore (cognitive 27) · ×1
  • identifierSearch.identifierMatchScore (cognitive 27) apps/desktop/src/lib/sql/identifierSearch.ts:7 — identifierSearch.identifierMatchScore has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · primitives.renderCompactCaseExpression (cognitive 27) · ×1
  • primitives.renderCompactCaseExpression (cognitive 27) apps/desktop/src/lib/sql/layout/primitives.ts:292 — primitives.renderCompactCaseExpression has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1, loops 1 (nesting depth added 13). Of this number, 26 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · completion.sqlCompletionContextFromSemantic (cognitive 27) · ×1
  • completion.sqlCompletionContextFromSemantic (cognitive 27) apps/desktop/src/lib/sql/semantic/completion.ts:338 — completion.sqlCompletionContextFromSemantic has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, ternaries 10 (11 pts), if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlCompletion.computeMatchScore (cognitive 27) · ×1
  • sqlCompletion.computeMatchScore (cognitive 27) apps/desktop/src/lib/sql/sqlCompletion.ts:6794 — sqlCompletion.computeMatchScore has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.reorderTableVGroupEntry (cognitive 27) · ×1
  • tableVGroup.reorderTableVGroupEntry (cognitive 27) apps/desktop/src/lib/table/tableVGroup.ts:278 — tableVGroup.reorderTableVGroupEntry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 9). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (insertNear, removeEntry, entryId). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cognitive 27) · ×1
  • connectionStore.useConnectionStore.loadPagedObjectGroupChildren (cognitive 27) apps/desktop/src/stores/connectionStore.ts:3080 — connectionStore.useConnectionStore.loadPagedObjectGroupChildren has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 6, if/else 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.start (cognitive 27) · ×1
  • plDebugStore.usePlDebugStore.start (cognitive 27) apps/desktop/src/stores/plDebugStore.ts:920 — plDebugStore.usePlDebugStore.start has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 11, error handling 2 (nesting depth added 4). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 947). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SqlServerBatchSplitter · ×1
  • SqlServerBatchSplitter::push_line (cognitive 26) REDACTED:2146 — SqlServerBatchSplitter::push_line has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.registerDrivers (cognitive 26) · ×1
  • DbxJdbcPlugin.registerDrivers (cognitive 26) REDACTED:1105 — DbxJdbcPlugin.registerDrivers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugBreakpointRegistry.set (cognitive 26) · ×1
  • PlDebugBreakpointRegistry.set (cognitive 26) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:94 — PlDebugBreakpointRegistry.set has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 2, ternaries 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCondition.evaluate (cognitive 26) · ×1
  • PlDebugCondition.evaluate (cognitive 26) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCondition.java:33 — PlDebugCondition.evaluate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.queryConstrainedObjectsWithoutValidity (cognitive 26) · ×1
  • DamengAgent.queryConstrainedObjectsWithoutValidity (cognitive 26) REDACTED:1269 — DamengAgent.queryConstrainedObjectsWithoutValidity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EwkbWktDecoder.geometryToWkt (cognitive 26) · ×1
  • EwkbWktDecoder.geometryToWkt (cognitive 26) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:489 — EwkbWktDecoder.geometryToWkt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NativeLegacyJobSession.prepare (cognitive 26) · ×1
  • NativeLegacyJobSession.prepare (cognitive 26) agents/common/src/main/java/com/dbx/agent/NativeLegacyJobSession.java:78 — NativeLegacyJobSession.prepare has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.sapHanaScriptBlockIsComplete (cognitive 26) · ×1
  • sqlStatementRanges.sapHanaScriptBlockIsComplete (cognitive 26) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2482 — sqlStatementRanges.sapHanaScriptBlockIsComplete has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataCompareSession.runDataCompareSession (cognitive 26) · ×1
  • useDataCompareSession.runDataCompareSession (cognitive 26) apps/desktop/src/composables/useDataCompareSession.ts:329 — useDataCompareSession.runDataCompareSession has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), error handling 2 (3 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai.formatSchema (cognitive 26) · ×1
  • ai.formatSchema (cognitive 26) apps/desktop/src/lib/ai/ai.ts:799 — ai.formatSchema has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 803). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · documentStoreProvider.translateFieldFilterToElasticsearchQuery (cognitive 26) · ×1
  • documentStoreProvider.translateFieldFilterToElasticsearchQuery (cognitive 26) apps/desktop/src/lib/app/documentStoreProvider.ts:1047 — documentStoreProvider.translateFieldFilterToElasticsearchQuery has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.buildNativeJobDefinitionCreate (cognitive 26) · ×1
  • nativeJobAdmin.buildNativeJobDefinitionCreate (cognitive 26) apps/desktop/src/lib/database/nativeJobAdmin.ts:378 — nativeJobAdmin.buildNativeJobDefinitionCreate has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 6, if/else 6 (nesting depth added 3). Of this number, 14 points are the body's own statements and 12 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · nativeJobs.buildNativeJobEdit (cognitive 26) · ×1
  • nativeJobs.buildNativeJobEdit (cognitive 26) apps/desktop/src/lib/database/nativeJobs.ts:322 — nativeJobs.buildNativeJobEdit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.validateChange (cognitive 26) · ×1
  • oracleConstraints.validateChange (cognitive 26) apps/desktop/src/lib/database/oracleConstraints.ts:405 — oracleConstraints.validateChange has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 9 (nesting depth added 8). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleIndexes.prepareOracleIndexPlan (cognitive 26) · ×1
  • oracleIndexes.prepareOracleIndexPlan (cognitive 26) apps/desktop/src/lib/database/oracleIndexes.ts:333 — oracleIndexes.prepareOracleIndexPlan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elk-layout.extractHierarchicalLayoutResult (cognitive 26) · ×1
  • elk-layout.extractHierarchicalLayoutResult (cognitive 26) apps/desktop/src/lib/diagram/elk-layout.ts:321 — elk-layout.extractHierarchicalLayoutResult has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (9 pts), loops 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ltr-auto-layout.orderTablesByConnectivity (cognitive 26) · ×1
  • ltr-auto-layout.orderTablesByConnectivity (cognitive 26) apps/desktop/src/lib/diagram/ltr-auto-layout.ts:40 — ltr-auto-layout.orderTablesByConnectivity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (8 pts), boolean chains 2 (nesting depth added 9). Of this number, 15 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · soqlCompletion.fieldItems (cognitive 26) · ×1
  • soqlCompletion.fieldItems (cognitive 26) apps/desktop/src/lib/soql/soqlCompletion.ts:420 — soqlCompletion.fieldItems has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.analyzeEditableQueryEditability (cognitive 26) · ×1
  • sqlAnalysis.analyzeEditableQueryEditability (cognitive 26) apps/desktop/src/lib/sql/sqlAnalysis.ts:249 — sqlAnalysis.analyzeEditableQueryEditability has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, boolean chains 7, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlCompletion.findMatchingParen (cognitive 26) · ×1
  • sqlCompletion.findMatchingParen (cognitive 26) apps/desktop/src/lib/sql/sqlCompletion.ts:4344 — sqlCompletion.findMatchingParen has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildJoinConditionItemsForPair (cognitive 26) · ×1
  • sqlCompletion.buildJoinConditionItemsForPair (cognitive 26) apps/desktop/src/lib/sql/sqlCompletion.ts:6242 — sqlCompletion.buildJoinConditionItemsForPair has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 4, ternaries 3 (4 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.extractSqlParameterDescriptors (cognitive 26) · ×1
  • sqlParameters.extractSqlParameterDescriptors (cognitive 26) apps/desktop/src/lib/sql/sqlParameters.ts:202 — sqlParameters.extractSqlParameterDescriptors has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). Of this number, 20 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.decodeMyBatisXmlComparisonEntities (cognitive 26) · ×1
  • sqlParameters.decodeMyBatisXmlComparisonEntities (cognitive 26) apps/desktop/src/lib/sql/sqlParameters.ts:348 — sqlParameters.decodeMyBatisXmlComparisonEntities has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectComplexTypeFieldSeparators (cognitive 26) · ×1
  • sqlParameters.collectComplexTypeFieldSeparators (cognitive 26) apps/desktop/src/lib/sql/sqlParameters.ts:1129 — sqlParameters.collectComplexTypeFieldSeparators has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlFileTreeFilter.filterAndSortSqlFileEntries · ×1
  • sqlFileTreeFilter.filterAndSortSqlFileEntries::filterEntries (cognitive 26) apps/desktop/src/lib/sql/sqlFileTreeFilter.ts:114 — sqlFileTreeFilter.filterAndSortSqlFileEntries::filterEntries has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerHostPort.parseSqlServerHostPort (cognitive 26) · ×1
  • sqlServerHostPort.parseSqlServerHostPort (cognitive 26) apps/desktop/src/lib/sqlserver/sqlServerHostPort.ts:7 — sqlServerHostPort.parseSqlServerHostPort has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.verifyFinalSnapshots (cognitive 26) · ×1
  • oracleTableRename.verifyFinalSnapshots (cognitive 26) REDACTED:759 — oracleTableRename.verifyFinalSnapshots has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (9 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.stripXuguSqlComments (cognitive 26) · ×1
  • routineParameters.stripXuguSqlComments (cognitive 26) apps/desktop/src/lib/table/routineParameters.ts:429 — routineParameters.stripXuguSqlComments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.persistConnectionDeletion (cognitive 26) · ×1
  • connectionStore.useConnectionStore.persistConnectionDeletion (cognitive 26) apps/desktop/src/stores/connectionStore.ts:10463 — connectionStore.useConnectionStore.persistConnectionDeletion has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4 (10 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.setBreakpointEnabled (cognitive 26) · ×1
  • plDebugStore.usePlDebugStore.setBreakpointEnabled (cognitive 26) apps/desktop/src/stores/plDebugStore.ts:1195 — plDebugStore.usePlDebugStore.setBreakpointEnabled has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 9). Of this number, 25 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore (cognitive 26) · ×1
  • queryStore.useQueryStore (cognitive 26) apps/desktop/src/stores/queryStore.ts:1166 — queryStore.useQueryStore has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 6, boolean chains 4 (nesting depth added 6). None of this is in the body itself: all 26 points belong to 11 function literals inside it that branch (lines 4768, 1214, 1233, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DbxJdbcPlugin.executeQueryOnConnection (cognitive 25) · ×1
  • DbxJdbcPlugin.executeQueryOnConnection (cognitive 25) REDACTED:1572 — DbxJdbcPlugin.executeQueryOnConnection has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlServerLegacyAgent.shouldFallbackToJtds (cognitive 25) · ×1
  • SqlServerLegacyAgent.shouldFallbackToJtds (cognitive 25) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:326 — SqlServerLegacyAgent.shouldFallbackToJtds has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 10, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleForeignKeyDefinition.read (cognitive 25) · ×1
  • OracleForeignKeyDefinition.read (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OracleForeignKeyDefinition.java:21 — OracleForeignKeyDefinition.read has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCapabilities.probe (cognitive 25) · ×1
  • PlDebugCapabilities.probe (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCapabilities.java:21 — PlDebugCapabilities.probe has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (7 pts), error handling 5, boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeInput.objectValue (cognitive 25) · ×1
  • PlDebugCompositeInput.objectValue (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:180 — PlDebugCompositeInput.objectValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSource.reference (cognitive 25) · ×1
  • PlDebugSource.reference (cognitive 25) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSource.java:20 — PlDebugSource.reference has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JdbcExecutor.executePage (cognitive 25) · ×1
  • JdbcExecutor.executePage (cognitive 25) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:560 — JdbcExecutor.executePage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (4 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferDdl.transactionalMysqlTableDdl (cognitive 25) · ×1
  • queryResultTransferDdl.transactionalMysqlTableDdl (cognitive 25) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:34 — queryResultTransferDdl.transactionalMysqlTableDdl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferDdl.columnDefinitions (cognitive 25) · ×1
  • queryResultTransferDdl.columnDefinitions (cognitive 25) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:56 — queryResultTransferDdl.columnDefinitions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cognitive 25) · ×1
  • useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns (cognitive 25) apps/desktop/src/composables/useDataGridColumnFormatter.ts:270 — useDataGridColumnFormatter.useDataGridColumnFormatter.loadFormatterForeignKeyColumns has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cognitive 25) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions (cognitive 25) REDACTED:492 — useDataGridConditionEditor.useDataGridConditionEditor.columnSuggestions has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cognitive 25) · ×1
  • useDataGridExtractor.useDataGridExtractor.copyWithExtractor (cognitive 25) apps/desktop/src/composables/useDataGridExtractor.ts:499 — useDataGridExtractor.useDataGridExtractor.copyWithExtractor has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 8, if/else 7, error handling 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backend-errors.translateKnownMessage (cognitive 25) · ×1
  • backend-errors.translateKnownMessage (cognitive 25) apps/desktop/src/i18n/backend-errors.ts:234 — backend-errors.translateKnownMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 2 (7 pts), loops 1 (nesting depth added 15). Of this number, 21 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridCopyExtractor.validateDataGridExtractorOptions (cognitive 25) · ×1
  • dataGridCopyExtractor.validateDataGridExtractorOptions (cognitive 25) apps/desktop/src/lib/dataGrid/dataGridCopyExtractor.ts:307 — dataGridCopyExtractor.validateDataGridExtractorOptions has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 9, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · xuguUserPermissions.parseXuguAclRows (cognitive 25) · ×1
  • xuguUserPermissions.parseXuguAclRows (cognitive 25) apps/desktop/src/lib/database/xuguUserPermissions.ts:422 — xuguUserPermissions.parseXuguAclRows has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 12 (22 pts), boolean chains 3 (nesting depth added 10). None of this is in the body itself: all 25 points belong to 2 function items inside it that branch (a function literal at line 426, field). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · queryEditorTableDrop.parseTableReferencePayload (cognitive 25) · ×1
  • queryEditorTableDrop.parseTableReferencePayload (cognitive 25) apps/desktop/src/lib/editor/queryEditorTableDrop.ts:193 — queryEditorTableDrop.parseTableReferencePayload has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · diagramSvgExport.buildTableDiagramSvg (cognitive 25) · ×1
  • diagramSvgExport.buildTableDiagramSvg (cognitive 25) apps/desktop/src/lib/export/diagramSvgExport.ts:218 — diagramSvgExport.buildTableDiagramSvg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datagripImport.parseDbForestGroupPaths (cognitive 25) · ×1
  • datagripImport.parseDbForestGroupPaths (cognitive 25) REDACTED:455 — datagripImport.parseDbForestGroupPaths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 7). Of this number, 20 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableMetadataCache.loadTableColumns (cognitive 25) · ×1
  • tableMetadataCache.loadTableColumns (cognitive 25) apps/desktop/src/lib/metadata/tableMetadataCache.ts:218 — tableMetadataCache.loadTableColumns has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 4 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editorSettingsDraft.normalizedDraftValue (cognitive 25) · ×1
  • editorSettingsDraft.normalizedDraftValue (cognitive 25) apps/desktop/src/lib/settings/editorSettingsDraft.ts:209 — editorSettingsDraft.normalizedDraftValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, ternaries 3 (6 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · printer.printStatement (cognitive 25) · ×1
  • printer.printStatement (cognitive 25) apps/desktop/src/lib/sql/layout/printer.ts:638 — printer.printStatement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cteNavigation.findCteColumnResolution (cognitive 25) · ×1
  • cteNavigation.findCteColumnResolution (cognitive 25) apps/desktop/src/lib/sql/semantic/cteNavigation.ts:118 — cteNavigation.findCteColumnResolution has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.hasTopLevelSemicolon (cognitive 25) · ×1
  • sqlAnalysis.hasTopLevelSemicolon (cognitive 25) apps/desktop/src/lib/sql/sqlAnalysis.ts:938 — sqlAnalysis.hasTopLevelSemicolon has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerRoutineSyntaxDiagnostics.tokenizeSqlServerSyntax (cognitive 25) · ×1
  • sqlServerRoutineSyntaxDiagnostics.tokenizeSqlServerSyntax (cognitive 25) apps/desktop/src/lib/sql/sqlServerRoutineSyntaxDiagnostics.ts:150 — sqlServerRoutineSyntaxDiagnostics.tokenizeSqlServerSyntax has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectDeclareStatementVariables (cognitive 25) · ×1
  • sqlParameters.collectDeclareStatementVariables (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1398 — sqlParameters.collectDeclareStatementVariables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectSetStatementVariables (cognitive 25) · ×1
  • sqlParameters.collectSetStatementVariables (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1438 — sqlParameters.collectSetStatementVariables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sqlParameters.collectExecNamedArgumentStarts) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sqlParameters.collectRoutineDefinitionVariables (cognitive 25) · ×1
  • sqlParameters.collectRoutineDefinitionVariables (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1552 — sqlParameters.collectRoutineDefinitionVariables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.collectExecNamedArgumentStarts (cognitive 25) · ×1
  • sqlParameters.collectExecNamedArgumentStarts (cognitive 25) apps/desktop/src/lib/sql/sqlParameters.ts:1592 — sqlParameters.collectExecNamedArgumentStarts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sqlParameters.collectSetStatementVariables) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cognitive 25) · ×1
  • sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides (cognitive 25) apps/desktop/src/lib/sql/sqlVariableSyntax.ts:192 — sqlVariableSyntax.normalizeSqlVariableSyntaxOverrides has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTypeManagement.assertNoUnapprovedChange (cognitive 25) · ×1
  • oracleTypeManagement.assertNoUnapprovedChange (cognitive 25) apps/desktop/src/lib/table/oracleTypeManagement.ts:491 — oracleTypeManagement.assertNoUnapprovedChange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadSchemas (cognitive 25) · ×1
  • connectionStore.useConnectionStore.loadSchemas (cognitive 25) apps/desktop/src/stores/connectionStore.ts:6816 — connectionStore.useConnectionStore.loadSchemas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 4). None of this is in the body itself: all 25 points belong to 2 function literals inside it that branch (lines 6825, 6868). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadTriggers (cognitive 25) · ×1
  • connectionStore.useConnectionStore.loadTriggers (cognitive 25) apps/desktop/src/stores/connectionStore.ts:8428 — connectionStore.useConnectionStore.loadTriggers has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13 (16 pts), if/else 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 8451). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DriversClient.DriversClient · ×1
  • DriversClient.DriversClient::fetchBundlePackage (cognitive 25) docs/app/[lang]/drivers/DriversClient.tsx:343 — DriversClient.DriversClient::fetchBundlePackage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (8 pts), loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (DriversClient.DriversClient) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ContributorsExperience.ContributorsExperience (cognitive 25) · ×1
  • ContributorsExperience.ContributorsExperience (cognitive 25) docs/components/contributors/ContributorsExperience.tsx:190 — ContributorsExperience.ContributorsExperience has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 5 (6 pts), boolean chains 5 (nesting depth added 5). Of this number, 17 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.enrich (cognitive 24) · ×1
  • OracleTriggerMetadataReader.enrich (cognitive 24) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:105 — OracleTriggerMetadataReader.enrich has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (8 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranswarpAgent.getColumns (cognitive 24) · ×1
  • TranswarpAgent.getColumns (cognitive 24) REDACTED:200 — TranswarpAgent.getColumns has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 5, error handling 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseLobValues.read (cognitive 24) · ×1
  • OceanBaseLobValues.read (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:170 — OceanBaseLobValues.read has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 7 (8 pts), boolean chains 6, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Writer.child (cognitive 24) · ×1
  • Writer.child (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:392 — Writer.child has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugManager.start (cognitive 24) · ×1
  • PlDebugManager.start (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:104 — PlDebugManager.start has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.recoverOutput (cognitive 24) · ×1
  • PlDebugSession.recoverOutput (cognitive 24) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1925 — PlDebugSession.recoverOutput has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 6 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoAgent.applyAggregateOptions (cognitive 24) · ×1
  • MongoAgent.applyAggregateOptions (cognitive 24) REDACTED:878 — MongoAgent.applyAggregateOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.peekMessages (cognitive 24) · ×1
  • KafkaAgent.peekMessages (cognitive 24) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1663 — KafkaAgent.peekMessages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 5 (7 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ddlStorage.oracleStorageClauseEnd (cognitive 24) · ×1
  • ddlStorage.oracleStorageClauseEnd (cognitive 24) apps/desktop/src/lib/sql/ddlStorage.ts:173 — ddlStorage.oracleStorageClauseEnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, ternaries 4 (8 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cognitive 24) · ×1
  • useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection (cognitive 24) apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts:532 — useQueryEditorBatchSelection.useQueryEditorBatchSelection.applyBatchColumnSelection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cognitive 24) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions (cognitive 24) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:724 — useQueryEditorCompletion.useQueryEditorCompletion.provideGraphCompletions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dataGenerate.isWrappedByOuterParens (cognitive 24) · ×1
  • dataGenerate.isWrappedByOuterParens (cognitive 24) apps/desktop/src/lib/dataGrid/dataGenerate.ts:253 — dataGenerate.isWrappedByOuterParens has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseStructureSearch.runDocumentStructureSearch (cognitive 24) · ×1
  • databaseStructureSearch.runDocumentStructureSearch (cognitive 24) apps/desktop/src/lib/database/databaseStructureSearch.ts:143 — databaseStructureSearch.runDocumentStructureSearch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.oracleConstraintDefinitionFromInfo (cognitive 24) · ×1
  • oracleConstraints.oracleConstraintDefinitionFromInfo (cognitive 24) apps/desktop/src/lib/database/oracleConstraints.ts:116 — oracleConstraints.oracleConstraintDefinitionFromInfo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.validateOracleForeignKeyReference (cognitive 24) · ×1
  • oracleForeignKeys.validateOracleForeignKeyReference (cognitive 24) apps/desktop/src/lib/database/oracleForeignKeys.ts:427 — oracleForeignKeys.validateOracleForeignKeyReference has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, loops 1 (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elasticsearchRequestRisk.uncommentedLines (cognitive 24) · ×1
  • elasticsearchRequestRisk.uncommentedLines (cognitive 24) apps/desktop/src/lib/elasticsearch/elasticsearchRequestRisk.ts:82 — elasticsearchRequestRisk.uncommentedLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyUpdate (cognitive 24) · ×1
  • mongoCompletion.classifyUpdate (cognitive 24) REDACTED:1315 — mongoCompletion.classifyUpdate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.cursorMethodItems (cognitive 24) · ×1
  • mongoCompletion.cursorMethodItems (cognitive 24) REDACTED:1880 — mongoCompletion.cursorMethodItems has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (24 pts) (nesting depth added 16). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1885). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoFindCommand (cognitive 24) · ×1
  • mongoShellCommand.parseMongoFindCommand (cognitive 24) REDACTED:378 — mongoShellCommand.parseMongoFindCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoShellCommand.mongoCommentAwareBodyEnd (cognitive 24) · ×1
  • mongoShellCommand.mongoCommentAwareBodyEnd (cognitive 24) REDACTED:1675 — mongoShellCommand.mongoCommentAwareBodyEnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 7, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSql.comparisonToFilter (cognitive 24) · ×1
  • mongoSql.comparisonToFilter (cognitive 24) apps/desktop/src/lib/mongo/mongoSql.ts:1023 — mongoSql.comparisonToFilter has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 4, boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thriftBinary.readValue (cognitive 24) · ×1
  • thriftBinary.readValue (cognitive 24) apps/desktop/src/lib/mq/thriftBinary.ts:163 — thriftBinary.readValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginFloatingWindow.parseFloatingWindowRequest (cognitive 24) · ×1
  • pluginFloatingWindow.parseFloatingWindowRequest (cognitive 24) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:267 — pluginFloatingWindow.parseFloatingWindowRequest has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10, boolean chains 8, if/else 6. Of this number, 17 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · pluginMarketplace.comparePrerelease (cognitive 24) · ×1
  • pluginMarketplace.comparePrerelease (cognitive 24) apps/desktop/src/lib/plugins/pluginMarketplace.ts:364 — pluginMarketplace.comparePrerelease has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cognitive 24) · ×1
  • schemaDiffTableMapping.reconcileSchemaDiffTableMappings (cognitive 24) apps/desktop/src/lib/schema/schemaDiffTableMapping.ts:47 — schemaDiffTableMapping.reconcileSchemaDiffTableMappings has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 3 (4 pts), ternaries 2 (nesting depth added 8). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · treeNodeClick.treeNodeRowAction (cognitive 24) · ×1
  • treeNodeClick.treeNodeRowAction (cognitive 24) apps/desktop/src/lib/sidebar/treeNodeClick.ts:168 — treeNodeClick.treeNodeRowAction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12, ternaries 3 (7 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · solrRequestRisk.uncommentedLines (cognitive 24) · ×1
  • solrRequestRisk.uncommentedLines (cognitive 24) apps/desktop/src/lib/solr/solrRequestRisk.ts:145 — solrRequestRisk.uncommentedLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.splitTopLevel (cognitive 24) · ×1
  • sqlCompletion.splitTopLevel (cognitive 24) apps/desktop/src/lib/sql/sqlCompletion.ts:4611 — sqlCompletion.splitTopLevel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.splitRoutineSignatureParameters (cognitive 24) · ×1
  • sqlCompletion.splitRoutineSignatureParameters (cognitive 24) apps/desktop/src/lib/sql/sqlCompletion.ts:5166 — sqlCompletion.splitRoutineSignatureParameters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.completionColumnPrefixCandidates (cognitive 24) · ×1
  • sqlCompletion.completionColumnPrefixCandidates (cognitive 24) apps/desktop/src/lib/sql/sqlCompletion.ts:5858 — sqlCompletion.completionColumnPrefixCandidates has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.isMysqlRoutineHeader (cognitive 24) · ×1
  • sqlParameters.isMysqlRoutineHeader (cognitive 24) apps/desktop/src/lib/sql/sqlParameters.ts:653 — sqlParameters.isMysqlRoutineHeader has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 8, loops 1. Of this number, 19 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · batchTableDrop.runBatchTableDrop (cognitive 24) · ×1
  • batchTableDrop.runBatchTableDrop (cognitive 24) apps/desktop/src/lib/table/batchTableDrop.ts:36 — batchTableDrop.runBatchTableDrop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.findTableVGroupContainerNode (cognitive 24) · ×1
  • tableVGroup.findTableVGroupContainerNode (cognitive 24) apps/desktop/src/lib/table/tableVGroup.ts:626 — tableVGroup.findTableVGroupContainerNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, ternaries 4 (5 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (walk, a function literal at line 660, matchesOptional, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · tabPresentation.statementExecutionMarkers (cognitive 24) · ×1
  • tabPresentation.statementExecutionMarkers (cognitive 24) apps/desktop/src/lib/tabs/tabPresentation.ts:544 — tabPresentation.statementExecutionMarkers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 4 (7 pts), boolean chains 4, loops 1 (nesting depth added 7). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.disconnect (cognitive 24) · ×1
  • connectionStore.useConnectionStore.disconnect (cognitive 24) apps/desktop/src/stores/connectionStore.ts:5464 — connectionStore.useConnectionStore.disconnect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.applyRestoredOpenTabs (cognitive 24) · ×1
  • queryStore.useQueryStore.applyRestoredOpenTabs (cognitive 24) apps/desktop/src/stores/queryStore.ts:2759 — queryStore.useQueryStore.applyRestoredOpenTabs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.openObjectBrowser (cognitive 24) · ×1
  • queryStore.useQueryStore.openObjectBrowser (cognitive 24) apps/desktop/src/stores/queryStore.ts:3805 — queryStore.useQueryStore.openObjectBrowser has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, ternaries 8 (9 pts), if/else 4 (6 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cognitive 24) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport.read (cognitive 24) apps/desktop/src/stores/queryStore.ts:10536 — queryStore.useQueryStore.captureResultLegacyValuesForExport.read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 4 (6 pts), error handling 2, loops 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cognitive 24) · ×1
  • savedSqlStore.useSavedSqlStore.updateFileExecutionTarget (cognitive 24) apps/desktop/src/stores/savedSqlStore.ts:607 — savedSqlStore.useSavedSqlStore.updateFileExecutionTarget has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, ternaries 4, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 638, cleanup, a function literal at line 632, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · json.isMongoRegexValuePosition (cognitive 24) · ×1
  • json.isMongoRegexValuePosition (cognitive 24) packages/mongo-shell/src/json.ts:136 — json.isMongoRegexValuePosition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · database-env.main (cognitive 24) · ×1
  • database-env.main (cognitive 24) scripts/database-env.mjs:520 — database-env.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TupleScanner · ×1
  • TupleScanner::next (cognitive 23) REDACTED:225 — TupleScanner::next has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cognitive 23) · ×1
  • DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables (cognitive 23) REDACTED:3271 — DbxJdbcPlugin.appendInceptorRoutinesFromSystemTables has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.listObjects (cognitive 23) · ×1
  • OracleTriggerMetadataReader.listObjects (cognitive 23) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:57 — OracleTriggerMetadataReader.listObjects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.listConstraints (cognitive 23) · ×1
  • OceanBaseOracleAgent.listConstraints (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2198 — OceanBaseOracleAgent.listConstraints has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Execution.run (cognitive 23) · ×1
  • Execution.run (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompile.java:144 — Execution.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 4 (6 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Entry.snapshot (cognitive 23) · ×1
  • Entry.snapshot (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:650 — Entry.snapshot has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 6, if/else 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTemporalJson.entries (cognitive 23) · ×1
  • PlDebugTemporalJson.entries (cognitive 23) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:108 — PlDebugTemporalJson.entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.applySecurityProperties (cognitive 23) · ×1
  • KafkaAgent.applySecurityProperties (cognitive 23) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:522 — KafkaAgent.applySecurityProperties has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.isDamengMetadataUnavailableError (cognitive 23) · ×1
  • DamengAgent.isDamengMetadataUnavailableError (cognitive 23) REDACTED:756 — DamengAgent.isDamengMetadataUnavailableError has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackedPhysicalConnection.<init> (cognitive 23) · ×1
  • TrackedPhysicalConnection.<init> (cognitive 23) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1917 — TrackedPhysicalConnection.<init> has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 9, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlStatementRanges.nextSqlWordToken (cognitive 23) · ×1
  • sqlStatementRanges.nextSqlWordToken (cognitive 23) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1627 — sqlStatementRanges.nextSqlWordToken has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffHunkBuilder.buildHunks (cognitive 23) · ×1
  • DiffHunkBuilder.buildHunks (cognitive 23) apps/desktop/src/components/diff/DiffHunkBuilder.ts:390 — DiffHunkBuilder.buildHunks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cognitive 23) · ×1
  • useDataGridEditor.useDataGridEditor.executeConditionalUpdate (cognitive 23) apps/desktop/src/composables/useDataGridEditor.ts:2337 — useDataGridEditor.useDataGridEditor.executeConditionalUpdate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.continueExecute (cognitive 23) · ×1
  • useSqlExecution.useSqlExecution.continueExecute (cognitive 23) apps/desktop/src/composables/useSqlExecution.ts:353 — useSqlExecution.useSqlExecution.continueExecute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonSourceScanner.readNumberToken (cognitive 23) · ×1
  • JsonSourceScanner.readNumberToken (cognitive 23) apps/desktop/src/lib/common/safeJsonFormat.ts:532 — JsonSourceScanner.readNumberToken has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · columnFormatter.formatTemporalValueForExport (cognitive 23) · ×1
  • columnFormatter.formatTemporalValueForExport (cognitive 23) apps/desktop/src/lib/dataGrid/columnFormatter.ts:455 — columnFormatter.formatTemporalValueForExport has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · dataGenerate.generateTableRowsChunk (cognitive 23) · ×1
  • dataGenerate.generateTableRowsChunk (cognitive 23) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1949 — dataGenerate.generateTableRowsChunk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1955). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · regexGenerate.gen (cognitive 23) · ×1
  • regexGenerate.gen (cognitive 23) REDACTED:361 — regexGenerate.gen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · nativeJobs.damengChildChanges (cognitive 23) · ×1
  • nativeJobs.damengChildChanges (cognitive 23) apps/desktop/src/lib/database/nativeJobs.ts:365 — nativeJobs.damengChildChanges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, ternaries 2 (3 pts), loops 2 (nesting depth added 6). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleInvalidObjects.readAllOracleInvalidObjects (cognitive 23) · ×1
  • oracleInvalidObjects.readAllOracleInvalidObjects (cognitive 23) apps/desktop/src/lib/database/oracleInvalidObjects.ts:86 — oracleInvalidObjects.readAllOracleInvalidObjects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlAliasHighlights.createSqlAliasHighlights (cognitive 23) · ×1
  • codemirrorSqlAliasHighlights.createSqlAliasHighlights (cognitive 23) apps/desktop/src/lib/editor/codemirrorSqlAliasHighlights.ts:11 — codemirrorSqlAliasHighlights.createSqlAliasHighlights has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7 (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · hoverTableSql.reformatHoverDdl (cognitive 23) · ×1
  • hoverTableSql.reformatHoverDdl (cognitive 23) apps/desktop/src/lib/editor/hoverTableSql.ts:767 — hoverTableSql.reformatHoverDdl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shortcutRegistry.normalizeShortcutSettings (cognitive 23) · ×1
  • shortcutRegistry.normalizeShortcutSettings (cognitive 23) apps/desktop/src/lib/editor/shortcutRegistry.ts:873 — shortcutRegistry.normalizeShortcutSettings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, loops 2, ternaries 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · historyRestoreTarget.resolveHistorySqlRestoreTarget (cognitive 23) · ×1
  • historyRestoreTarget.resolveHistorySqlRestoreTarget (cognitive 23) apps/desktop/src/lib/history/historyRestoreTarget.ts:12 — historyRestoreTarget.resolveHistorySqlRestoreTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisDesktopManagerImport.connection (cognitive 23) · ×1
  • redisDesktopManagerImport.connection (cognitive 23) apps/desktop/src/lib/imports/redisDesktopManagerImport.ts:42 — redisDesktopManagerImport.connection has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 8, if/else 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.parseMongoDocumentInputValue (cognitive 23) · ×1
  • mongoDocumentValues.parseMongoDocumentInputValue (cognitive 23) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:151 — mongoDocumentValues.parseMongoDocumentInputValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Parser.parsePredicate (cognitive 23) · ×1
  • Parser.parsePredicate (cognitive 23) apps/desktop/src/lib/mongo/mongoSql.ts:350 — Parser.parsePredicate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontendPluginRegistry.listPaletteMenuCommands (cognitive 23) · ×1
  • FrontendPluginRegistry.listPaletteMenuCommands (cognitive 23) apps/desktop/src/lib/plugins/frontendPlugin.ts:125 — FrontendPluginRegistry.listPaletteMenuCommands has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · javaSerialized.normalizeJavaSerializedValue (cognitive 23) · ×1
  • javaSerialized.normalizeJavaSerializedValue (cognitive 23) apps/desktop/src/lib/redis/codec/javaSerialized.ts:392 — javaSerialized.normalizeJavaSerializedValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisKeyPattern.createRedisKeyPatternMatcher (cognitive 23) · ×1
  • redisKeyPattern.createRedisKeyPatternMatcher (cognitive 23) apps/desktop/src/lib/redis/redisKeyPattern.ts:86 — redisKeyPattern.createRedisKeyPatternMatcher has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (7 pts), error handling 1 (2 pts), loops 2, boolean chains 1 (nesting depth added 9). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 88). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · oracleRoutineDeploy.executeOracleRoutineDeployment (cognitive 23) · ×1
  • oracleRoutineDeploy.executeOracleRoutineDeployment (cognitive 23) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:670 — oracleRoutineDeploy.executeOracleRoutineDeployment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 679). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarTreeArrowNavigation.sidebarTreeArrowAction (cognitive 23) · ×1
  • sidebarTreeArrowNavigation.sidebarTreeArrowAction (cognitive 23) apps/desktop/src/lib/sidebar/sidebarTreeArrowNavigation.ts:16 — sidebarTreeArrowNavigation.sidebarTreeArrowAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xuguTypeMembers.buildXuguTypeMemberNodes (cognitive 23) · ×1
  • xuguTypeMembers.buildXuguTypeMemberNodes (cognitive 23) apps/desktop/src/lib/sidebar/xuguTypeMembers.ts:12 — xuguTypeMembers.buildXuguTypeMemberNodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (8 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlDisplay.applyDdlDatabaseQualifier (cognitive 23) · ×1
  • ddlDisplay.applyDdlDatabaseQualifier (cognitive 23) apps/desktop/src/lib/sql/ddlDisplay.ts:347 — ddlDisplay.applyDdlDatabaseQualifier has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorPosition.resolveSqlErrorOffset (cognitive 23) · ×1
  • errorPosition.resolveSqlErrorOffset (cognitive 23) apps/desktop/src/lib/sql/errorPosition.ts:156 — errorPosition.resolveSqlErrorOffset has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 5, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executableStatementRangeCache.executableStartAfterLeadingDirective (cognitive 23) · ×1
  • executableStatementRangeCache.executableStartAfterLeadingDirective (cognitive 23) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:95 — executableStatementRangeCache.executableStartAfterLeadingDirective has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.parseInsertClause (cognitive 23) · ×1
  • insertValueHints.parseInsertClause (cognitive 23) apps/desktop/src/lib/sql/insertValueHints.ts:295 — insertValueHints.parseInsertClause has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · insertValueHints.findEnclosingDollarQuoteStartInText (cognitive 23) · ×1
  • insertValueHints.findEnclosingDollarQuoteStartInText (cognitive 23) apps/desktop/src/lib/sql/insertValueHints.ts:615 — insertValueHints.findEnclosingDollarQuoteStartInText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.analyzeSelectStructureForDisplay (cognitive 23) · ×1
  • sqlAnalysis.analyzeSelectStructureForDisplay (cognitive 23) apps/desktop/src/lib/sql/sqlAnalysis.ts:333 — sqlAnalysis.analyzeSelectStructureForDisplay has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, ternaries 8, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlAnalysis.parseFromSources (cognitive 23) · ×1
  • sqlAnalysis.parseFromSources (cognitive 23) apps/desktop/src/lib/sql/sqlAnalysis.ts:661 — sqlAnalysis.parseFromSources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.parseXmlAttributes (cognitive 23) · ×1
  • sqlParameters.parseXmlAttributes (cognitive 23) apps/desktop/src/lib/sql/sqlParameters.ts:731 — sqlParameters.parseXmlAttributes has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (10 pts), boolean chains 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · routineParameters.parseXuguRoutineParameter (cognitive 23) · ×1
  • routineParameters.parseXuguRoutineParameter (cognitive 23) apps/desktop/src/lib/table/routineParameters.ts:353 — routineParameters.parseXuguRoutineParameter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · tableDataExport.fetchTableDataForExport (cognitive 23) · ×1
  • tableDataExport.fetchTableDataForExport (cognitive 23) apps/desktop/src/lib/table/tableDataExport.ts:28 — tableDataExport.fetchTableDataForExport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cognitive 23) · ×1
  • connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry (cognitive 23) apps/desktop/src/stores/connectionStore.ts:3657 — connectionStore.useConnectionStore.sidebarTableSearchIndexManifestEntry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 10, boolean chains 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (findPath, a function literal at line 3682). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cognitive 23) · ×1
  • connectionStore.useConnectionStore.updateConnectionDatabaseInfo (cognitive 23) apps/desktop/src/stores/connectionStore.ts:4723 — connectionStore.useConnectionStore.updateConnectionDatabaseInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cognitive 23) · ×1
  • savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget (cognitive 23) apps/desktop/src/stores/savedSqlStore.ts:700 — savedSqlStore.useSavedSqlStore.updateFilesExecutionTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferTaskStore.normalizeTask (cognitive 23) · ×1
  • transferTaskStore.normalizeTask (cognitive 23) apps/desktop/src/stores/transferTaskStore.ts:98 — transferTaskStore.normalizeTask has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (7 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ai-html-runtime-canary.main (cognitive 23) · ×1
  • ai-html-runtime-canary.main (cognitive 23) scripts/ai-html-runtime-canary.mjs:155 — ai-html-runtime-canary.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-plugin-cli-package.verifyDev (cognitive 23) · ×1
  • verify-plugin-cli-package.verifyDev (cognitive 23) scripts/verify-plugin-cli-package.mjs:87 — verify-plugin-cli-package.verifyDev has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 6). Of this number, 12 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · seedApi (cognitive 23) · ×1
  • seedApi (cognitive 23) .github/ui-preview/seed.mjs:130 — seedApi has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (10 pts), loops 4 (5 pts), if/else 1 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 9). Of this number, 22 points are the body's own statements and 1 belongs to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScalarType · ×1
  • ScalarType::read (cognitive 22) crates/dbx-sql-core/src/oracle_type_migration_sql.rs:254 — ScalarType::read has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HanaScriptBlock · ×1
  • HanaScriptBlock::is_complete (cognitive 22) crates/dbx-sql-core/src/sql.rs:3484 — HanaScriptBlock::is_complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsSafeCell · ×1
  • JsSafeCell::serialize (cognitive 22) crates/dbx-types/src/types.rs:758 — JsSafeCell::serialize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OceanBaseOracleAgent.completionAssistantRoutines (cognitive 22) · ×1
  • OceanBaseOracleAgent.completionAssistantRoutines (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:827 — OceanBaseOracleAgent.completionAssistantRoutines has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.typedLobUrl (cognitive 22) · ×1
  • OceanBaseOracleAgent.typedLobUrl (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:381 — OceanBaseOracleAgent.typedLobUrl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugBreakpointInventory.confirmSet (cognitive 22) · ×1
  • PlDebugBreakpointInventory.confirmSet (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointInventory.java:41 — PlDebugBreakpointInventory.confirmSet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompile.readback (cognitive 22) · ×1
  • PlDebugCompile.readback (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompile.java:195 — PlDebugCompile.readback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugManager.changeBreakpoints (cognitive 22) · ×1
  • PlDebugManager.changeBreakpoints (cognitive 22) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:287 — PlDebugManager.changeBreakpoints has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (12 pts), loops 2 (4 pts), if/else 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentRpcError.classify (cognitive 22) · ×1
  • AgentRpcError.classify (cognitive 22) agents/common/src/main/java/com/dbx/agent/AgentRpcError.java:108 — AgentRpcError.classify has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (9 pts), boolean chains 8, if/else 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JdbcConnectionAffinity.sanitizeSql (cognitive 22) · ×1
  • JdbcConnectionAffinity.sanitizeSql (cognitive 22) agents/common/src/main/java/com/dbx/agent/JdbcConnectionAffinity.java:41 — JdbcConnectionAffinity.sanitizeSql has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JdbcExecutor.withStatementMessages (cognitive 22) · ×1
  • JdbcExecutor.withStatementMessages (cognitive 22) agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1124 — JdbcExecutor.withStatementMessages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (3 pts), error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryResult.normalizeRowsWithSpatial (cognitive 22) · ×1
  • QueryResult.normalizeRowsWithSpatial (cognitive 22) agents/common/src/main/java/com/dbx/agent/QueryResult.java:164 — QueryResult.normalizeRowsWithSpatial has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (7 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.mergeSqlServerControlFlowBatches (cognitive 22) · ×1
  • sqlStatementRanges.mergeSqlServerControlFlowBatches (cognitive 22) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1106 — sqlStatementRanges.mergeSqlServerControlFlowBatches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.binaryLiteral (cognitive 22) · ×1
  • queryResultTransferValues.binaryLiteral (cognitive 22) apps/desktop/src/components/transfer/queryResultTransferValues.ts:330 — queryResultTransferValues.binaryLiteral has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridCanvasRuntime.useDataGridCanvasRuntime (cognitive 22) · ×1
  • useDataGridCanvasRuntime.useDataGridCanvasRuntime (cognitive 22) apps/desktop/src/composables/useDataGridCanvasRuntime.ts:55 — useDataGridCanvasRuntime.useDataGridCanvasRuntime has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 8, error handling 1 (2 pts) (nesting depth added 1). Of this number, 20 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cognitive 22) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline (cognitive 22) apps/desktop/src/composables/useDataGridLargeValues.ts:736 — useDataGridLargeValues.useDataGridLargeValues.prepareSaveBaseline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, loops 3 (nesting depth added 3). Of this number, 19 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridScrollbars.useDataGridScrollbars (cognitive 22) · ×1
  • useDataGridScrollbars.useDataGridScrollbars (cognitive 22) apps/desktop/src/composables/useDataGridScrollbars.ts:32 — useDataGridScrollbars.useDataGridScrollbars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 9, loops 1 (2 pts) (nesting depth added 1). Of this number, 21 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridSearch.useDataGridSearch (cognitive 22) · ×1
  • useDataGridSearch.useDataGridSearch (cognitive 22) apps/desktop/src/composables/useDataGridSearch.ts:41 — useDataGridSearch.useDataGridSearch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 122, 162). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useExportTracker.useExportTracker.updateDataTransferTask (cognitive 22) · ×1
  • useExportTracker.useExportTracker.updateDataTransferTask (cognitive 22) apps/desktop/src/composables/useExportTracker.ts:850 — useExportTracker.useExportTracker.updateDataTransferTask has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cognitive 22) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview (cognitive 22) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:203 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.loadStructurePreview has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aiIntentRouter.routeByRulesUnchecked (cognitive 22) · ×1
  • aiIntentRouter.routeByRulesUnchecked (cognitive 22) apps/desktop/src/lib/ai/aiIntentRouter.ts:220 — aiIntentRouter.routeByRulesUnchecked has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 10. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · aiMessageRender.parseAiMessage (cognitive 22) · ×1
  • aiMessageRender.parseAiMessage (cognitive 22) apps/desktop/src/lib/ai/aiMessageRender.ts:330 — aiMessageRender.parseAiMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightweightJsonScanner.readStringValue (cognitive 22) · ×1
  • LightweightJsonScanner.readStringValue (cognitive 22) apps/desktop/src/lib/app/documentJsonValues.ts:332 — LightweightJsonScanner.readStringValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrl.urlParamsRequireTls (cognitive 22) · ×1
  • connectionUrl.urlParamsRequireTls (cognitive 22) REDACTED:383 — connectionUrl.urlParamsRequireTls has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (11 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · connectionUrlBuilder.connectionUrlCopyFormats (cognitive 22) · ×1
  • connectionUrlBuilder.connectionUrlCopyFormats (cognitive 22) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:557 — connectionUrlBuilder.connectionUrlCopyFormats has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dataGridContextMenu.createDataGridCellContextMenuItems (cognitive 22) · ×1
  • dataGridContextMenu.createDataGridCellContextMenuItems (cognitive 22) apps/desktop/src/lib/dataGrid/dataGridContextMenu.ts:249 — dataGridContextMenu.createDataGridCellContextMenuItems has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridNewRowPlacement.buildOrderedGridRows (cognitive 22) · ×1
  • gridNewRowPlacement.buildOrderedGridRows (cognitive 22) apps/desktop/src/lib/dataGrid/gridNewRowPlacement.ts:56 — gridNewRowPlacement.buildOrderedGridRows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cognitive 22) · ×1
  • oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase (cognitive 22) apps/desktop/src/lib/database/oracleTriggerStructurePlan.ts:125 — oracleTriggerStructurePlan.reconcileOracleTriggerStructureDraft.rebase has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draft-table.validateDraftTable (cognitive 22) · ×1
  • draft-table.validateDraftTable (cognitive 22) apps/desktop/src/lib/diagram/draft-table.ts:110 — draft-table.validateDraftTable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorSqlBlockFolding.gapIsWhitespaceOrComment (cognitive 22) · ×1
  • codemirrorSqlBlockFolding.gapIsWhitespaceOrComment (cognitive 22) apps/desktop/src/lib/editor/codemirrorSqlBlockFolding.ts:44 — codemirrorSqlBlockFolding.gapIsWhitespaceOrComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plainTextSelectionRanges.scanBracketRanges (cognitive 22) · ×1
  • plainTextSelectionRanges.scanBracketRanges (cognitive 22) apps/desktop/src/lib/editor/plainTextSelectionRanges.ts:40 — plainTextSelectionRanges.scanBracketRanges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlHoverSearch.applyHoverSearchHighlights (cognitive 22) · ×1
  • sqlHoverSearch.applyHoverSearchHighlights (cognitive 22) apps/desktop/src/lib/editor/sqlHoverSearch.ts:60 — sqlHoverSearch.applyHoverSearchHighlights has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlIntentionActions.buildBatchQualifyActions (cognitive 22) · ×1
  • sqlIntentionActions.buildBatchQualifyActions (cognitive 22) apps/desktop/src/lib/editor/sqlIntentionActions.ts:199 — sqlIntentionActions.buildBatchQualifyActions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseExport.runWithDatabaseBackupSnapshot (cognitive 22) · ×1
  • databaseExport.runWithDatabaseBackupSnapshot (cognitive 22) apps/desktop/src/lib/export/databaseExport.ts:179 — databaseExport.runWithDatabaseBackupSnapshot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (6 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 10). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableMetadataCache.loadTableMetadata (cognitive 22) · ×1
  • tableMetadataCache.loadTableMetadata (cognitive 22) apps/desktop/src/lib/metadata/tableMetadataCache.ts:361 — tableMetadataCache.loadTableMetadata has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (9 pts), if/else 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyJsonSchema (cognitive 22) · ×1
  • mongoCompletion.classifyJsonSchema (cognitive 22) REDACTED:1285 — mongoCompletion.classifyJsonSchema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoCompletion.matchCursorMethodDot (cognitive 22) · ×1
  • mongoCompletion.matchCursorMethodDot (cognitive 22) REDACTED:2199 — mongoCompletion.matchCursorMethodDot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.skipMongoStringOrComment (cognitive 22) · ×1
  • mongoCompletion.skipMongoStringOrComment (cognitive 22) REDACTED:2298 — mongoCompletion.skipMongoStringOrComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.isInsideMongoComment (cognitive 22) · ×1
  • mongoCompletion.isInsideMongoComment (cognitive 22) REDACTED:2460 — mongoCompletion.isInsideMongoComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.buildMongoCopyDocumentFromOriginal (cognitive 22) · ×1
  • mongoDocumentValues.buildMongoCopyDocumentFromOriginal (cognitive 22) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:655 — mongoDocumentValues.buildMongoCopyDocumentFromOriginal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoCommand (cognitive 22) · ×1
  • mongoShellCommand.parseMongoCommand (cognitive 22) REDACTED:1041 — mongoShellCommand.parseMongoCommand has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 14, if/else 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 1053, 1057, 1061, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · pluginFloatingWindow.startFloatingWindowReaper (cognitive 22) · ×1
  • pluginFloatingWindow.startFloatingWindowReaper (cognitive 22) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:768 — pluginFloatingWindow.startFloatingWindowReaper has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4, boolean chains 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 787, 803, 774, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · batchQueryPagination.prepareBatchQueryPagination (cognitive 22) · ×1
  • batchQueryPagination.prepareBatchQueryPagination (cognitive 22) apps/desktop/src/lib/query/batchQueryPagination.ts:11 — batchQueryPagination.prepareBatchQueryPagination has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 58). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarLayoutMonitor.detectLayoutAnomalies (cognitive 22) · ×1
  • sidebarLayoutMonitor.detectLayoutAnomalies (cognitive 22) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:443 — sidebarLayoutMonitor.detectLayoutAnomalies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9 (nesting depth added 5). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypherFormatter.formatCypherText (cognitive 22) · ×1
  • cypherFormatter.formatCypherText (cognitive 22) apps/desktop/src/lib/sql/cypherFormatter.ts:504 — cypherFormatter.formatCypherText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (8 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.clauseSpans (cognitive 22) · ×1
  • model.clauseSpans (cognitive 22) apps/desktop/src/lib/sql/semantic/model.ts:824 — model.clauseSpans has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.parseSelectColumns (cognitive 22) · ×1
  • sqlAnalysis.parseSelectColumns (cognitive 22) apps/desktop/src/lib/sql/sqlAnalysis.ts:431 — sqlAnalysis.parseSelectColumns has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.parseTableSourceAt (cognitive 22) · ×1
  • sqlAnalysis.parseTableSourceAt (cognitive 22) apps/desktop/src/lib/sql/sqlAnalysis.ts:694 — sqlAnalysis.parseTableSourceAt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 5, boolean chains 3 (nesting depth added 4). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlCompletion.maskSqlLiteralsAndComments (cognitive 22) · ×1
  • sqlCompletion.maskSqlLiteralsAndComments (cognitive 22) apps/desktop/src/lib/sql/sqlCompletion.ts:3972 — sqlCompletion.maskSqlLiteralsAndComments has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 4 (6 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sqlCompletion.splitQualifiedNameRawParts (cognitive 22) · ×1
  • sqlCompletion.splitQualifiedNameRawParts (cognitive 22) apps/desktop/src/lib/sql/sqlCompletion.ts:4667 — sqlCompletion.splitQualifiedNameRawParts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildKeywordItems (cognitive 22) · ×1
  • sqlCompletion.buildKeywordItems (cognitive 22) apps/desktop/src/lib/sql/sqlCompletion.ts:6722 — sqlCompletion.buildKeywordItems has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 5, ternaries 5. Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 6735, 6743). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tableDependencySort.sortTablesByFkDependency (cognitive 22) · ×1
  • tableDependencySort.sortTablesByFkDependency (cognitive 22) apps/desktop/src/lib/table/tableDependencySort.ts:17 — tableDependencySort.sortTablesByFkDependency has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabModeLabel (cognitive 22) · ×1
  • tabPresentation.tabModeLabel (cognitive 22) apps/desktop/src/lib/tabs/tabPresentation.ts:771 — tabPresentation.tabModeLabel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cognitive 22) · ×1
  • connectionStore.useConnectionStore.loadPagedSimpleTableChildren (cognitive 22) apps/desktop/src/stores/connectionStore.ts:3263 — connectionStore.useConnectionStore.loadPagedSimpleTableChildren has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (14 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.runOracleTriggerSourceAction (cognitive 22) · ×1
  • queryStore.useQueryStore.runOracleTriggerSourceAction (cognitive 22) apps/desktop/src/stores/queryStore.ts:3442 — queryStore.useQueryStore.runOracleTriggerSourceAction has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 9, error handling 1, ternaries 1. Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.openPluginWorkbench (cognitive 22) · ×1
  • queryStore.useQueryStore.openPluginWorkbench (cognitive 22) apps/desktop/src/stores/queryStore.ts:4453 — queryStore.useQueryStore.openPluginWorkbench has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 7, ternaries 3 (nesting depth added 7). Of this number, 20 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worker.handleInstallBeacon (cognitive 22) · ×1
  • worker.handleInstallBeacon (cognitive 22) deploy/plugin-stats-worker/worker.ts:349 — worker.handleInstallBeacon has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InstallTabs.InstallTabs (cognitive 22) · ×1
  • InstallTabs.InstallTabs (cognitive 22) docs/components/landing/InstallTabs.tsx:231 — InstallTabs.InstallTabs has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 5, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 324, 241, 250, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agentBundle.parseTarEntries (cognitive 22) · ×1
  • agentBundle.parseTarEntries (cognitive 22) docs/lib/agentBundle.ts:201 — agentBundle.parseTarEntries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.findMatchingParen (cognitive 22) · ×1
  • json.findMatchingParen (cognitive 22) packages/mongo-shell/src/json.ts:267 — json.findMatchingParen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · i18n.localizeManifest (cognitive 22) · ×1
  • i18n.localizeManifest (cognitive 22) plugins/sdk/dev-host/ui/i18n.js:98 — i18n.localizeManifest has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync-connection-types.loadConnectionProfiles (cognitive 22) · ×1
  • sync-connection-types.loadConnectionProfiles (cognitive 22) scripts/sync-connection-types.mjs:166 — sync-connection-types.loadConnectionProfiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, loops 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MySqlSqlFileExecutor · ×1
  • MySqlSqlFileExecutor::execute_statement_inner (cognitive 21) REDACTED:346 — MySqlSqlFileExecutor::execute_statement_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupConfig · ×1
  • BackupConfig::validate (cognitive 21) crates/dbx-core/src/scheduled_backup/models.rs:146 — BackupConfig::validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentManager · ×1
  • AgentManager::collect_driver_store_usage (cognitive 21) crates/dbx-driver-agent/src/agent_manager.rs:1306 — AgentManager::collect_driver_store_usage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WkbGeometry · ×1
  • WkbGeometry::to_wkt (cognitive 21) crates/dbx-driver-support/src/wkb.rs:47 — WkbGeometry::to_wkt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NativeLegacyJobSession.<init> (cognitive 21) · ×1
  • NativeLegacyJobSession.<init> (cognitive 21) plugins/jdbc/src/main/java/app/dbx/jdbc/NativeLegacyJobSession.java:50 — NativeLegacyJobSession.<init> has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · OceanBaseLobValues.preview (cognitive 21) · ×1
  • OceanBaseLobValues.preview (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseLobValues.java:65 — OceanBaseLobValues.preview has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 7, boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Entry.closeUninitialized (cognitive 21) · ×1
  • Entry.closeUninitialized (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java:551 — Entry.closeUninitialized has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugObjectConstructors.callables (cognitive 21) · ×1
  • PlDebugObjectConstructors.callables (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugObjectConstructors.java:27 — PlDebugObjectConstructors.callables has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.start (cognitive 21) · ×1
  • PlDebugSession.start (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:279 — PlDebugSession.start has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 5, error handling 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Source.read (cognitive 21) · ×1
  • Source.read (cognitive 21) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTemporalJson.java:182 — Source.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Gbase8sAgent.overrideLocaleParams (cognitive 21) · ×1
  • Gbase8sAgent.overrideLocaleParams (cognitive 21) REDACTED:992 — Gbase8sAgent.overrideLocaleParams has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DdlBuilder.buildOracleObjectGrantSql (cognitive 21) · ×1
  • DdlBuilder.buildOracleObjectGrantSql (cognitive 21) agents/common/src/main/java/com/dbx/agent/DdlBuilder.java:257 — DdlBuilder.buildOracleObjectGrantSql has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionFactoryDataSource.getConnection (cognitive 21) · ×1
  • ConnectionFactoryDataSource.getConnection (cognitive 21) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1115 — ConnectionFactoryDataSource.getConnection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 4, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.firebirdRoutineBlockIsComplete (cognitive 21) · ×1
  • sqlStatementRanges.firebirdRoutineBlockIsComplete (cognitive 21) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2555 — sqlStatementRanges.firebirdRoutineBlockIsComplete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-partition-ddl.main (cognitive 21) · ×1
  • verify-partition-ddl.main (cognitive 21) agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts:10 — verify-partition-ddl.main has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 3 (4 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DiffHunkBuilder.alignWithinWindow (cognitive 21) · ×1
  • DiffHunkBuilder.alignWithinWindow (cognitive 21) apps/desktop/src/components/diff/DiffHunkBuilder.ts:223 — DiffHunkBuilder.alignWithinWindow has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 2 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · queryResultTransferDdl.sqlServerDescriptionParameters (cognitive 21) · ×1
  • queryResultTransferDdl.sqlServerDescriptionParameters (cognitive 21) apps/desktop/src/components/transfer/queryResultTransferDdl.ts:203 — queryResultTransferDdl.sqlServerDescriptionParameters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferSelections.matchBulkObjectNames (cognitive 21) · ×1
  • transferSelections.matchBulkObjectNames (cognitive 21) apps/desktop/src/components/transfer/transferSelections.ts:153 — transferSelections.matchBulkObjectNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cognitive 21) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown (cognitive 21) REDACTED:666 — useDataGridConditionEditor.useDataGridConditionEditor.handleKeydown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.applyDeleteRows (cognitive 21) · ×1
  • useDataGridEditor.useDataGridEditor.applyDeleteRows (cognitive 21) apps/desktop/src/composables/useDataGridEditor.ts:1726 — useDataGridEditor.useDataGridEditor.applyDeleteRows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · agentDriverInstallHint.agentDriverInstallKey (cognitive 21) · ×1
  • agentDriverInstallHint.agentDriverInstallKey (cognitive 21) apps/desktop/src/lib/connection/agentDriverInstallHint.ts:35 — agentDriverInstallHint.agentDriverInstallKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · nativeJobs.rebaseNativeJobDamengDraft (cognitive 21) · ×1
  • nativeJobs.rebaseNativeJobDamengDraft (cognitive 21) apps/desktop/src/lib/database/nativeJobs.ts:458 — nativeJobs.rebaseNativeJobDamengDraft has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (5 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · plainTextSelectionRanges.scanQuotedRanges (cognitive 21) · ×1
  • plainTextSelectionRanges.scanQuotedRanges (cognitive 21) apps/desktop/src/lib/editor/plainTextSelectionRanges.ts:18 — plainTextSelectionRanges.scanQuotedRanges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exportDiagnostics.summarizeExportRows (cognitive 21) · ×1
  • exportDiagnostics.summarizeExportRows (cognitive 21) apps/desktop/src/lib/export/exportDiagnostics.ts:40 — exportDiagnostics.summarizeExportRows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectMetadataCache.loadObjectMetadataFacetInternal (cognitive 21) · ×1
  • objectMetadataCache.loadObjectMetadataFacetInternal (cognitive 21) apps/desktop/src/lib/metadata/objectMetadataCache.ts:140 — objectMetadataCache.loadObjectMetadataFacetInternal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3 (nesting depth added 7). Of this number, 20 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.findOpenMongoQuoteStart (cognitive 21) · ×1
  • mongoCompletion.findOpenMongoQuoteStart (cognitive 21) REDACTED:2083 — mongoCompletion.findOpenMongoQuoteStart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.formatMongoShellLiteral (cognitive 21) · ×1
  • mongoDocumentValues.formatMongoShellLiteral (cognitive 21) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:684 — mongoDocumentValues.formatMongoShellLiteral has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginHostBridge.requirePluginDataQueryRequest (cognitive 21) · ×1
  • pluginHostBridge.requirePluginDataQueryRequest (cognitive 21) REDACTED:1764 — pluginHostBridge.requirePluginDataQueryRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cognitive 21) · ×1
  • sidebarNodeOrdering.orderSidebarTreeChildrenForParent (cognitive 21) apps/desktop/src/lib/sidebar/sidebarNodeOrdering.ts:55 — sidebarNodeOrdering.orderSidebarTreeChildrenForParent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4 (nesting depth added 6). Of this number, 18 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · treeNodeClick.copyDisplayPathForTreeNode (cognitive 21) · ×1
  • treeNodeClick.copyDisplayPathForTreeNode (cognitive 21) apps/desktop/src/lib/sidebar/treeNodeClick.ts:239 — treeNodeClick.copyDisplayPathForTreeNode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ddlSearchMarks.applyDdlSearchMarks (cognitive 21) · ×1
  • ddlSearchMarks.applyDdlSearchMarks (cognitive 21) apps/desktop/src/lib/sql/ddlSearchMarks.ts:32 — ddlSearchMarks.applyDdlSearchMarks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editableQueryHiddenKeys.appendSelectProjections (cognitive 21) · ×1
  • editableQueryHiddenKeys.appendSelectProjections (cognitive 21) apps/desktop/src/lib/sql/editableQueryHiddenKeys.ts:47 — editableQueryHiddenKeys.appendSelectProjections has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 2, loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mysqlRoutineSyntaxDiagnostics.findRoutineDeclarations (cognitive 21) · ×1
  • mysqlRoutineSyntaxDiagnostics.findRoutineDeclarations (cognitive 21) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:75 — mysqlRoutineSyntaxDiagnostics.findRoutineDeclarations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlInListPaste.hasSingleWrappingParentheses (cognitive 21) · ×1
  • sqlInListPaste.hasSingleWrappingParentheses (cognitive 21) apps/desktop/src/lib/sql/sqlInListPaste.ts:167 — sqlInListPaste.hasSingleWrappingParentheses has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectBrowserRows.groupObjectBrowserRows (cognitive 21) · ×1
  • objectBrowserRows.groupObjectBrowserRows (cognitive 21) apps/desktop/src/lib/table/objectBrowserRows.ts:294 — objectBrowserRows.groupObjectBrowserRows has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 6 (7 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectSourceLoad.loadObjectSourceWithRoutineFallback (cognitive 21) · ×1
  • objectSourceLoad.loadObjectSourceWithRoutineFallback (cognitive 21) apps/desktop/src/lib/table/objectSourceLoad.ts:64 — objectSourceLoad.loadObjectSourceWithRoutineFallback has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.prepareOracleRoutineRename · ×1
  • oracleRoutineRename.prepareOracleRoutineRename::walk (cognitive 21) apps/desktop/src/lib/table/oracleRoutineRename.ts:292 — oracleRoutineRename.prepareOracleRoutineRename::walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineRename.prepareOracleRoutineRename) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · oracleTypeManagement.sourceOrder (cognitive 21) · ×1
  • oracleTypeManagement.sourceOrder (cognitive 21) apps/desktop/src/lib/table/oracleTypeManagement.ts:151 — oracleTypeManagement.sourceOrder has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · tabUiState.sanitizeValue (cognitive 21) · ×1
  • tabUiState.sanitizeValue (cognitive 21) apps/desktop/src/lib/tabs/tabUiState.ts:72 — tabUiState.sanitizeValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.setChildren (cognitive 21) · ×1
  • connectionStore.useConnectionStore.setChildren (cognitive 21) apps/desktop/src/stores/connectionStore.ts:2110 — connectionStore.useConnectionStore.setChildren has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.decodeVariable (cognitive 21) · ×1
  • plDebugStore.decodeVariable (cognitive 21) apps/desktop/src/stores/plDebugStore.ts:2153 — plDebugStore.decodeVariable has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.setAutoCommit (cognitive 21) · ×1
  • queryStore.useQueryStore.setAutoCommit (cognitive 21) apps/desktop/src/stores/queryStore.ts:6180 — queryStore.useQueryStore.setAutoCommit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3 (nesting depth added 10). Of this number, 13 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LandingSelect.LandingSelect (cognitive 21) · ×1
  • LandingSelect.LandingSelect (cognitive 21) docs/components/landing/LandingSelect.tsx:18 — LandingSelect.LandingSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 7, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 9 function items inside it that branch (toggle, onListKeyDown, onButtonKeyDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · json.readMongoRegexLiteral (cognitive 21) · ×1
  • json.readMongoRegexLiteral (cognitive 21) packages/mongo-shell/src/json.ts:47 — json.readMongoRegexLiteral has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.splitTopLevel (cognitive 21) · ×1
  • json.splitTopLevel (cognitive 21) packages/mongo-shell/src/json.ts:226 — json.splitTopLevel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Expansion · ×1
  • Expansion::file (cognitive 20) crates/dbx-core/src/data/sql_file_import/includes.rs:141 — Expansion::file has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InsertSqlTemplate · ×1
  • InsertSqlTemplate::build (cognitive 20) crates/dbx-core/src/data/transfer.rs:5341 — InsertSqlTemplate::build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugRegistry · ×1
  • PlDebugRegistry::register (cognitive 20) crates/dbx-core/src/query/pl_debug.rs:594 — PlDebugRegistry::register has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DamengNamedProjection · ×1
  • DamengNamedProjection::bind (cognitive 20) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition/dameng.rs:8 — DamengNamedProjection::bind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.handleLogicalSession (cognitive 20) · ×1
  • DbxJdbcPlugin.handleLogicalSession (cognitive 20) REDACTED:641 — DbxJdbcPlugin.handleLogicalSession has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.hive2ShowCreateObjectSource (cognitive 20) · ×1
  • DbxJdbcPlugin.hive2ShowCreateObjectSource (cognitive 20) REDACTED:5950 — DbxJdbcPlugin.hive2ShowCreateObjectSource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.nativeLegacyJob (cognitive 20) · ×1
  • DbxJdbcPlugin.nativeLegacyJob (cognitive 20) REDACTED:1702 — DbxJdbcPlugin.nativeLegacyJob has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GenericJdbcDdlBuilder.buildTableDdl (cognitive 20) · ×1
  • GenericJdbcDdlBuilder.buildTableDdl (cognitive 20) plugins/jdbc/src/main/java/app/dbx/jdbc/GenericJdbcDdlBuilder.java:23 — GenericJdbcDdlBuilder.buildTableDdl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4, ternaries 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlServerLegacyAgent.connectionPropertyParts (cognitive 20) · ×1
  • SqlServerLegacyAgent.connectionPropertyParts (cognitive 20) agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:897 — SqlServerLegacyAgent.connectionPropertyParts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.rawInput (cognitive 20) · ×1
  • PlDebugTarget.rawInput (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1055 — PlDebugTarget.rawInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 3 (4 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlDebugTarget.readLob (cognitive 20) · ×1
  • PlDebugTarget.readLob (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1478 — PlDebugTarget.readLob has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 6 (7 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.typedSignature (cognitive 20) · ×1
  • PlDebugTarget.typedSignature (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:690 — PlDebugTarget.typedSignature has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugTarget.zonedInput (cognitive 20) · ×1
  • PlDebugTarget.zonedInput (cognitive 20) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1115 — PlDebugTarget.zonedInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · MongoAgent.collationOrNull (cognitive 20) · ×1
  • MongoAgent.collationOrNull (cognitive 20) REDACTED:1119 — MongoAgent.collationOrNull has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · KafkaAgent.resetConsumerGroupOffsets (cognitive 20) · ×1
  • KafkaAgent.resetConsumerGroupOffsets (cognitive 20) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1542 — KafkaAgent.resetConsumerGroupOffsets has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Db2Agent.deferredLobResult (cognitive 20) · ×1
  • Db2Agent.deferredLobResult (cognitive 20) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:538 — Db2Agent.deferredLobResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (7 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionFactoryDataSource.classifyCheckoutFailure (cognitive 20) · ×1
  • ConnectionFactoryDataSource.classifyCheckoutFailure (cognitive 20) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1271 — ConnectionFactoryDataSource.classifyCheckoutFailure has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonRpcServer.executeBlobBoundStatements (cognitive 20) · ×1
  • JsonRpcServer.executeBlobBoundStatements (cognitive 20) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:741 — JsonRpcServer.executeBlobBoundStatements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerReader.summary (cognitive 20) · ×1
  • OracleTriggerReader.summary (cognitive 20) REDACTED:148 — OracleTriggerReader.summary has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10, boolean chains 7, if/else 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · build_driver_zips.build_driver_zips (cognitive 20) · ×1
  • build_driver_zips.build_driver_zips (cognitive 20) agents/scripts/build_driver_zips.py:189 — build_driver_zips.build_driver_zips has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate_agents.validate_jdbc_architecture (cognitive 20) · ×1
  • validate_agents.validate_jdbc_architecture (cognitive 20) agents/scripts/validate_agents.py:191 — validate_agents.validate_jdbc_architecture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cognitive 20) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions (cognitive 20) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:609 — useQueryEditorCompletion.useQueryEditorCompletion.provideMongoCompletions has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 8, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cognitive 20) · ×1
  • useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput (cognitive 20) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1139 — useQueryEditorCompletion.useQueryEditorCompletion.shouldStartSqlCompletionAfterInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorLayout.useQueryEditorLayout (cognitive 20) · ×1
  • useQueryEditorLayout.useQueryEditorLayout (cognitive 20) apps/desktop/src/components/editor/useQueryEditorLayout.ts:5 — useQueryEditorLayout.useQueryEditorLayout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3 (nesting depth added 3). None of this is in the body itself: all 20 points belong to 6 function items inside it that branch (a function literal at line 72, editorBoxTrackStep, editorAvailableSize, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useQueryEditorTextActions.useQueryEditorTextActions.pasteClipboardAsSqlInCondition (cognitive 20) · ×1
  • useQueryEditorTextActions.useQueryEditorTextActions.pasteClipboardAsSqlInCondition (cognitive 20) apps/desktop/src/components/editor/useQueryEditorTextActions.ts:234 — useQueryEditorTextActions.useQueryEditorTextActions.pasteClipboardAsSqlInCondition has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 6, boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGenerateSession.runDataGenerateSession (cognitive 20) · ×1
  • useDataGenerateSession.runDataGenerateSession (cognitive 20) apps/desktop/src/composables/useDataGenerateSession.ts:265 — useDataGenerateSession.runDataGenerateSession has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportSql (cognitive 20) · ×1
  • useDataGridExport.useDataGridExport.exportSql (cognitive 20) apps/desktop/src/composables/useDataGridExport.ts:2620 — useDataGridExport.useDataGridExport.exportSql has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 5, error handling 1. None of this is in the body itself: all 20 points belong to 2 function literals inside it that branch (lines 2623, 2626). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridExtractor.useDataGridExtractor.extractorCellValue (cognitive 20) · ×1
  • useDataGridExtractor.useDataGridExtractor.extractorCellValue (cognitive 20) apps/desktop/src/composables/useDataGridExtractor.ts:142 — useDataGridExtractor.useDataGridExtractor.extractorCellValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (8 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridSelection.useDataGridSelection.applyDraggedRowRange (cognitive 20) · ×1
  • useDataGridSelection.useDataGridSelection.applyDraggedRowRange (cognitive 20) apps/desktop/src/composables/useDataGridSelection.ts:402 — useDataGridSelection.useDataGridSelection.applyDraggedRowRange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cognitive 20) · ×1
  • useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor (cognitive 20) apps/desktop/src/composables/useSidebarTreeToolRuntime.ts:190 — useSidebarTreeToolRuntime.useSidebarTreeToolRuntime.openStructureEditor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cognitive 20) · ×1
  • useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload (cognitive 20) apps/desktop/src/composables/useSnippetAutoUpload.ts:40 — useSnippetAutoUpload.useSnippetAutoUpload.runSnippetAutoUpload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · appBackgroundImage.surfaceColorWithAlpha (cognitive 20) · ×1
  • appBackgroundImage.surfaceColorWithAlpha (cognitive 20) apps/desktop/src/lib/app/appBackgroundImage.ts:167 — appBackgroundImage.surfaceColorWithAlpha has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightweightJsonScanner.readNumberToken (cognitive 20) · ×1
  • LightweightJsonScanner.readNumberToken (cognitive 20) apps/desktop/src/lib/app/documentJsonValues.ts:391 — LightweightJsonScanner.readNumberToken has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrlBuilder.standardUrlScheme (cognitive 20) · ×1
  • connectionUrlBuilder.standardUrlScheme (cognitive 20) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:245 — connectionUrlBuilder.standardUrlScheme has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · gridClientFilter.matchesResultClientFilter (cognitive 20) · ×1
  • gridClientFilter.matchesResultClientFilter (cognitive 20) apps/desktop/src/lib/dataGrid/gridClientFilter.ts:72 — gridClientFilter.matchesResultClientFilter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 2 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · databaseStructureSearch.mapStructureSearchRows (cognitive 20) · ×1
  • databaseStructureSearch.mapStructureSearchRows (cognitive 20) apps/desktop/src/lib/database/databaseStructureSearch.ts:70 — databaseStructureSearch.mapStructureSearchRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeyMetadata (cognitive 20) · ×1
  • oracleForeignKeys.readOracleForeignKeyMetadata (cognitive 20) apps/desktop/src/lib/database/oracleForeignKeys.ts:172 — oracleForeignKeys.readOracleForeignKeyMetadata has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), ternaries 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeySourceSnapshot (cognitive 20) · ×1
  • oracleForeignKeys.readOracleForeignKeySourceSnapshot (cognitive 20) apps/desktop/src/lib/database/oracleForeignKeys.ts:231 — oracleForeignKeys.readOracleForeignKeySourceSnapshot has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 12 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleForeignKeys.readOracleForeignKeyCreateResult (cognitive 20) · ×1
  • oracleForeignKeys.readOracleForeignKeyCreateResult (cognitive 20) apps/desktop/src/lib/database/oracleForeignKeys.ts:604 — oracleForeignKeys.readOracleForeignKeyCreateResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleInvalidObjects.buildOracleCompileSql (cognitive 20) · ×1
  • oracleInvalidObjects.buildOracleCompileSql (cognitive 20) apps/desktop/src/lib/database/oracleInvalidObjects.ts:136 — oracleInvalidObjects.buildOracleCompileSql has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 7, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draft-table.validateLivePendingColumns (cognitive 20) · ×1
  • draft-table.validateLivePendingColumns (cognitive 20) apps/desktop/src/lib/diagram/draft-table.ts:137 — draft-table.validateLivePendingColumns has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphCompletionScope.projections (cognitive 20) · ×1
  • graphCompletionScope.projections (cognitive 20) apps/desktop/src/lib/graph/graphCompletionScope.ts:17 — graphCompletionScope.projections has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 4 (5 pts), loops 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (add, a function literal at line 24). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · datagripImport.mergeFragments (cognitive 20) · ×1
  • datagripImport.mergeFragments (cognitive 20) REDACTED:508 — datagripImport.mergeFragments has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, loops 3, if/else 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · dbeaverImport.buildConnection (cognitive 20) · ×1
  • dbeaverImport.buildConnection (cognitive 20) REDACTED:242 — dbeaverImport.buildConnection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, ternaries 4, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · redisValuePresentation.toYamlLines (cognitive 20) · ×1
  • redisValuePresentation.toYamlLines (cognitive 20) apps/desktop/src/lib/redis/redisValuePresentation.ts:443 — redisValuePresentation.toYamlLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 458, 447). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · redisCommandDocs.mapEntries (cognitive 20) · ×1
  • redisCommandDocs.mapEntries (cognitive 20) apps/desktop/src/lib/redis/redisCommandDocs.ts:37 — redisCommandDocs.mapEntries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlTreeRows.compareSiblingItems (cognitive 20) · ×1
  • savedSqlTreeRows.compareSiblingItems (cognitive 20) apps/desktop/src/lib/savedSql/savedSqlTreeRows.ts:32 — savedSqlTreeRows.compareSiblingItems has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 6 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · schemaDiffTableFilter.compileExcludePatterns (cognitive 20) · ×1
  • schemaDiffTableFilter.compileExcludePatterns (cognitive 20) REDACTED:27 — schemaDiffTableFilter.compileExcludePatterns has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settingsTransfer.isSqlShortcutActionItem (cognitive 20) · ×1
  • settingsTransfer.isSqlShortcutActionItem (cognitive 20) apps/desktop/src/lib/settings/settingsTransfer.ts:507 — settingsTransfer.isSqlShortcutActionItem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mongoCollectionMutation.buildMongoCreateIndexRequest (cognitive 20) · ×1
  • mongoCollectionMutation.buildMongoCreateIndexRequest (cognitive 20) apps/desktop/src/lib/sidebar/mongoCollectionMutation.ts:160 — mongoCollectionMutation.buildMongoCreateIndexRequest has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarLayout.reorderEntry (cognitive 20) · ×1
  • sidebarLayout.reorderEntry (cognitive 20) apps/desktop/src/lib/sidebar/sidebarLayout.ts:476 — sidebarLayout.reorderEntry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (insertNear). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · executableStatementRangeCache.executableStatementRangeAtCursor (cognitive 20) · ×1
  • executableStatementRangeCache.executableStatementRangeAtCursor (cognitive 20) apps/desktop/src/lib/sql/executableStatementRangeCache.ts:136 — executableStatementRangeCache.executableStatementRangeAtCursor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mysqlRoutineSyntaxDiagnostics.analyzeMysqlRoutineSyntax (cognitive 20) · ×1
  • mysqlRoutineSyntaxDiagnostics.analyzeMysqlRoutineSyntax (cognitive 20) apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts:36 — mysqlRoutineSyntaxDiagnostics.analyzeMysqlRoutineSyntax has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 44). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · statementDelimiter.trailingGapIsWhitespaceOrComment (cognitive 20) · ×1
  • statementDelimiter.trailingGapIsWhitespaceOrComment (cognitive 20) apps/desktop/src/lib/sql/statementDelimiter.ts:37 — statementDelimiter.trailingGapIsWhitespaceOrComment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pgPartitionPresentation.splitPgPartitionBoundValues (cognitive 20) · ×1
  • pgPartitionPresentation.splitPgPartitionBoundValues (cognitive 20) apps/desktop/src/lib/table/pgPartitionPresentation.ts:89 — pgPartitionPresentation.splitPgPartitionBoundValues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.isDataTypeLengthDisabled (cognitive 20) · ×1
  • tableStructureEditorState.isDataTypeLengthDisabled (cognitive 20) apps/desktop/src/lib/table/tableStructureEditorState.ts:1896 — tableStructureEditorState.isDataTypeLengthDisabled has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · tableTree.mergeTableInfosIntoObjects (cognitive 20) · ×1
  • tableTree.mergeTableInfosIntoObjects (cognitive 20) apps/desktop/src/lib/table/tableTree.ts:244 — tableTree.mergeTableInfosIntoObjects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 8). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.applyTableVGroupsToChildren (cognitive 20) · ×1
  • tableVGroup.applyTableVGroupsToChildren (cognitive 20) apps/desktop/src/lib/table/tableVGroup.ts:553 — tableVGroup.applyTableVGroupsToChildren has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.migrateTimeoutInheritance (cognitive 20) · ×1
  • connectionStore.useConnectionStore.migrateTimeoutInheritance (cognitive 20) apps/desktop/src/stores/connectionStore.ts:10541 — connectionStore.useConnectionStore.migrateTimeoutInheritance has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 6. Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (resolveInheritance). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.removeConnectionGroups (cognitive 20) · ×1
  • connectionStore.useConnectionStore.removeConnectionGroups (cognitive 20) apps/desktop/src/stores/connectionStore.ts:10775 — connectionStore.useConnectionStore.removeConnectionGroups has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cognitive 20) · ×1
  • queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation (cognitive 20) apps/desktop/src/stores/queryStore.ts:7453 — queryStore.useQueryStore.buildHiddenPrimaryKeyPreparation has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (7 pts), if/else 4 (nesting depth added 1). Of this number, 16 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.cancelTabExecution (cognitive 20) · ×1
  • queryStore.useQueryStore.cancelTabExecution (cognitive 20) apps/desktop/src/stores/queryStore.ts:10413 — queryStore.useQueryStore.cancelTabExecution has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.replaceMongoRegexLiterals (cognitive 20) · ×1
  • json.replaceMongoRegexLiterals (cognitive 20) packages/mongo-shell/src/json.ts:92 — json.replaceMongoRegexLiterals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.replaceMongoEjsonDeserialize (cognitive 20) · ×1
  • json.replaceMongoEjsonDeserialize (cognitive 20) packages/mongo-shell/src/json.ts:503 — json.replaceMongoEjsonDeserialize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.convertSingleQuotedStrings (cognitive 20) · ×1
  • json.convertSingleQuotedStrings (cognitive 20) packages/mongo-shell/src/json.ts:731 — json.convertSingleQuotedStrings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · push (cognitive 20) · ×1
  • push (cognitive 20) plugins/sdk/dev-host/sidecar.mjs:32 — push has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuntimeConfig · ×1
  • RuntimeConfig::from_environment_and_args (cognitive 19) crates/dbx-mcp/src/runtime.rs:43 — RuntimeConfig::from_environment_and_args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FirebirdRoutineBlock · ×1
  • FirebirdRoutineBlock::is_complete (cognitive 19) crates/dbx-sql-core/src/sql.rs:3579 — FirebirdRoutineBlock::is_complete has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DialectPluginLoader · ×1
  • DialectPluginLoader::scan_and_load (cognitive 19) crates/dbx-sql-dialect/src/sql_dialect/dialect_loader.rs:187 — DialectPluginLoader::scan_and_load has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleColumnDataType (cognitive 19) · ×1
  • DbxJdbcPlugin.oracleColumnDataType (cognitive 19) REDACTED:6089 — DbxJdbcPlugin.oracleColumnDataType has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleListObjects (cognitive 19) · ×1
  • DbxJdbcPlugin.oracleListObjects (cognitive 19) REDACTED:5289 — DbxJdbcPlugin.oracleListObjects has cognitive complexity 19 (threshold 15). Drivers by points: error handling 8 (11 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleTypeSource (cognitive 19) · ×1
  • DbxJdbcPlugin.oracleTypeSource (cognitive 19) REDACTED:5658 — DbxJdbcPlugin.oracleTypeSource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerMetadataReader.source (cognitive 19) · ×1
  • OracleTriggerMetadataReader.source (cognitive 19) plugins/jdbc/src/main/java/app/dbx/jdbc/OracleTriggerMetadataReader.java:207 — OracleTriggerMetadataReader.source has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.formatDataType (cognitive 19) · ×1
  • OceanBaseOracleAgent.formatDataType (cognitive 19) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2751 — OceanBaseOracleAgent.formatDataType has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FirebirdObjectSource.triggerSource (cognitive 19) · ×1
  • FirebirdObjectSource.triggerSource (cognitive 19) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdObjectSource.java:57 — FirebirdObjectSource.triggerSource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DamengAgent.identityColumnsFromDdlText (cognitive 19) · ×1
  • DamengAgent.identityColumnsFromDdlText (cognitive 19) REDACTED:2301 — DamengAgent.identityColumnsFromDdlText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EwkbWktDecoder.tryParseHex (cognitive 19) · ×1
  • EwkbWktDecoder.tryParseHex (cognitive 19) agents/common/src/main/java/com/dbx/agent/EwkbWktDecoder.java:238 — EwkbWktDecoder.tryParseHex has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts), loops 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MultiSessionJsonRpcServer.handleRequest (cognitive 19) · ×1
  • MultiSessionJsonRpcServer.handleRequest (cognitive 19) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198 — MultiSessionJsonRpcServer.handleRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 4 (7 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OracleTriggerReader.source (cognitive 19) · ×1
  • OracleTriggerReader.source (cognitive 19) REDACTED:183 — OracleTriggerReader.source has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (5 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostgresLikeAgent.listForeignKeysFromCatalogArrays (cognitive 19) · ×1
  • PostgresLikeAgent.listForeignKeysFromCatalogArrays (cognitive 19) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:774 — PostgresLikeAgent.listForeignKeysFromCatalogArrays has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ci-install-system-deps.install (cognitive 19) · ×1
  • ci-install-system-deps.install (cognitive 19) .github/scripts/ci-install-system-deps.py:141 — ci-install-system-deps.install has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 1 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.isSourceAdjacentGap (cognitive 19) · ×1
  • sqlStatementRanges.isSourceAdjacentGap (cognitive 19) apps/desktop/src/lib/sql/sqlStatementRanges.ts:2794 — sqlStatementRanges.isSourceAdjacentGap has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (7 pts), boolean chains 6, if/else 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify_offline_jdbc_release.main (cognitive 19) · ×1
  • verify_offline_jdbc_release.main (cognitive 19) agents/scripts/verify_offline_jdbc_release.mjs:64 — verify_offline_jdbc_release.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.performInstall (cognitive 19) · ×1
  • useAppUpdater.useAppUpdater.performInstall (cognitive 19) apps/desktop/src/composables/useAppUpdater.ts:395 — useAppUpdater.useAppUpdater.performInstall has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridConditionEditor.activeQuoteAt (cognitive 19) · ×1
  • useDataGridConditionEditor.activeQuoteAt (cognitive 19) REDACTED:193 — useDataGridConditionEditor.activeQuoteAt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.insideInValueList (cognitive 19) · ×1
  • useDataGridConditionEditor.insideInValueList (cognitive 19) REDACTED:285 — useDataGridConditionEditor.insideInValueList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cognitive 19) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions (cognitive 19) REDACTED:558 — useDataGridConditionEditor.useDataGridConditionEditor.loadSuggestions has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 4, error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.captureSqlInsertExportData (cognitive 19) · ×1
  • useDataGridExport.useDataGridExport.captureSqlInsertExportData (cognitive 19) apps/desktop/src/composables/useDataGridExport.ts:2800 — useDataGridExport.useDataGridExport.captureSqlInsertExportData has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 6 (nesting depth added 2). Of this number, 15 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cognitive 19) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline (cognitive 19) apps/desktop/src/composables/useDataGridLargeValues.ts:694 — useDataGridLargeValues.useDataGridLargeValues.preparePreviewSaveBaseline has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 5). Of this number, 16 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridSelection.useDataGridSelection.selectedCellCount (cognitive 19) · ×1
  • useDataGridSelection.useDataGridSelection.selectedCellCount (cognitive 19) apps/desktop/src/composables/useDataGridSelection.ts:164 — useDataGridSelection.useDataGridSelection.selectedCellCount has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cognitive 19) · ×1
  • useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex (cognitive 19) apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts:654 — useSidebarDatabaseSpecificMutationRuntime.useSidebarDatabaseSpecificMutationRuntime.confirmEditMongoIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 689). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData (cognitive 19) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData (cognitive 19) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:941 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aiProposalDetect.lastLineMentionsWriteSql (cognitive 19) · ×1
  • aiProposalDetect.lastLineMentionsWriteSql (cognitive 19) apps/desktop/src/lib/ai/aiProposalDetect.ts:274 — aiProposalDetect.lastLineMentionsWriteSql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorUtils.isBackendError (cognitive 19) · ×1
  • errorUtils.isBackendError (cognitive 19) apps/desktop/src/lib/backend/errorUtils.ts:129 — errorUtils.isBackendError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · errorUtils.boundedFallbackTextAtDepth (cognitive 19) · ×1
  • errorUtils.boundedFallbackTextAtDepth (cognitive 19) apps/desktop/src/lib/backend/errorUtils.ts:286 — errorUtils.boundedFallbackTextAtDepth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonSourceScanner.readStringToken (cognitive 19) · ×1
  • JsonSourceScanner.readStringToken (cognitive 19) apps/desktop/src/lib/common/safeJsonFormat.ts:488 — JsonSourceScanner.readStringToken has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agentTarget.consulAgentWriteBlockedReason (cognitive 19) · ×1
  • agentTarget.consulAgentWriteBlockedReason (cognitive 19) apps/desktop/src/lib/consul/agentTarget.ts:39 — agentTarget.consulAgentWriteBlockedReason has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 8, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · cellValueGeneration.generateCellValues (cognitive 19) · ×1
  • cellValueGeneration.generateCellValues (cognitive 19) apps/desktop/src/lib/dataGrid/cellValueGeneration.ts:51 — cellValueGeneration.generateCellValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 4 (8 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · dataGenerate.generateSkuFromPattern (cognitive 19) · ×1
  • dataGenerate.generateSkuFromPattern (cognitive 19) apps/desktop/src/lib/dataGrid/dataGenerate.ts:642 — dataGenerate.generateSkuFromPattern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnVisibility.areCellValuesEqual (cognitive 19) · ×1
  • dataGridColumnVisibility.areCellValuesEqual (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnVisibility.ts:154 — dataGridColumnVisibility.areCellValuesEqual has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cognitive 19) · ×1
  • dataGridColumnWidthState.loadPersistentDataGridColumnWidthState (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:120 — dataGridColumnWidthState.loadPersistentDataGridColumnWidthState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnWidthState.loadDataGridColumnWidthState (cognitive 19) · ×1
  • dataGridColumnWidthState.loadDataGridColumnWidthState (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridColumnWidthState.ts:204 — dataGridColumnWidthState.loadDataGridColumnWidthState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridInsertPaste.parseSingleInsertStatement (cognitive 19) · ×1
  • dataGridInsertPaste.parseSingleInsertStatement (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridInsertPaste.ts:270 — dataGridInsertPaste.parseSingleInsertStatement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridSort.compareDataGridValues (cognitive 19) · ×1
  • dataGridSort.compareDataGridValues (cognitive 19) apps/desktop/src/lib/dataGrid/dataGridSort.ts:109 — dataGridSort.compareDataGridValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nativeJobAdmin.nativeJobDefinitionForEdit (cognitive 19) · ×1
  • nativeJobAdmin.nativeJobDefinitionForEdit (cognitive 19) apps/desktop/src/lib/database/nativeJobAdmin.ts:324 — nativeJobAdmin.nativeJobDefinitionForEdit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.executeOracleForeignKeyCreatePlan (cognitive 19) · ×1
  • oracleForeignKeys.executeOracleForeignKeyCreatePlan (cognitive 19) apps/desktop/src/lib/database/oracleForeignKeys.ts:572 — oracleForeignKeys.executeOracleForeignKeyCreatePlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleUserAdmin.oraclePrivilegeSql (cognitive 19) · ×1
  • oracleUserAdmin.oraclePrivilegeSql (cognitive 19) apps/desktop/src/lib/database/oracleUserAdmin.ts:92 — oracleUserAdmin.oraclePrivilegeSql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 6 (7 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · erDiagram.buildDiagramJoinSql (cognitive 19) · ×1
  • erDiagram.buildDiagramJoinSql (cognitive 19) apps/desktop/src/lib/diagram/erDiagram.ts:371 — erDiagram.buildDiagramJoinSql has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · codemirrorInsertValueHints.parseClausesNearView (cognitive 19) · ×1
  • codemirrorInsertValueHints.parseClausesNearView (cognitive 19) apps/desktop/src/lib/editor/codemirrorInsertValueHints.ts:107 — codemirrorInsertValueHints.parseClausesNearView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagramFormats.buildDiagramDbml (cognitive 19) · ×1
  • diagramFormats.buildDiagramDbml (cognitive 19) apps/desktop/src/lib/export/diagramFormats.ts:112 — diagramFormats.buildDiagramDbml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navicatImport.readNode (cognitive 19) · ×1
  • navicatImport.readNode (cognitive 19) REDACTED:171 — navicatImport.readNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kvKeyTree.buildKvKeyTree (cognitive 19) · ×1
  • kvKeyTree.buildKvKeyTree (cognitive 19) apps/desktop/src/lib/kv/kvKeyTree.ts:79 — kvKeyTree.buildKvKeyTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · modelTemplates.renderModelTemplate (cognitive 19) · ×1
  • modelTemplates.renderModelTemplate (cognitive 19) apps/desktop/src/lib/model/modelTemplates.ts:23 — modelTemplates.renderModelTemplate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). None of this is in the body itself: all 19 points belong to 2 function items inside it that branch (parse, a function literal at line 50). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · mongoCompletion.classifyCursorInCall (cognitive 19) · ×1
  • mongoCompletion.classifyCursorInCall (cognitive 19) REDACTED:1145 — mongoCompletion.classifyCursorInCall has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoCompletion.classifyFindProjection (cognitive 19) · ×1
  • mongoCompletion.classifyFindProjection (cognitive 19) REDACTED:1370 — mongoCompletion.classifyFindProjection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoConnectionOptions.mongodbAuthFailureHint (cognitive 19) · ×1
  • mongoConnectionOptions.mongodbAuthFailureHint (cognitive 19) apps/desktop/src/lib/mongo/mongoConnectionOptions.ts:85 — mongoConnectionOptions.mongodbAuthFailureHint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoShellCommand.parseMongoUserInfoCommand (cognitive 19) · ×1
  • mongoShellCommand.parseMongoUserInfoCommand (cognitive 19) REDACTED:834 — mongoShellCommand.parseMongoUserInfoCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · batchTableEmpty.runBatchTableEmptyLayers (cognitive 19) · ×1
  • batchTableEmpty.runBatchTableEmptyLayers (cognitive 19) apps/desktop/src/lib/sidebar/batchTableEmpty.ts:63 — batchTableEmpty.runBatchTableEmptyLayers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 81). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes · ×1
  • sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit (cognitive 19) apps/desktop/src/lib/sidebar/sidebarGlobalSearchIndex.ts:41 — sidebarGlobalSearchIndex.collectSidebarGlobalSearchIndexes::visit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cognitive 19) · ×1
  • sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample (cognitive 19) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:742 — sidebarLayoutMonitor.createSidebarLayoutMonitor.captureSample has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarSearch.matchSidebarLabelWithRegex (cognitive 19) · ×1
  • sidebarSearch.matchSidebarLabelWithRegex (cognitive 19) apps/desktop/src/lib/sidebar/sidebarSearch.ts:143 — sidebarSearch.matchSidebarLabelWithRegex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ddlDisplay.findCreateTableBody (cognitive 19) · ×1
  • ddlDisplay.findCreateTableBody (cognitive 19) apps/desktop/src/lib/sql/ddlDisplay.ts:393 — ddlDisplay.findCreateTableBody has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, loops 2 (nesting depth added 3). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · insertValueHints.buildInsertValueHints (cognitive 19) · ×1
  • insertValueHints.buildInsertValueHints (cognitive 19) apps/desktop/src/lib/sql/insertValueHints.ts:741 — insertValueHints.buildInsertValueHints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.buildCompositeHeuristicJoinConditionItems (cognitive 19) · ×1
  • sqlCompletion.buildCompositeHeuristicJoinConditionItems (cognitive 19) apps/desktop/src/lib/sql/sqlCompletion.ts:6326 — sqlCompletion.buildCompositeHeuristicJoinConditionItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sqlCompletion.buildFunctionSnippetItems (cognitive 19) · ×1
  • sqlCompletion.buildFunctionSnippetItems (cognitive 19) apps/desktop/src/lib/sql/sqlCompletion.ts:6555 — sqlCompletion.buildFunctionSnippetItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (7 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.tryReadQuotedSubstitutionPlaceholder (cognitive 19) · ×1
  • sqlParameters.tryReadQuotedSubstitutionPlaceholder (cognitive 19) apps/desktop/src/lib/sql/sqlParameters.ts:1759 — sqlParameters.tryReadQuotedSubstitutionPlaceholder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlInListPaste.splitPasteTokens (cognitive 19) · ×1
  • sqlInListPaste.splitPasteTokens (cognitive 19) apps/desktop/src/lib/sql/sqlInListPaste.ts:83 — sqlInListPaste.splitPasteTokens has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlNavigation.resolveSqlObjectNavigationIdentity (cognitive 19) · ×1
  • sqlNavigation.resolveSqlObjectNavigationIdentity (cognitive 19) apps/desktop/src/lib/sql/sqlNavigation.ts:513 — sqlNavigation.resolveSqlObjectNavigationIdentity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlNavigation.sqlObjectNavigationTargetFromIdentity (cognitive 19) · ×1
  • sqlNavigation.sqlObjectNavigationTargetFromIdentity (cognitive 19) apps/desktop/src/lib/sql/sqlNavigation.ts:572 — sqlNavigation.sqlObjectNavigationTargetFromIdentity has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columnDefaultPresets.starRocksDefaultPresets (cognitive 19) · ×1
  • columnDefaultPresets.starRocksDefaultPresets (cognitive 19) apps/desktop/src/lib/table/columnDefaultPresets.ts:29 — columnDefaultPresets.starRocksDefaultPresets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oracleRoutineWrite.prepareOracleRoutineSourceSave (cognitive 19) · ×1
  • oracleRoutineWrite.prepareOracleRoutineSourceSave (cognitive 19) apps/desktop/src/lib/table/oracleRoutineWrite.ts:49 — oracleRoutineWrite.prepareOracleRoutineSourceSave has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (34 pts), error handling 6 (13 pts), boolean chains 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineWrite.prepareOracleRoutineSourceSave::execute) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · oracleTableRename.readOnlyReconcile (cognitive 19) · ×1
  • oracleTableRename.readOnlyReconcile (cognitive 19) REDACTED:794 — oracleTableRename.readOnlyReconcile has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.sqlServerParameterDeclarationType (cognitive 19) · ×1
  • routineParameters.sqlServerParameterDeclarationType (cognitive 19) apps/desktop/src/lib/table/routineParameters.ts:512 — routineParameters.sqlServerParameterDeclarationType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · tableVGroup.normalizeTableVGroupLayout · ×1
  • tableVGroup.normalizeTableVGroupLayout::normalizeEntries (cognitive 19) apps/desktop/src/lib/table/tableVGroup.ts:701 — tableVGroup.normalizeTableVGroupLayout::normalizeEntries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabDatabaseIconType (cognitive 19) · ×1
  • tabPresentation.tabDatabaseIconType (cognitive 19) apps/desktop/src/lib/tabs/tabPresentation.ts:796 — tabPresentation.tabDatabaseIconType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabSwitcherKeyboard.tabSwitcherReleaseKeys (cognitive 19) · ×1
  • tabSwitcherKeyboard.tabSwitcherReleaseKeys (cognitive 19) apps/desktop/src/lib/tabs/tabSwitcherKeyboard.ts:22 — tabSwitcherKeyboard.tabSwitcherReleaseKeys has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.startDisconnectRequest (cognitive 19) · ×1
  • connectionStore.useConnectionStore.startDisconnectRequest (cognitive 19) apps/desktop/src/stores/connectionStore.ts:1219 — connectionStore.useConnectionStore.startDisconnectRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1231, disconnectIfCurrent, a function literal at line 1248). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadElasticsearchIndices (cognitive 19) · ×1
  • connectionStore.useConnectionStore.loadElasticsearchIndices (cognitive 19) apps/desktop/src/stores/connectionStore.ts:6639 — connectionStore.useConnectionStore.loadElasticsearchIndices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 5 (8 pts), boolean chains 2, error handling 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.refreshWatches (cognitive 19) · ×1
  • plDebugStore.usePlDebugStore.refreshWatches (cognitive 19) apps/desktop/src/stores/plDebugStore.ts:1550 — plDebugStore.usePlDebugStore.refreshWatches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.releasePluginConnectionsAfterClose (cognitive 19) · ×1
  • queryStore.useQueryStore.releasePluginConnectionsAfterClose (cognitive 19) apps/desktop/src/stores/queryStore.ts:5147 — queryStore.useQueryStore.releasePluginConnectionsAfterClose has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (nesting depth added 7). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agentBundle.extractDriverPackage (cognitive 19) · ×1
  • agentBundle.extractDriverPackage (cognitive 19) docs/lib/agentBundle.ts:239 — agentBundle.extractDriverPackage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json.removeTrailingCommas (cognitive 19) · ×1
  • json.removeTrailingCommas (cognitive 19) packages/mongo-shell/src/json.ts:424 — json.removeTrailingCommas has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · database-env.allPortMappingsDefaultToLoopback (cognitive 19) · ×1
  • database-env.allPortMappingsDefaultToLoopback (cognitive 19) scripts/database-env.mjs:330 — database-env.allPortMappingsDefaultToLoopback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · outline · ×1
  • outline::walk (cognitive 19) REDACTED:66 — outline::walk has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 4, if/else 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stopProcessTree (cognitive 19) · ×1
  • stopProcessTree (cognitive 19) plugins/sdk/dev-host/process-tree.mjs:5 — stopProcessTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (signal, a function literal at line 18, a function literal at line 10, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PoolRoutingControl · ×1
  • PoolRoutingControl::detach_agent_pool_if_current (cognitive 18) REDACTED:1043 — PoolRoutingControl::detach_agent_pool_if_current has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StrictTranscodingReader · ×1
  • StrictTranscodingReader::read (cognitive 18) REDACTED:943 — StrictTranscodingReader::read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleSchedulerProjection · ×1
  • OracleSchedulerProjection::bind (cognitive 18) crates/dbx-core/src/schema/native_jobs/operations/scheduler/transition/projection.rs:106 — OracleSchedulerProjection::bind has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserInputSpec · ×1
  • UserInputSpec::parse (cognitive 18) crates/dbx-plugin-runtime/src/plugins/runtime.rs:972 — UserInputSpec::parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateDownloadSource · ×1
  • UpdateDownloadSource::installer_asset_candidates (cognitive 18) src-tauri/src/commands/update.rs:301 — UpdateDownloadSource::installer_asset_candidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.openConnection (cognitive 18) · ×1
  • DbxJdbcPlugin.openConnection (cognitive 18) REDACTED:1175 — DbxJdbcPlugin.openConnection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, error handling 2 (5 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DbxJdbcPlugin.oracleExplainBindMarkerCount (cognitive 18) · ×1
  • DbxJdbcPlugin.oracleExplainBindMarkerCount (cognitive 18) REDACTED:2484 — DbxJdbcPlugin.oracleExplainBindMarkerCount has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugCompositeOutput.validate (cognitive 18) · ×1
  • PlDebugCompositeOutput.validate (cognitive 18) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeOutput.java:95 — PlDebugCompositeOutput.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.collectPeekedMessages (cognitive 18) · ×1
  • KafkaAgent.collectPeekedMessages (cognitive 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1876 — KafkaAgent.collectPeekedMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.validatePeekRequest (cognitive 18) · ×1
  • KafkaAgent.validatePeekRequest (cognitive 18) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:2230 — KafkaAgent.validatePeekRequest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebirdAgent.listObjects (cognitive 18) · ×1
  • FirebirdAgent.listObjects (cognitive 18) agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java:153 — FirebirdAgent.listObjects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DamengAgent.tableColumnComments (cognitive 18) · ×1
  • DamengAgent.tableColumnComments (cognitive 18) REDACTED:3323 — DamengAgent.tableColumnComments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DedicatedAttempt.completeOpen (cognitive 18) · ×1
  • DedicatedAttempt.completeOpen (cognitive 18) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:527 — DedicatedAttempt.completeOpen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OracleTriggerReader.enrichObjects (cognitive 18) · ×1
  • OracleTriggerReader.enrichObjects (cognitive 18) REDACTED:46 — OracleTriggerReader.enrichObjects has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 2 (6 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · configure-docker-mirror.configure (cognitive 18) · ×1
  • configure-docker-mirror.configure (cognitive 18) .github/scripts/configure-docker-mirror.py:16 — configure-docker-mirror.configure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ddlStorage.spliceTightRemovals (cognitive 18) · ×1
  • ddlStorage.spliceTightRemovals (cognitive 18) apps/desktop/src/lib/sql/ddlStorage.ts:56 — ddlStorage.spliceTightRemovals has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 2, loops 2 (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlStatementRanges.skipSqlTrivia (cognitive 18) · ×1
  • sqlStatementRanges.skipSqlTrivia (cognitive 18) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1166 — sqlStatementRanges.skipSqlTrivia has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cognitive 18) · ×1
  • queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom (cognitive 18) apps/desktop/src/components/editor/queryEditorHoverContent.ts:20 — queryEditorHoverContent.createQueryEditorHoverContent.createHoverDom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.timestampTargetType (cognitive 18) · ×1
  • queryResultTransferValues.timestampTargetType (cognitive 18) apps/desktop/src/components/transfer/queryResultTransferValues.ts:114 — queryResultTransferValues.timestampTargetType has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 6, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryResultTransferValues.bitStringLiteral (cognitive 18) · ×1
  • queryResultTransferValues.bitStringLiteral (cognitive 18) apps/desktop/src/components/transfer/queryResultTransferValues.ts:394 — queryResultTransferValues.bitStringLiteral has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (7 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.downloadUpdateInBackground · ×1
  • useAppUpdater.useAppUpdater.downloadUpdateInBackground::run (cognitive 18) apps/desktop/src/composables/useAppUpdater.ts:302 — useAppUpdater.useAppUpdater.downloadUpdateInBackground::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.settlePendingSave (cognitive 18) · ×1
  • useDataGridEditor.useDataGridEditor.settlePendingSave (cognitive 18) apps/desktop/src/composables/useDataGridEditor.ts:2073 — useDataGridEditor.useDataGridEditor.settlePendingSave has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useExportTracker.findActiveOverlappingTransfer (cognitive 18) · ×1
  • useExportTracker.findActiveOverlappingTransfer (cognitive 18) apps/desktop/src/composables/useExportTracker.ts:429 — useExportTracker.findActiveOverlappingTransfer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useFlatTree.createFlatTreeIndex (cognitive 18) · ×1
  • useFlatTree.createFlatTreeIndex (cognitive 18) apps/desktop/src/composables/useFlatTree.ts:140 — useFlatTree.createFlatTreeIndex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useNativeJobExecution.useNativeJobExecution.acceptStatus (cognitive 18) · ×1
  • useNativeJobExecution.useNativeJobExecution.acceptStatus (cognitive 18) apps/desktop/src/composables/useNativeJobExecution.ts:108 — useNativeJobExecution.useNativeJobExecution.acceptStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQuickOpen.matchWordPrefixes (cognitive 18) · ×1
  • useQuickOpen.matchWordPrefixes (cognitive 18) apps/desktop/src/composables/useQuickOpen.ts:153 — useQuickOpen.matchWordPrefixes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 9). Of this number, 15 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · documentStoreProvider.parseDocumentFilterValueList (cognitive 18) · ×1
  • documentStoreProvider.parseDocumentFilterValueList (cognitive 18) apps/desktop/src/lib/app/documentStoreProvider.ts:641 — documentStoreProvider.parseDocumentFilterValueList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cognitive 18) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupSchedule (cognitive 18) REDACTED:291 — scheduledDatabaseBackup.normalizeDatabaseBackupSchedule has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 3, error handling 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · decodeText.decodeImportFileText (cognitive 18) · ×1
  • decodeText.decodeImportFileText (cognitive 18) apps/desktop/src/lib/common/decodeText.ts:11 — decodeText.decodeImportFileText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionLevelDatabaseBootstrap.stripLeadingSqlComments (cognitive 18) · ×1
  • connectionLevelDatabaseBootstrap.stripLeadingSqlComments (cognitive 18) apps/desktop/src/lib/connection/connectionLevelDatabaseBootstrap.ts:77 — connectionLevelDatabaseBootstrap.stripLeadingSqlComments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columnFormatter.parseIoTDBTimestampEditorValue (cognitive 18) · ×1
  • columnFormatter.parseIoTDBTimestampEditorValue (cognitive 18) apps/desktop/src/lib/dataGrid/columnFormatter.ts:383 — columnFormatter.parseIoTDBTimestampEditorValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 2 (3 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · columnFormatter.formatJsonPath (cognitive 18) · ×1
  • columnFormatter.formatJsonPath (cognitive 18) apps/desktop/src/lib/dataGrid/columnFormatter.ts:680 — columnFormatter.formatJsonPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnFilter.splitFilterValues (cognitive 18) · ×1
  • dataGridColumnFilter.splitFilterValues (cognitive 18) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:259 — dataGridColumnFilter.splitFilterValues has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnIndexIcon.buildColumnIndexMap (cognitive 18) · ×1
  • dataGridColumnIndexIcon.buildColumnIndexMap (cognitive 18) apps/desktop/src/lib/dataGrid/dataGridColumnIndexIcon.ts:11 — dataGridColumnIndexIcon.buildColumnIndexMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryPreview.tokenize (cognitive 18) · ×1
  • geometryPreview.tokenize (cognitive 18) apps/desktop/src/lib/dataGrid/geometryPreview.ts:14 — geometryPreview.tokenize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gridSelection.summarizeSelection (cognitive 18) · ×1
  • gridSelection.summarizeSelection (cognitive 18) apps/desktop/src/lib/dataGrid/gridSelection.ts:230 — gridSelection.summarizeSelection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cognitive 18) · ×1
  • oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget (cognitive 18) apps/desktop/src/lib/database/oceanbaseSessionDiagnostics.ts:100 — oceanbaseSessionDiagnostics.captureOceanbaseDiagnosticTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleConstraints.constraintRecoveryCandidate (cognitive 18) · ×1
  • oracleConstraints.constraintRecoveryCandidate (cognitive 18) apps/desktop/src/lib/database/oracleConstraints.ts:427 — oracleConstraints.constraintRecoveryCandidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleConstraints.readbackMatches (cognitive 18) · ×1
  • oracleConstraints.readbackMatches (cognitive 18) apps/desktop/src/lib/database/oracleConstraints.ts:629 — oracleConstraints.readbackMatches has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · oracleConstraints.prepareOracleConstraintPlan (cognitive 18) · ×1
  • oracleConstraints.prepareOracleConstraintPlan (cognitive 18) apps/desktop/src/lib/database/oracleConstraints.ts:692 — oracleConstraints.prepareOracleConstraintPlan has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleUserAdmin.buildOracleObjectAuthorizationPlan (cognitive 18) · ×1
  • oracleUserAdmin.buildOracleObjectAuthorizationPlan (cognitive 18) apps/desktop/src/lib/database/oracleUserAdmin.ts:31 — oracleUserAdmin.buildOracleObjectAuthorizationPlan has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleUserAdmin.createOracleUserAdminActions (cognitive 18) · ×1
  • oracleUserAdmin.createOracleUserAdminActions (cognitive 18) apps/desktop/src/lib/database/oracleUserAdmin.ts:110 — oracleUserAdmin.createOracleUserAdminActions has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 2, if/else 2 (nesting depth added 7). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataDictionaryPdf.flowObjects (cognitive 18) · ×1
  • dataDictionaryPdf.flowObjects (cognitive 18) apps/desktop/src/lib/docs/dataDictionaryPdf.ts:247 — dataDictionaryPdf.flowObjects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). Of this number, 15 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorShellLineCommentHighlight.createShellLineCommentHighlight · ×1
  • codemirrorShellLineCommentHighlight.createShellLineCommentHighlight::buildDecorations (cognitive 18) apps/desktop/src/lib/editor/codemirrorShellLineCommentHighlight.ts:28 — codemirrorShellLineCommentHighlight.createShellLineCommentHighlight::buildDecorations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.validateTokens (cognitive 18) · ×1
  • sqlSemanticSelectionRanges.validateTokens (cognitive 18) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:108 — sqlSemanticSelectionRanges.validateTokens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagramFormats.diagramExportFileName (cognitive 18) · ×1
  • diagramFormats.diagramExportFileName (cognitive 18) apps/desktop/src/lib/export/diagramFormats.ts:100 — diagramFormats.diagramExportFileName has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (17 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · xlsxExport.cellXml (cognitive 18) · ×1
  • xlsxExport.cellXml (cognitive 18) apps/desktop/src/lib/export/xlsxExport.ts:163 — xlsxExport.cellXml has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 5 (6 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · neo4jGraph.applyNeo4jGraphPropertyToResult (cognitive 18) · ×1
  • neo4jGraph.applyNeo4jGraphPropertyToResult (cognitive 18) apps/desktop/src/lib/graph/neo4jGraph.ts:65 — neo4jGraph.applyNeo4jGraphPropertyToResult has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 76, propertiesDisplay, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · dbeaverImport.parseJdbcUrl (cognitive 18) · ×1
  • dbeaverImport.parseJdbcUrl (cognitive 18) REDACTED:148 — dbeaverImport.parseJdbcUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · navicatImport.inferProfile (cognitive 18) · ×1
  • navicatImport.inferProfile (cognitive 18) REDACTED:153 — navicatImport.inferProfile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoDocumentValues.buildMongoCopyUpdateDocument (cognitive 18) · ×1
  • mongoDocumentValues.buildMongoCopyUpdateDocument (cognitive 18) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:540 — mongoDocumentValues.buildMongoCopyUpdateDocument has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.findUnsupportedValueConstructor (cognitive 18) · ×1
  • mongoShellCommand.findUnsupportedValueConstructor (cognitive 18) REDACTED:212 — mongoShellCommand.findUnsupportedValueConstructor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSql.exprToFilter (cognitive 18) · ×1
  • mongoSql.exprToFilter (cognitive 18) apps/desktop/src/lib/mongo/mongoSql.ts:996 — mongoSql.exprToFilter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (8 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoSyntaxDiagnostics.describeMongoWriteRisk (cognitive 18) · ×1
  • mongoSyntaxDiagnostics.describeMongoWriteRisk (cognitive 18) apps/desktop/src/lib/mongo/mongoSyntaxDiagnostics.ts:81 — mongoSyntaxDiagnostics.describeMongoWriteRisk has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · nacosAdmin.pairChangedLines (cognitive 18) · ×1
  • nacosAdmin.pairChangedLines (cognitive 18) apps/desktop/src/lib/nacos/nacosAdmin.ts:622 — nacosAdmin.pairChangedLines has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlSearch.findSavedSqlSearchMatches (cognitive 18) · ×1
  • savedSqlSearch.findSavedSqlSearchMatches (cognitive 18) apps/desktop/src/lib/savedSql/savedSqlSearch.ts:85 — savedSqlSearch.findSavedSqlSearchMatches has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · packageMembers.buildPackageMemberNodes (cognitive 18) · ×1
  • packageMembers.buildPackageMemberNodes (cognitive 18) apps/desktop/src/lib/sidebar/packageMembers.ts:55 — packageMembers.buildPackageMemberNodes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarTableVGroupDrag.resolveTableVGroupDropTarget (cognitive 18) · ×1
  • sidebarTableVGroupDrag.resolveTableVGroupDropTarget (cognitive 18) apps/desktop/src/lib/sidebar/sidebarTableVGroupDrag.ts:29 — sidebarTableVGroupDrag.resolveTableVGroupDropTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarTreeLabel.sidebarTreeDisplayLabel (cognitive 18) · ×1
  • sidebarTreeLabel.sidebarTreeDisplayLabel (cognitive 18) apps/desktop/src/lib/sidebar/sidebarTreeLabel.ts:8 — sidebarTreeLabel.sidebarTreeDisplayLabel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · printer.printElement (cognitive 18) · ×1
  • printer.printElement (cognitive 18) apps/desktop/src/lib/sql/layout/printer.ts:536 — printer.printElement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · completion.sqlSemanticSelectStarIsOnlyProjection (cognitive 18) · ×1
  • completion.sqlSemanticSelectStarIsOnlyProjection (cognitive 18) apps/desktop/src/lib/sql/semantic/completion.ts:77 — completion.sqlSemanticSelectStarIsOnlyProjection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · model.trailingIdentifier (cognitive 18) · ×1
  • model.trailingIdentifier (cognitive 18) apps/desktop/src/lib/sql/semantic/model.ts:845 — model.trailingIdentifier has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlDiagnostics.sqlErrorDecorationRange (cognitive 18) · ×1
  • sqlDiagnostics.sqlErrorDecorationRange (cognitive 18) apps/desktop/src/lib/sql/sqlDiagnostics.ts:160 — sqlDiagnostics.sqlErrorDecorationRange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSelectionCase.convertSqlSelectionCase (cognitive 18) · ×1
  • sqlSelectionCase.convertSqlSelectionCase (cognitive 18) apps/desktop/src/lib/sql/sqlSelectionCase.ts:14 — sqlSelectionCase.convertSqlSelectionCase has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 2 (nesting depth added 2). Of this number, 11 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlSourcePaste.parseSourceSqlLiterals (cognitive 18) · ×1
  • sqlSourcePaste.parseSourceSqlLiterals (cognitive 18) apps/desktop/src/lib/sql/sqlSourcePaste.ts:286 — sqlSourcePaste.parseSourceSqlLiterals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlVariableSyntax.updateSqlVariableSyntaxToggle (cognitive 18) · ×1
  • sqlVariableSyntax.updateSqlVariableSyntaxToggle (cognitive 18) apps/desktop/src/lib/sql/sqlVariableSyntax.ts:151 — sqlVariableSyntax.updateSqlVariableSyntaxToggle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · objectBrowserRowAction.doubleClickRowAction (cognitive 18) · ×1
  • objectBrowserRowAction.doubleClickRowAction (cognitive 18) apps/desktop/src/lib/table/objectBrowserRowAction.ts:37 — objectBrowserRowAction.doubleClickRowAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.validateDraftRelations (cognitive 18) · ×1
  • oracleTableRename.validateDraftRelations (cognitive 18) REDACTED:344 — oracleTableRename.validateDraftRelations has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 7, if/else 1, loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (normalize, a function literal at line 415, a function literal at line 354, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · oracleTypeDataMapping.executeOracleTypeDataInsert (cognitive 18) · ×1
  • oracleTypeDataMapping.executeOracleTypeDataInsert (cognitive 18) apps/desktop/src/lib/table/oracleTypeDataMapping.ts:82 — oracleTypeDataMapping.executeOracleTypeDataInsert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 3. Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.jdbcRoutineParameterType (cognitive 18) · ×1
  • routineParameters.jdbcRoutineParameterType (cognitive 18) apps/desktop/src/lib/table/routineParameters.ts:185 — routineParameters.jdbcRoutineParameterType has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routineParameters.xuguFunctionReturnType (cognitive 18) · ×1
  • routineParameters.xuguFunctionReturnType (cognitive 18) apps/desktop/src/lib/table/routineParameters.ts:401 — routineParameters.xuguFunctionReturnType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableStructureEditorState.specialIndexColumnIssue (cognitive 18) · ×1
  • tableStructureEditorState.specialIndexColumnIssue (cognitive 18) apps/desktop/src/lib/table/tableStructureEditorState.ts:1413 — tableStructureEditorState.specialIndexColumnIssue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.clearLoadedChildrenCache (cognitive 18) · ×1
  • connectionStore.useConnectionStore.clearLoadedChildrenCache (cognitive 18) apps/desktop/src/stores/connectionStore.ts:4236 — connectionStore.useConnectionStore.clearLoadedChildrenCache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.readPublic (cognitive 18) · ×1
  • plDebugStore.usePlDebugStore.readPublic (cognitive 18) apps/desktop/src/stores/plDebugStore.ts:555 — plDebugStore.usePlDebugStore.readPublic has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 2. Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.closeResultSession (cognitive 18) · ×1
  • queryStore.useQueryStore.closeResultSession (cognitive 18) apps/desktop/src/stores/queryStore.ts:1870 — queryStore.useQueryStore.closeResultSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · queryStore.useQueryStore.revalidateObjectSourceTab (cognitive 18) · ×1
  • queryStore.useQueryStore.revalidateObjectSourceTab (cognitive 18) apps/desktop/src/stores/queryStore.ts:3361 — queryStore.useQueryStore.revalidateObjectSourceTab has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.loadObjectSourceIntoTab (cognitive 18) · ×1
  • queryStore.useQueryStore.loadObjectSourceIntoTab (cognitive 18) apps/desktop/src/stores/queryStore.ts:3495 — queryStore.useQueryStore.loadObjectSourceIntoTab has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 4, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.resolveQueryDisplayMetadata (cognitive 18) · ×1
  • queryStore.useQueryStore.resolveQueryDisplayMetadata (cognitive 18) apps/desktop/src/stores/queryStore.ts:7608 — queryStore.useQueryStore.resolveQueryDisplayMetadata has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, error handling 1, ternaries 1. Of this number, 12 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.moveFolderToFolder (cognitive 18) · ×1
  • savedSqlStore.useSavedSqlStore.moveFolderToFolder (cognitive 18) apps/desktop/src/stores/savedSqlStore.ts:1001 — savedSqlStore.useSavedSqlStore.moveFolderToFolder has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 3. Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1016, 1010, 1011). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.moveFolderToFolder (cognitive 18) · ×1
  • transferTaskStore.useTransferTaskStore.moveFolderToFolder (cognitive 18) apps/desktop/src/stores/transferTaskStore.ts:400 — transferTaskStore.useTransferTaskStore.moveFolderToFolder has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 3. Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 418, 409, 413). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · json.quoteUnquotedObjectKeys (cognitive 18) · ×1
  • json.quoteUnquotedObjectKeys (cognitive 18) packages/mongo-shell/src/json.ts:457 — json.quoteUnquotedObjectKeys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NacosAdminConfig · ×1
  • NacosAdminConfig::validate (cognitive 17) crates/dbx-core/src/admin/nacos/config.rs:208 — NacosAdminConfig::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BackupSchedule · ×1
  • BackupSchedule::next_after (cognitive 17) crates/dbx-core/src/scheduled_backup/models.rs:207 — BackupSchedule::next_after has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.filterMetadataNodes (cognitive 17) · ×1
  • DbxJdbcPlugin.filterMetadataNodes (cognitive 17) REDACTED:3788 — DbxJdbcPlugin.filterMetadataNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.getDictionaryFirstObjectSource (cognitive 17) · ×1
  • OceanBaseOracleAgent.getDictionaryFirstObjectSource (cognitive 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1450 — OceanBaseOracleAgent.getDictionaryFirstObjectSource has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugResultCache.text (cognitive 17) · ×1
  • PlDebugResultCache.text (cognitive 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugResultCache.java:39 — PlDebugResultCache.text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.runToTermination (cognitive 17) · ×1
  • PlDebugSession.runToTermination (cognitive 17) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1476 — PlDebugSession.runToTermination has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractJdbcAgent.finishPooledRequest (cognitive 17) · ×1
  • AbstractJdbcAgent.finishPooledRequest (cognitive 17) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:421 — AbstractJdbcAgent.finishPooledRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · JsonRpcServer.validateTypedDebugWire (cognitive 17) · ×1
  • JsonRpcServer.validateTypedDebugWire (cognitive 17) agents/common/src/main/java/com/dbx/agent/JsonRpcServer.java:101 — JsonRpcServer.validateTypedDebugWire has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate_agents.validate_manifest_fields (cognitive 17) · ×1
  • validate_agents.validate_manifest_fields (cognitive 17) agents/scripts/validate_agents.py:150 — validate_agents.validate_manifest_fields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cognitive 17) · ×1
  • queryEditorSqlExtensions.configureQueryEditorSqlExtensions (cognitive 17) apps/desktop/src/components/editor/queryEditorSqlExtensions.ts:62 — queryEditorSqlExtensions.configureQueryEditorSqlExtensions has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useAppUpdater.useAppUpdater.initialize (cognitive 17) · ×1
  • useAppUpdater.useAppUpdater.initialize (cognitive 17) apps/desktop/src/composables/useAppUpdater.ts:451 — useAppUpdater.useAppUpdater.initialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useCellDetailEditor.useCellDetailEditor (cognitive 17) · ×1
  • useCellDetailEditor.useCellDetailEditor (cognitive 17) apps/desktop/src/composables/useCellDetailEditor.ts:83 — useCellDetailEditor.useCellDetailEditor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 194, 212, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataCompareConfig.sanitizeConfig (cognitive 17) · ×1
  • useDataCompareConfig.sanitizeConfig (cognitive 17) apps/desktop/src/composables/useDataCompareConfig.ts:67 — useDataCompareConfig.sanitizeConfig has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 12, boolean chains 3, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGenerateSession.cloneColumn (cognitive 17) · ×1
  • useDataGenerateSession.cloneColumn (cognitive 17) apps/desktop/src/composables/useDataGenerateSession.ts:99 — useDataGenerateSession.cloneColumn has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridConditionEditor.useDataGridConditionEditor.defaultSuggestions (cognitive 17) · ×1
  • useDataGridConditionEditor.useDataGridConditionEditor.defaultSuggestions (cognitive 17) REDACTED:524 — useDataGridConditionEditor.useDataGridConditionEditor.defaultSuggestions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cognitive 17) · ×1
  • useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad (cognitive 17) apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:140 — useDataGridDistinctValueLoader.useDataGridDistinctValueLoader.performLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.restoreCellValue (cognitive 17) · ×1
  • useDataGridEditor.useDataGridEditor.restoreCellValue (cognitive 17) apps/desktop/src/composables/useDataGridEditor.ts:1351 — useDataGridEditor.useDataGridEditor.restoreCellValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cognitive 17) · ×1
  • useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder (cognitive 17) apps/desktop/src/composables/useDataGridSelection.ts:264 — useDataGridSelection.useDataGridSelection.reconcileSelectionAfterColumnReorder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useOceanbaseCloneDialog.useOceanbaseCloneDialog.request (cognitive 17) · ×1
  • useOceanbaseCloneDialog.useOceanbaseCloneDialog.request (cognitive 17) apps/desktop/src/composables/useOceanbaseCloneDialog.ts:46 — useOceanbaseCloneDialog.useOceanbaseCloneDialog.request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeSnapshot.applySnapshotSqlTableColors (cognitive 17) · ×1
  • codeSnapshot.applySnapshotSqlTableColors (cognitive 17) apps/desktop/src/lib/codeSnapshot/codeSnapshot.ts:238 — codeSnapshot.applySnapshotSqlTableColors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (wrapRanges, a function literal at line 285). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · connectionDeepLink.serviceEndpoint (cognitive 17) · ×1
  • connectionDeepLink.serviceEndpoint (cognitive 17) REDACTED:202 — connectionDeepLink.serviceEndpoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionDeepLink.parseConnectionDeepLink (cognitive 17) · ×1
  • connectionDeepLink.parseConnectionDeepLink (cognitive 17) REDACTED:274 — connectionDeepLink.parseConnectionDeepLink has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, ternaries 4, error handling 2 (3 pts) (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionUrl.parseJdbcOracleUrl (cognitive 17) · ×1
  • connectionUrl.parseJdbcOracleUrl (cognitive 17) REDACTED:501 — connectionUrl.parseJdbcOracleUrl has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrlBuilder.buildStandardUrl (cognitive 17) · ×1
  • connectionUrlBuilder.buildStandardUrl (cognitive 17) apps/desktop/src/lib/connection/connectionUrlBuilder.ts:284 — connectionUrlBuilder.buildStandardUrl has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 3, if/else 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · elasticsearchKibanaProxy.buildElasticsearchExternalConfig (cognitive 17) · ×1
  • elasticsearchKibanaProxy.buildElasticsearchExternalConfig (cognitive 17) apps/desktop/src/lib/connection/elasticsearchKibanaProxy.ts:72 — elasticsearchKibanaProxy.buildElasticsearchExternalConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sessionModel.normalizeConsulSession (cognitive 17) · ×1
  • sessionModel.normalizeConsulSession (cognitive 17) apps/desktop/src/lib/consul/sessionModel.ts:5 — sessionModel.normalizeConsulSession has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 4 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · chartData.buildQueryChartOption (cognitive 17) · ×1
  • chartData.buildQueryChartOption (cognitive 17) apps/desktop/src/lib/dataGrid/chartData.ts:38 — chartData.buildQueryChartOption has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGenerate.formatGeneratedValue (cognitive 17) · ×1
  • dataGenerate.formatGeneratedValue (cognitive 17) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1799 — dataGenerate.formatGeneratedValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridReplace.prepareDataGridCellReplacements (cognitive 17) · ×1
  • dataGridReplace.prepareDataGridCellReplacements (cognitive 17) apps/desktop/src/lib/dataGrid/dataGridReplace.ts:53 — dataGridReplace.prepareDataGridCellReplacements has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createDatabaseCharsetOptions.parseCreateDatabaseCharsetMetadata (cognitive 17) · ×1
  • createDatabaseCharsetOptions.parseCreateDatabaseCharsetMetadata (cognitive 17) apps/desktop/src/lib/database/createDatabaseCharsetOptions.ts:68 — createDatabaseCharsetOptions.parseCreateDatabaseCharsetMetadata has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 2, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleForeignKeys.parseOracleCanonicalType (cognitive 17) · ×1
  • oracleForeignKeys.parseOracleCanonicalType (cognitive 17) apps/desktop/src/lib/database/oracleForeignKeys.ts:392 — oracleForeignKeys.parseOracleCanonicalType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · oracleTriggerPlan.candidateBinding (cognitive 17) · ×1
  • oracleTriggerPlan.candidateBinding (cognitive 17) apps/desktop/src/lib/database/oracleTriggerPlan.ts:611 — oracleTriggerPlan.candidateBinding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTriggerPlan.verifyBinding (cognitive 17) · ×1
  • oracleTriggerPlan.verifyBinding (cognitive 17) apps/desktop/src/lib/database/oracleTriggerPlan.ts:642 — oracleTriggerPlan.verifyBinding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sqlExecutionTargetCapabilities.sqlExecutionTargetCapabilities (cognitive 17) · ×1
  • sqlExecutionTargetCapabilities.sqlExecutionTargetCapabilities (cognitive 17) apps/desktop/src/lib/database/sqlExecutionTargetCapabilities.ts:43 — sqlExecutionTargetCapabilities.sqlExecutionTargetCapabilities has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 7, if/else 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · explainPlan.oraclePredicateDetails (cognitive 17) · ×1
  • explainPlan.oraclePredicateDetails (cognitive 17) apps/desktop/src/lib/diagram/explainPlan.ts:266 — explainPlan.oraclePredicateDetails has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codemirrorPlDebugEditor.createPlDebugEditorExtension (cognitive 17) · ×1
  • codemirrorPlDebugEditor.createPlDebugEditorExtension (cognitive 17) apps/desktop/src/lib/editor/codemirrorPlDebugEditor.ts:140 — codemirrorPlDebugEditor.createPlDebugEditorExtension has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 143). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · keyboardShortcuts.eventToShortcut (cognitive 17) · ×1
  • keyboardShortcuts.eventToShortcut (cognitive 17) apps/desktop/src/lib/editor/keyboardShortcuts.ts:94 — keyboardShortcuts.eventToShortcut has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.normalizeTokens (cognitive 17) · ×1
  • sqlSemanticSelectionRanges.normalizeTokens (cognitive 17) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:82 — sqlSemanticSelectionRanges.normalizeTokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · databaseExportOptions.loadSavedDatabaseExportOptions (cognitive 17) · ×1
  • databaseExportOptions.loadSavedDatabaseExportOptions (cognitive 17) apps/desktop/src/lib/export/databaseExportOptions.ts:36 — databaseExportOptions.loadSavedDatabaseExportOptions has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11, if/else 3, boolean chains 2, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoDocumentValues.mongoTypedNumberInputValue (cognitive 17) · ×1
  • mongoDocumentValues.mongoTypedNumberInputValue (cognitive 17) apps/desktop/src/lib/mongo/mongoDocumentValues.ts:422 — mongoDocumentValues.mongoTypedNumberInputValue has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nacosConfigValidation.closeImplicitHtmlTags (cognitive 17) · ×1
  • nacosConfigValidation.closeImplicitHtmlTags (cognitive 17) REDACTED:95 — nacosConfigValidation.closeImplicitHtmlTags has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PluginHostBridge.requestInit (cognitive 17) · ×1
  • PluginHostBridge.requestInit (cognitive 17) REDACTED:412 — PluginHostBridge.requestInit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHostBridge.publishAiRecommendations (cognitive 17) · ×1
  • PluginHostBridge.publishAiRecommendations (cognitive 17) REDACTED:558 — PluginHostBridge.publishAiRecommendations has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 1, if/else 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · multiSourceResult.summarizeNumericColumns (cognitive 17) · ×1
  • multiSourceResult.summarizeNumericColumns (cognitive 17) apps/desktop/src/lib/query/multiSourceResult.ts:105 — multiSourceResult.summarizeNumericColumns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · msgpack.toJsonable (cognitive 17) · ×1
  • msgpack.toJsonable (cognitive 17) apps/desktop/src/lib/redis/codec/msgpack.ts:21 — msgpack.toJsonable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · redisCompletion.argumentGrammar (cognitive 17) · ×1
  • redisCompletion.argumentGrammar (cognitive 17) apps/desktop/src/lib/redis/redisCompletion.ts:323 — redisCompletion.argumentGrammar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function items inside it that branch (compileContent, compileArgument, a function literal at line 334, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics (cognitive 17) · ×1
  • redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics (cognitive 17) apps/desktop/src/lib/redis/redisSyntaxDiagnostics.ts:42 — redisSyntaxDiagnostics.buildRedisSyntaxDiagnostics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlExecutionTarget.resolveSavedSqlExecutionTarget (cognitive 17) · ×1
  • savedSqlExecutionTarget.resolveSavedSqlExecutionTarget (cognitive 17) apps/desktop/src/lib/savedSql/savedSqlExecutionTarget.ts:35 — savedSqlExecutionTarget.resolveSavedSqlExecutionTarget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.normalizeSchemaDiffDependencyGraph (cognitive 17) · ×1
  • schemaDiff.normalizeSchemaDiffDependencyGraph (cognitive 17) apps/desktop/src/lib/schema/schemaDiff.ts:317 — schemaDiff.normalizeSchemaDiffDependencyGraph has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 2, if/else 2 (nesting depth added 4). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 322). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · customTypeTree.buildCustomTypeTreeChildren (cognitive 17) · ×1
  • customTypeTree.buildCustomTypeTreeChildren (cognitive 17) apps/desktop/src/lib/sidebar/customTypeTree.ts:21 — customTypeTree.buildCustomTypeTreeChildren has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 6). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 24, 46). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · soqlCompletion.valueItems (cognitive 17) · ×1
  • soqlCompletion.valueItems (cognitive 17) apps/desktop/src/lib/soql/soqlCompletion.ts:456 — soqlCompletion.valueItems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (addValues). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · insertValueHints.parseValuesRows (cognitive 17) · ×1
  • insertValueHints.parseValuesRows (cognitive 17) apps/desktop/src/lib/sql/insertValueHints.ts:158 — insertValueHints.parseValuesRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · references.mergeSqlSemanticReferenceAnalysis (cognitive 17) · ×1
  • references.mergeSqlSemanticReferenceAnalysis (cognitive 17) apps/desktop/src/lib/sql/semantic/references.ts:92 — references.mergeSqlSemanticReferenceAnalysis has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (nesting depth added 5). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 102). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sqlCompletion.detectCompletionContextKind (cognitive 17) · ×1
  • sqlCompletion.detectCompletionContextKind (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:3276 — sqlCompletion.detectCompletionContextKind has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sqlCompletion.buildAliasCandidates (cognitive 17) · ×1
  • sqlCompletion.buildAliasCandidates (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:5755 — sqlCompletion.buildAliasCandidates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3 (nesting depth added 6). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.findActiveFunctionOpenParen (cognitive 17) · ×1
  • sqlCompletion.findActiveFunctionOpenParen (cognitive 17) apps/desktop/src/lib/sql/sqlCompletion.ts:7023 — sqlCompletion.findActiveFunctionOpenParen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.splitCommaSeparatedValues (cognitive 17) · ×1
  • sqlParameters.splitCommaSeparatedValues (cognitive 17) apps/desktop/src/lib/sql/sqlParameters.ts:311 — sqlParameters.splitCommaSeparatedValues has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlParameters.readSubstitutionParameterOccurrence (cognitive 17) · ×1
  • sqlParameters.readSubstitutionParameterOccurrence (cognitive 17) apps/desktop/src/lib/sql/sqlParameters.ts:1801 — sqlParameters.readSubstitutionParameterOccurrence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 4, loops 2 (4 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sqlFormatter.keepFromClauseAndFirstSourceOnSameLine (cognitive 17) · ×1
  • sqlFormatter.keepFromClauseAndFirstSourceOnSameLine (cognitive 17) apps/desktop/src/lib/sql/sqlFormatter.ts:831 — sqlFormatter.keepFromClauseAndFirstSourceOnSameLine has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlNavigation.matchSqlObject (cognitive 17) · ×1
  • sqlNavigation.matchSqlObject (cognitive 17) apps/desktop/src/lib/sql/sqlNavigation.ts:729 — sqlNavigation.matchSqlObject has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts) (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · objectBrowserRows.buildObjectBrowserRows (cognitive 17) · ×1
  • objectBrowserRows.buildObjectBrowserRows (cognitive 17) apps/desktop/src/lib/table/objectBrowserRows.ts:169 — objectBrowserRows.buildObjectBrowserRows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (10 pts), boolean chains 5, if/else 2 (nesting depth added 1). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 171). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · objectRenameSql.supportsObjectRename (cognitive 17) · ×1
  • objectRenameSql.supportsObjectRename (cognitive 17) apps/desktop/src/lib/table/objectRenameSql.ts:19 — objectRenameSql.supportsObjectRename has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · postgresDataTypeHelp.gaussdbMTypeDisplayName (cognitive 17) · ×1
  • postgresDataTypeHelp.gaussdbMTypeDisplayName (cognitive 17) apps/desktop/src/lib/table/postgresDataTypeHelp.ts:164 — postgresDataTypeHelp.gaussdbMTypeDisplayName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · starrocksPhysicalOptions.buildStarRocksDialectOptions (cognitive 17) · ×1
  • starrocksPhysicalOptions.buildStarRocksDialectOptions (cognitive 17) apps/desktop/src/lib/table/starrocksPhysicalOptions.ts:76 — starrocksPhysicalOptions.buildStarRocksDialectOptions has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 3, if/else 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableTree.buildPrefixSortIndex (cognitive 17) · ×1
  • tableTree.buildPrefixSortIndex (cognitive 17) apps/desktop/src/lib/table/tableTree.ts:156 — tableTree.buildPrefixSortIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (resolve). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · tableVGroup.findTableVGroupHostContainer · ×1
  • tableVGroup.findTableVGroupHostContainer::walk (cognitive 17) apps/desktop/src/lib/table/tableVGroup.ts:746 — tableVGroup.findTableVGroupHostContainer::walk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabColorStyle (cognitive 17) · ×1
  • tabPresentation.tabColorStyle (cognitive 17) apps/desktop/src/lib/tabs/tabPresentation.ts:866 — tabPresentation.tabColorStyle has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cognitive 17) · ×1
  • connectionStore.useConnectionStore.buildSidebarTableSearchIndex (cognitive 17) apps/desktop/src/stores/connectionStore.ts:3971 — connectionStore.useConnectionStore.buildSidebarTableSearchIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3, boolean chains 2, loops 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cognitive 17) · ×1
  • connectionStore.useConnectionStore.reloadConnectionDatabaseChildren (cognitive 17) apps/desktop/src/stores/connectionStore.ts:5076 — connectionStore.useConnectionStore.reloadConnectionDatabaseChildren has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.invalidateCompletionTableCache (cognitive 17) · ×1
  • connectionStore.useConnectionStore.invalidateCompletionTableCache (cognitive 17) apps/desktop/src/stores/connectionStore.ts:8925 — connectionStore.useConnectionStore.invalidateCompletionTableCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (7 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.textMatchScore (cognitive 17) · ×1
  • connectionStore.useConnectionStore.textMatchScore (cognitive 17) apps/desktop/src/stores/connectionStore.ts:9379 — connectionStore.useConnectionStore.textMatchScore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plDebugStore.usePlDebugStore.refreshStack (cognitive 17) · ×1
  • plDebugStore.usePlDebugStore.refreshStack (cognitive 17) apps/desktop/src/stores/plDebugStore.ts:1599 — plDebugStore.usePlDebugStore.refreshStack has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.reorderFolders (cognitive 17) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFolders (cognitive 17) apps/desktop/src/stores/savedSqlStore.ts:955 — savedSqlStore.useSavedSqlStore.reorderFolders has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 2. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 982, 978, 964). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · settingsStore.useSettingsStore.deleteCustomColumnFormatter (cognitive 17) · ×1
  • settingsStore.useSettingsStore.deleteCustomColumnFormatter (cognitive 17) apps/desktop/src/stores/settingsStore.ts:3438 — settingsStore.useSettingsStore.deleteCustomColumnFormatter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 7). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 3439, 3450, 3455). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferTaskStore.normalizePackageDrafts (cognitive 17) · ×1
  • transferTaskStore.normalizePackageDrafts (cognitive 17) apps/desktop/src/stores/transferTaskStore.ts:79 — transferTaskStore.normalizePackageDrafts has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 4, if/else 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.reorderFolders (cognitive 17) · ×1
  • transferTaskStore.useTransferTaskStore.reorderFolders (cognitive 17) apps/desktop/src/stores/transferTaskStore.ts:422 — transferTaskStore.useTransferTaskStore.reorderFolders has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 2. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 445, 441, 431). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Diagnostics.query (cognitive 17) · ×1
  • Diagnostics.query (cognitive 17) plugins/sdk/dev-host/diagnostics.mjs:70 — Diagnostics.query has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 2, loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · pushMedia (cognitive 17) · ×1
  • pushMedia (cognitive 17) .github/ui-preview/publish.mjs:93 — pushMedia has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (7 pts), loops 3 (5 pts), if/else 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redact · ×1
  • redact::visit (cognitive 17) plugins/sdk/dev-host/diagnostics.mjs:9 — redact::visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · StreamingToolCallAccumulator · ×1
  • StreamingToolCallAccumulator::process (cognitive 16) crates/dbx-ai-provider/src/ai.rs:4333 — StreamingToolCallAccumulator::process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Nb3ExportWriter · ×1
  • Nb3ExportWriter::handle_statement (cognitive 16) REDACTED:1396 — Nb3ExportWriter::handle_statement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHost · ×1
  • PluginHost::watch_session (cognitive 16) crates/dbx-plugin-runtime/src/plugins/host.rs:262 — PluginHost::watch_session has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PluginServer · ×1
  • PluginServer::serve_framed (cognitive 16) plugins/sdk/rust/dbx-plugin-sdk/src/lib.rs:503 — PluginServer::serve_framed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DbxJdbcPlugin.getColumns (cognitive 16) · ×1
  • DbxJdbcPlugin.getColumns (cognitive 16) REDACTED:3589 — DbxJdbcPlugin.getColumns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DbxJdbcPlugin.postgresDatabaseUrl (cognitive 16) · ×1
  • DbxJdbcPlugin.postgresDatabaseUrl (cognitive 16) REDACTED:4952 — DbxJdbcPlugin.postgresDatabaseUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DbxJdbcPlugin.serve (cognitive 16) · ×1
  • DbxJdbcPlugin.serve (cognitive 16) REDACTED:369 — DbxJdbcPlugin.serve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.getTableDdl (cognitive 16) · ×1
  • OceanBaseOracleAgent.getTableDdl (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1796 — OceanBaseOracleAgent.getTableDdl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 3, error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanBaseOracleAgent.listForeignKeys (cognitive 16) · ×1
  • OceanBaseOracleAgent.listForeignKeys (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2135 — OceanBaseOracleAgent.listForeignKeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugBreakpointRegistry.mutate (cognitive 16) · ×1
  • PlDebugBreakpointRegistry.mutate (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugBreakpointRegistry.java:168 — PlDebugBreakpointRegistry.mutate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlDebugCompositeInput.nationalChunks (cognitive 16) · ×1
  • PlDebugCompositeInput.nationalChunks (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugCompositeInput.java:456 — PlDebugCompositeInput.nationalChunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scope.cleanup (cognitive 16) · ×1
  • Scope.cleanup (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugMetadataInspection.java:89 — Scope.cleanup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugResultCache.page (cognitive 16) · ×1
  • PlDebugResultCache.page (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugResultCache.java:129 — PlDebugResultCache.page has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlDebugSession.stack (cognitive 16) · ×1
  • PlDebugSession.stack (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugSession.java:1837 — PlDebugSession.stack has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plan.slots (cognitive 16) · ×1
  • Plan.slots (cognitive 16) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:240 — Plan.slots has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuntimeServer.handleRuntimeRequest (cognitive 16) · ×1
  • RuntimeServer.handleRuntimeRequest (cognitive 16) REDACTED:2777 — RuntimeServer.handleRuntimeRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KafkaAgent.collectLatestPeekRange (cognitive 16) · ×1
  • KafkaAgent.collectLatestPeekRange (cognitive 16) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1997 — KafkaAgent.collectLatestPeekRange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KafkaAgent.collectLatestPeekedMessages (cognitive 16) · ×1
  • KafkaAgent.collectLatestPeekedMessages (cognitive 16) agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:1921 — KafkaAgent.collectLatestPeekedMessages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · H2Agent.getTableDdl (cognitive 16) · ×1
  • H2Agent.getTableDdl (cognitive 16) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:353 — H2Agent.getTableDdl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Gbase8sAgent.loadColumnDefaultsFromSource (cognitive 16) · ×1
  • Gbase8sAgent.loadColumnDefaultsFromSource (cognitive 16) REDACTED:702 — Gbase8sAgent.loadColumnDefaultsFromSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlobBoundExecutor.executeAll (cognitive 16) · ×1
  • BlobBoundExecutor.executeAll (cognitive 16) agents/common/src/main/java/com/dbx/agent/BlobBoundExecutor.java:131 — BlobBoundExecutor.executeAll has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), loops 3 (5 pts), if/else 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DedicatedOwner.closeUnreturnedConnectionsUntil (cognitive 16) · ×1
  • DedicatedOwner.closeUnreturnedConnectionsUntil (cognitive 16) agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:389 — DedicatedOwner.closeUnreturnedConnectionsUntil has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build_offline_jdbc_payload.validateAndCopyBundle (cognitive 16) · ×1
  • build_offline_jdbc_payload.validateAndCopyBundle (cognitive 16) agents/scripts/build_offline_jdbc_payload.mjs:75 — build_offline_jdbc_payload.validateAndCopyBundle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · verify_offline_jdbc_release.validatePayload (cognitive 16) · ×1
  • verify_offline_jdbc_release.validatePayload (cognitive 16) agents/scripts/verify_offline_jdbc_release.mjs:41 — verify_offline_jdbc_release.validatePayload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.enrichSemanticDiagnosticTables (cognitive 16) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.enrichSemanticDiagnosticTables (cognitive 16) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:280 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.enrichSemanticDiagnosticTables has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorDiagnostics.useQueryEditorDiagnostics.ensureColumnsForSemanticDiagnostics (cognitive 16) · ×1
  • useQueryEditorDiagnostics.useQueryEditorDiagnostics.ensureColumnsForSemanticDiagnostics (cognitive 16) apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts:305 — useQueryEditorDiagnostics.useQueryEditorDiagnostics.ensureColumnsForSemanticDiagnostics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cognitive 16) · ×1
  • useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace (cognitive 16) apps/desktop/src/components/editor/useQueryEditorCompletionKeys.ts:177 — useQueryEditorCompletionKeys.useQueryEditorCompletionKeys.acceptSqlServerCompletionOnSpace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryResultTransferValues.normalizeSourceType (cognitive 16) · ×1
  • queryResultTransferValues.normalizeSourceType (cognitive 16) apps/desktop/src/components/transfer/queryResultTransferValues.ts:21 — queryResultTransferValues.normalizeSourceType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useBackgroundImage.useBackgroundImage (cognitive 16) · ×1
  • useBackgroundImage.useBackgroundImage (cognitive 16) apps/desktop/src/composables/useBackgroundImage.ts:30 — useBackgroundImage.useBackgroundImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, error handling 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 102, 45, 98). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridColumnLayout.useDataGridColumnLayout.onColumnHeaderPointerMove (cognitive 16) · ×1
  • useDataGridColumnLayout.useDataGridColumnLayout.onColumnHeaderPointerMove (cognitive 16) apps/desktop/src/composables/useDataGridColumnLayout.ts:846 — useDataGridColumnLayout.useDataGridColumnLayout.onColumnHeaderPointerMove has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.applyQueuedAutoSaveChanges (cognitive 16) · ×1
  • useDataGridEditor.useDataGridEditor.applyQueuedAutoSaveChanges (cognitive 16) apps/desktop/src/composables/useDataGridEditor.ts:1027 — useDataGridEditor.useDataGridEditor.applyQueuedAutoSaveChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.prepareAddedRows (cognitive 16) · ×1
  • useDataGridEditor.useDataGridEditor.prepareAddedRows (cognitive 16) apps/desktop/src/composables/useDataGridEditor.ts:1472 — useDataGridEditor.useDataGridEditor.prepareAddedRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cognitive 16) · ×1
  • useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave (cognitive 16) apps/desktop/src/composables/useDataGridEditor.ts:2039 — useDataGridEditor.useDataGridEditor.clearPersistedPendingChangesForSave has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cognitive 16) · ×1
  • useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback (cognitive 16) apps/desktop/src/composables/useDataGridExport.ts:2121 — useDataGridExport.useDataGridExport.exportResultSheetsXlsxFallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 2, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 2125, 2146, 2159). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridLargeValues.useDataGridLargeValues.hydrateLargeValueCell (cognitive 16) · ×1
  • useDataGridLargeValues.useDataGridLargeValues.hydrateLargeValueCell (cognitive 16) apps/desktop/src/composables/useDataGridLargeValues.ts:650 — useDataGridLargeValues.useDataGridLargeValues.hydrateLargeValueCell has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 658). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useDataGridSearch.useDataGridSearch.matchState (cognitive 16) · ×1
  • useDataGridSearch.useDataGridSearch.matchState (cognitive 16) apps/desktop/src/composables/useDataGridSearch.ts:55 — useDataGridSearch.useDataGridSearch.matchState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 80, includes, a function literal at line 75). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useNativeJobExecution.useNativeJobExecution.prepare (cognitive 16) · ×1
  • useNativeJobExecution.useNativeJobExecution.prepare (cognitive 16) apps/desktop/src/composables/useNativeJobExecution.ts:78 — useNativeJobExecution.useNativeJobExecution.prepare has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cognitive 16) · ×1
  • useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation (cognitive 16) apps/desktop/src/composables/useSidebarTableMutationRuntime.ts:459 — useSidebarTableMutationRuntime.useSidebarTableMutationRuntime.runDangerOperation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataXlsx (cognitive 16) · ×1
  • useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataXlsx (cognitive 16) apps/desktop/src/composables/useSidebarTreeExportRuntime.ts:969 — useSidebarTreeExportRuntime.useSidebarTreeExportRuntime.exportDataXlsx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 1 (2 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useSqlExecution.isDangerousSql (cognitive 16) · ×1
  • useSqlExecution.isDangerousSql (cognitive 16) apps/desktop/src/composables/useSqlExecution.ts:127 — useSqlExecution.isDangerousSql has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 133). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSqlExecution.useSqlExecution.tryExecute (cognitive 16) · ×1
  • useSqlExecution.useSqlExecution.tryExecute (cognitive 16) apps/desktop/src/composables/useSqlExecution.ts:299 — useSqlExecution.useSqlExecution.tryExecute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · aiSqlTargetTab.resolveAiSqlTargetTabId (cognitive 16) · ×1
  • aiSqlTargetTab.resolveAiSqlTargetTabId (cognitive 16) apps/desktop/src/lib/ai/aiSqlTargetTab.ts:31 — aiSqlTargetTab.resolveAiSqlTargetTabId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7 (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · errorUtils.jsonObjectEnd (cognitive 16) · ×1
  • errorUtils.jsonObjectEnd (cognitive 16) apps/desktop/src/lib/backend/errorUtils.ts:66 — errorUtils.jsonObjectEnd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scheduledDatabaseBackup.normalizeDatabaseBackupRun (cognitive 16) · ×1
  • scheduledDatabaseBackup.normalizeDatabaseBackupRun (cognitive 16) REDACTED:380 — scheduledDatabaseBackup.normalizeDatabaseBackupRun has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 6, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · safeJsonFormat.diffText (cognitive 16) · ×1
  • safeJsonFormat.diffText (cognitive 16) apps/desktop/src/lib/common/safeJsonFormat.ts:245 — safeJsonFormat.diffText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionUrl.parseZooKeeperUrl (cognitive 16) · ×1
  • connectionUrl.parseZooKeeperUrl (cognitive 16) REDACTED:239 — connectionUrl.parseZooKeeperUrl has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 4, if/else 3, error handling 1. Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionUrl.parseJdbcDremioUrl (cognitive 16) · ×1
  • connectionUrl.parseJdbcDremioUrl (cognitive 16) REDACTED:637 — connectionUrl.parseJdbcDremioUrl has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridColumnFilter.parseFilterValue (cognitive 16) · ×1
  • dataGridColumnFilter.parseFilterValue (cognitive 16) apps/desktop/src/lib/dataGrid/dataGridColumnFilter.ts:200 — dataGridColumnFilter.parseFilterValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dataGridReplace.findDataGridReplacementMatches (cognitive 16) · ×1
  • dataGridReplace.findDataGridReplacementMatches (cognitive 16) apps/desktop/src/lib/dataGrid/dataGridReplace.ts:36 — dataGridReplace.findDataGridReplacementMatches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · databaseUserAdmin.splitMySqlIdentifierPath (cognitive 16) · ×1
  • databaseUserAdmin.splitMySqlIdentifierPath (cognitive 16) apps/desktop/src/lib/database/databaseUserAdmin.ts:778 — databaseUserAdmin.splitMySqlIdentifierPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jdbcDialect.connectionObjectTreeNodeSchema (cognitive 16) · ×1
  • jdbcDialect.connectionObjectTreeNodeSchema (cognitive 16) apps/desktop/src/lib/database/jdbcDialect.ts:385 — jdbcDialect.connectionObjectTreeNodeSchema has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · oracleSecurity.readDictionary (cognitive 16) · ×1
  • oracleSecurity.readDictionary (cognitive 16) apps/desktop/src/lib/database/oracleSecurity.ts:106 — oracleSecurity.readDictionary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (5 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleSessionDiagnostics.captureOracleDiagnosticTarget (cognitive 16) · ×1
  • oracleSessionDiagnostics.captureOracleDiagnosticTarget (cognitive 16) apps/desktop/src/lib/database/oracleSessionDiagnostics.ts:93 — oracleSessionDiagnostics.captureOracleDiagnosticTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · elk-layout.computeLayoutWithLayers (cognitive 16) · ×1
  • elk-layout.computeLayoutWithLayers (cognitive 16) apps/desktop/src/lib/diagram/elk-layout.ts:71 — elk-layout.computeLayoutWithLayers has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · elk-layout.extractLayoutResult (cognitive 16) · ×1
  • elk-layout.extractLayoutResult (cognitive 16) apps/desktop/src/lib/diagram/elk-layout.ts:265 — elk-layout.extractLayoutResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryEditorTextEdits.blankLineDeletionChanges (cognitive 16) · ×1
  • queryEditorTextEdits.blankLineDeletionChanges (cognitive 16) apps/desktop/src/lib/editor/queryEditorTextEdits.ts:22 — queryEditorTextEdits.blankLineDeletionChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), ternaries 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlSemanticSelectionRanges.collectExpressionRanges (cognitive 16) · ×1
  • sqlSemanticSelectionRanges.collectExpressionRanges (cognitive 16) apps/desktop/src/lib/editor/sqlSemanticSelectionRanges.ts:305 — sqlSemanticSelectionRanges.collectExpressionRanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datagripImport.inferProfile (cognitive 16) · ×1
  • datagripImport.inferProfile (cognitive 16) REDACTED:302 — datagripImport.inferProfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · datagripImport.parseDataSourcesXml (cognitive 16) · ×1
  • datagripImport.parseDataSourcesXml (cognitive 16) REDACTED:386 — datagripImport.parseDataSourcesXml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kvValueFormat.detectKvValueFormat (cognitive 16) · ×1
  • kvValueFormat.detectKvValueFormat (cognitive 16) apps/desktop/src/lib/kv/kvValueFormat.ts:17 — kvValueFormat.detectKvValueFormat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mongoCompletion.classifyGroup (cognitive 16) · ×1
  • mongoCompletion.classifyGroup (cognitive 16) REDACTED:1610 — mongoCompletion.classifyGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mongoShellCommand.mongoFilterContainsOpaqueLogic (cognitive 16) · ×1
  • mongoShellCommand.mongoFilterContainsOpaqueLogic (cognitive 16) REDACTED:2006 — mongoShellCommand.mongoFilterContainsOpaqueLogic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (nesting depth added 3). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 2007). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mongoSql.groupStage (cognitive 16) · ×1
  • mongoSql.groupStage (cognitive 16) apps/desktop/src/lib/mongo/mongoSql.ts:762 — mongoSql.groupStage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontendPluginRegistry.listToolbarMenuCommands (cognitive 16) · ×1
  • FrontendPluginRegistry.listToolbarMenuCommands (cognitive 16) apps/desktop/src/lib/plugins/frontendPlugin.ts:104 — FrontendPluginRegistry.listToolbarMenuCommands has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pluginFloatingWindow.endFloatingWindowDrag (cognitive 16) · ×1
  • pluginFloatingWindow.endFloatingWindowDrag (cognitive 16) apps/desktop/src/lib/plugins/pluginFloatingWindow.ts:589 — pluginFloatingWindow.endFloatingWindowDrag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisValuePresentation.parseRedisJsonDetail (cognitive 16) · ×1
  • redisValuePresentation.parseRedisJsonDetail (cognitive 16) apps/desktop/src/lib/redis/redisValuePresentation.ts:347 — redisValuePresentation.parseRedisJsonDetail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (3 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandDocs.parseRedisCommandCatalog · ×1
  • redisCommandDocs.parseRedisCommandCatalog::collect (cognitive 16) apps/desktop/src/lib/redis/redisCommandDocs.ts:209 — redisCommandDocs.parseRedisCommandCatalog::collect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisCommandSafety.firstRedisCommandToken (cognitive 16) · ×1
  • redisCommandSafety.firstRedisCommandToken (cognitive 16) apps/desktop/src/lib/redis/redisCommandSafety.ts:251 — redisCommandSafety.firstRedisCommandToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · redisKeyTree.flattenVisibleRedisKeyTreeCooperatively (cognitive 16) · ×1
  • redisKeyTree.flattenVisibleRedisKeyTreeCooperatively (cognitive 16) apps/desktop/src/lib/redis/redisKeyTree.ts:270 — redisKeyTree.flattenVisibleRedisKeyTreeCooperatively has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cognitive 16) · ×1
  • oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation (cognitive 16) apps/desktop/src/lib/schema/oracleRoutineDeploy.ts:253 — oracleRoutineDeploy.acceptOracleRoutineDeploymentOperation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schemaDiff.buildDeploySqlForObjects (cognitive 16) · ×1
  • schemaDiff.buildDeploySqlForObjects (cognitive 16) apps/desktop/src/lib/schema/schemaDiff.ts:970 — schemaDiff.buildDeploySqlForObjects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarDatabaseStorage.applySidebarTableStorage (cognitive 16) · ×1
  • sidebarDatabaseStorage.applySidebarTableStorage (cognitive 16) apps/desktop/src/lib/sidebar/sidebarDatabaseStorage.ts:49 — sidebarDatabaseStorage.applySidebarTableStorage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, a function literal at line 51). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · sidebarLayoutMonitor.captureRows (cognitive 16) · ×1
  • sidebarLayoutMonitor.captureRows (cognitive 16) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:272 — sidebarLayoutMonitor.captureRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarLayoutMonitor.buildAnomalyDigest (cognitive 16) · ×1
  • sidebarLayoutMonitor.buildAnomalyDigest (cognitive 16) apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:576 — sidebarLayoutMonitor.buildAnomalyDigest has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarRemoteSearch.collectSidebarRemoteSearchResults · ×1
  • sidebarRemoteSearch.collectSidebarRemoteSearchResults::visit (cognitive 16) apps/desktop/src/lib/sidebar/sidebarRemoteSearch.ts:36 — sidebarRemoteSearch.collectSidebarRemoteSearchResults::visit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sidebarSearch.matchesWordPrefixConcatenation (cognitive 16) · ×1
  • sidebarSearch.matchesWordPrefixConcatenation (cognitive 16) apps/desktop/src/lib/sidebar/sidebarSearch.ts:106 — sidebarSearch.matchesWordPrefixConcatenation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarSearchTree.filterLocallySearchedTableNodes (cognitive 16) · ×1
  • sidebarSearchTree.filterLocallySearchedTableNodes (cognitive 16) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:99 — sidebarSearchTree.filterLocallySearchedTableNodes has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (7 pts), if/else 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 100, 110, 116, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sidebarSearchTree.filterSidebarTreeToConnectedConnections (cognitive 16) · ×1
  • sidebarSearchTree.filterSidebarTreeToConnectedConnections (cognitive 16) apps/desktop/src/lib/sidebar/sidebarSearchTree.ts:469 — sidebarSearchTree.filterSidebarTreeToConnectedConnections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarVisibleFilterSummary.sidebarVisibleFilterSummary (cognitive 16) · ×1
  • sidebarVisibleFilterSummary.sidebarVisibleFilterSummary (cognitive 16) apps/desktop/src/lib/sidebar/sidebarVisibleFilterSummary.ts:21 — sidebarVisibleFilterSummary.sidebarVisibleFilterSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 6, boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ddlDisplay.findColumnAttributePositions (cognitive 16) · ×1
  • ddlDisplay.findColumnAttributePositions (cognitive 16) apps/desktop/src/lib/sql/ddlDisplay.ts:427 — ddlDisplay.findColumnAttributePositions has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 2. Of this number, 12 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · completion.mutationTargetIntroducer (cognitive 16) · ×1
  • completion.mutationTargetIntroducer (cognitive 16) apps/desktop/src/lib/sql/semantic/completion.ts:298 — completion.mutationTargetIntroducer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlAnalysis.lastTopLevelWhitespaceStart (cognitive 16) · ×1
  • sqlAnalysis.lastTopLevelWhitespaceStart (cognitive 16) apps/desktop/src/lib/sql/sqlAnalysis.ts:550 — sqlAnalysis.lastTopLevelWhitespaceStart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.extractSubqueryReferences (cognitive 16) · ×1
  • sqlCompletion.extractSubqueryReferences (cognitive 16) apps/desktop/src/lib/sql/sqlCompletion.ts:4578 — sqlCompletion.extractSubqueryReferences has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlCompletion.findMatchingOpenParen (cognitive 16) · ×1
  • sqlCompletion.findMatchingOpenParen (cognitive 16) apps/desktop/src/lib/sql/sqlCompletion.ts:6992 — sqlCompletion.findMatchingOpenParen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sqlServerRoutineSyntaxDiagnostics.missingDeclareDataTypeTokens (cognitive 16) · ×1
  • sqlServerRoutineSyntaxDiagnostics.missingDeclareDataTypeTokens (cognitive 16) apps/desktop/src/lib/sql/sqlServerRoutineSyntaxDiagnostics.ts:57 — sqlServerRoutineSyntaxDiagnostics.missingDeclareDataTypeTokens has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineRename.readSource (cognitive 16) · ×1
  • oracleRoutineRename.readSource (cognitive 16) apps/desktop/src/lib/table/oracleRoutineRename.ts:110 — oracleRoutineRename.readSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleRoutineWrite.prepareOracleRoutineSourceSave · ×1
  • oracleRoutineWrite.prepareOracleRoutineSourceSave::execute (cognitive 16) apps/desktop/src/lib/table/oracleRoutineWrite.ts:106 — oracleRoutineWrite.prepareOracleRoutineSourceSave::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (oracleRoutineWrite.prepareOracleRoutineSourceSave) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · oracleTableRename.readSource (cognitive 16) · ×1
  • oracleTableRename.readSource (cognitive 16) REDACTED:124 — oracleTableRename.readSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleTableRename.orderDependents (cognitive 16) · ×1
  • oracleTableRename.orderDependents (cognitive 16) REDACTED:468 — oracleTableRename.orderDependents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · oracleViewRename.prepareOracleViewRename.walk (cognitive 16) · ×1
  • oracleViewRename.prepareOracleViewRename.walk (cognitive 16) apps/desktop/src/lib/table/oracleViewRename.ts:148 — oracleViewRename.prepareOracleViewRename.walk has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableColumnTemplates.mergeTableColumnTemplateFields (cognitive 16) · ×1
  • tableColumnTemplates.mergeTableColumnTemplateFields (cognitive 16) apps/desktop/src/lib/table/tableColumnTemplates.ts:76 — tableColumnTemplates.mergeTableColumnTemplateFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tableVGroup.findTableVGroupHolderContainer · ×1
  • tableVGroup.findTableVGroupHolderContainer::walk (cognitive 16) apps/desktop/src/lib/table/tableVGroup.ts:767 — tableVGroup.findTableVGroupHolderContainer::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabPresentation.tabConnectionGeneratedColor (cognitive 16) · ×1
  • tabPresentation.tabConnectionGeneratedColor (cognitive 16) apps/desktop/src/lib/tabs/tabPresentation.ts:47 — tabPresentation.tabConnectionGeneratedColor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (15 pts), loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · tabResultCache.selectResultCachePruneKeys (cognitive 16) · ×1
  • tabResultCache.selectResultCachePruneKeys (cognitive 16) apps/desktop/src/lib/tabs/tabResultCache.ts:300 — tabResultCache.selectResultCachePruneKeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tabUiState.sanitizeTabUiState (cognitive 16) · ×1
  • tabUiState.sanitizeTabUiState (cognitive 16) apps/desktop/src/lib/tabs/tabUiState.ts:103 — tabUiState.sanitizeTabUiState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadCachedMetadataListPage (cognitive 16) · ×1
  • connectionStore.useConnectionStore.loadCachedMetadataListPage (cognitive 16) apps/desktop/src/stores/connectionStore.ts:773 — connectionStore.useConnectionStore.loadCachedMetadataListPage has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.loadXuguTypeMembers (cognitive 16) · ×1
  • connectionStore.useConnectionStore.loadXuguTypeMembers (cognitive 16) apps/desktop/src/stores/connectionStore.ts:9069 — connectionStore.useConnectionStore.loadXuguTypeMembers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · connectionStore.useConnectionStore.toSqlCompletionObject (cognitive 16) · ×1
  • connectionStore.useConnectionStore.toSqlCompletionObject (cognitive 16) apps/desktop/src/stores/connectionStore.ts:10184 — connectionStore.useConnectionStore.toSqlCompletionObject has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · queryStore.useQueryStore.removeMultiDbExecutionWorker (cognitive 16) · ×1
  • queryStore.useQueryStore.removeMultiDbExecutionWorker (cognitive 16) apps/desktop/src/stores/queryStore.ts:1824 — queryStore.useQueryStore.removeMultiDbExecutionWorker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.localizePluginTabTitles (cognitive 16) · ×1
  • queryStore.useQueryStore.localizePluginTabTitles (cognitive 16) apps/desktop/src/stores/queryStore.ts:4531 — queryStore.useQueryStore.localizePluginTabTitles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.openTableStructure (cognitive 16) · ×1
  • queryStore.useQueryStore.openTableStructure (cognitive 16) apps/desktop/src/stores/queryStore.ts:4686 — queryStore.useQueryStore.openTableStructure has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 4, if/else 2 (3 pts) (nesting depth added 1). Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queryStore.useQueryStore.closeTabsWhere (cognitive 16) · ×1
  • queryStore.useQueryStore.closeTabsWhere (cognitive 16) apps/desktop/src/stores/queryStore.ts:5667 — queryStore.useQueryStore.closeTabsWhere has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 1. Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · queryStore.useQueryStore.detachConnectionTabsForDelete (cognitive 16) · ×1
  • queryStore.useQueryStore.detachConnectionTabsForDelete (cognitive 16) apps/desktop/src/stores/queryStore.ts:5991 — queryStore.useQueryStore.detachConnectionTabsForDelete has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.executeCurrentSql (cognitive 16) · ×1
  • queryStore.useQueryStore.executeCurrentSql (cognitive 16) apps/desktop/src/stores/queryStore.ts:7010 — queryStore.useQueryStore.executeCurrentSql has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · queryStore.useQueryStore.captureResultLegacyValuesForExport (cognitive 16) · ×1
  • queryStore.useQueryStore.captureResultLegacyValuesForExport (cognitive 16) apps/desktop/src/stores/queryStore.ts:10501 — queryStore.useQueryStore.captureResultLegacyValuesForExport has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.reserveFileName (cognitive 16) · ×1
  • savedSqlStore.useSavedSqlStore.reserveFileName (cognitive 16) apps/desktop/src/stores/savedSqlStore.ts:409 — savedSqlStore.useSavedSqlStore.reserveFileName has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3 (nesting depth added 1). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · savedSqlStore.useSavedSqlStore.reorderFiles (cognitive 16) · ×1
  • savedSqlStore.useSavedSqlStore.reorderFiles (cognitive 16) apps/desktop/src/stores/savedSqlStore.ts:1086 — savedSqlStore.useSavedSqlStore.reorderFiles has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 2, if/else 1. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1111, 1109, 1092). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · settingsStore.inferAiProviderFromConfig (cognitive 16) · ×1
  • settingsStore.inferAiProviderFromConfig (cognitive 16) apps/desktop/src/stores/settingsStore.ts:764 — settingsStore.inferAiProviderFromConfig has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.moveTaskToFolder (cognitive 16) · ×1
  • transferTaskStore.useTransferTaskStore.moveTaskToFolder (cognitive 16) apps/desktop/src/stores/transferTaskStore.ts:383 — transferTaskStore.useTransferTaskStore.moveTaskToFolder has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 396, 390, 391). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferTaskStore.useTransferTaskStore.reorderTasks (cognitive 16) · ×1
  • transferTaskStore.useTransferTaskStore.reorderTasks (cognitive 16) apps/desktop/src/stores/transferTaskStore.ts:449 — transferTaskStore.useTransferTaskStore.reorderTasks has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 2, if/else 1. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 467, 465, 455). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · meilisearchManagement.formatMeilisearchTaskDuration (cognitive 16) · ×1
  • meilisearchManagement.formatMeilisearchTaskDuration (cognitive 16) apps/desktop/src/types/meilisearchManagement.ts:169 — meilisearchManagement.formatMeilisearchTaskDuration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (5 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · platformDetection.detectPlatformId (cognitive 16) · ×1
  • platformDetection.detectPlatformId (cognitive 16) docs/lib/platformDetection.ts:22 — platformDetection.detectPlatformId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 64 shared lines) · ×1
  • Near-duplicate member family (5 members, 64 shared lines) crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:785 — crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:785-868 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:870-949 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1035-1118 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1213-1292 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1359-1439 — These 5 members are variants of one another: a block of 64 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 107 shared lines) · ×1
  • Near-duplicate member family (3 members, 107 shared lines) REDACTED:3464 — REDACTED:3464-4238 | src-tauri/src/commands/connection.rs:1570-2162 | src-tauri/src/commands/connection.rs:2233-2711 — These 3 members are variants of one another: a block of 107 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 30 shared lines) · ×1
  • Near-duplicate member family (3 members, 30 shared lines) crates/dbx-driver-mysql/src/mysql.rs:5563 — crates/dbx-driver-mysql/src/mysql.rs:5563-5738 | crates/dbx-driver-mysql/src/mysql.rs:5750-5956 | crates/dbx-driver-mysql/src/mysql.rs:5980-6090 — These 3 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 18 shared lines) · ×1
  • Near-duplicate member family (3 members, 18 shared lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:515 — crates/dbx-driver-mongodb/src/mongo_shell.rs:515-535 | crates/dbx-web/src/routes/mcp_policy.rs:197-217 | src-tauri/src/commands/mcp_bridge.rs:1586-1606 — These 3 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 17 shared lines) · ×1
  • Near-duplicate member family (3 members, 17 shared lines) crates/dbx-web/src/routes/database_export.rs:169 — crates/dbx-web/src/routes/database_export.rs:169-196 | crates/dbx-web/src/routes/query_result_export.rs:153-178 | crates/dbx-web/src/routes/table_export.rs:138-166 — These 3 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 7 shared lines) · ×1
  • Near-duplicate member family (3 members, 7 shared lines) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:560 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:560-639 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:668-720 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:734-772 — These 3 members are variants of one another: a block of 7 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 6 shared lines) · ×1
  • Near-duplicate member family (3 members, 6 shared lines) crates/dbx-driver-mongodb/src/mongo_shell.rs:493 — crates/dbx-driver-mongodb/src/mongo_shell.rs:493-506 | crates/dbx-web/src/routes/mcp_policy.rs:175-188 | src-tauri/src/commands/mcp_bridge.rs:1564-1577 — These 3 members are variants of one another: a block of 6 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (57 shared lines) · ×1
  • Near-duplicate member pair (57 shared lines) REDACTED:3562 — REDACTED:3562-3820 | REDACTED:4289-4468 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) crates/dbx-web/src/routes/mongodb_import_export.rs:115 — crates/dbx-web/src/routes/mongodb_import_export.rs:115-208 | crates/dbx-web/src/routes/table_import.rs:111-216 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (53 shared lines) · ×1
  • Near-duplicate member pair (53 shared lines) crates/dbx-drivers/src/db/couchdb_driver.rs:533 — crates/dbx-drivers/src/db/couchdb_driver.rs:533-596 | crates/dbx-drivers/src/db/solr_driver.rs:910-973 — These two members are variants of one another: 53 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) crates/dbx-core/src/admin/consul/blocking.rs:119 — crates/dbx-core/src/admin/consul/blocking.rs:119-167 | crates/dbx-core/src/admin/consul/blocking.rs:174-220 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (23 shared lines) · ×1
  • Near-duplicate member pair (23 shared lines) REDACTED:1267 — REDACTED:1267-1296 | REDACTED:1371-1400 — These two members are variants of one another: 23 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) crates/dbx-web/src/routes/tunnel_profiles.rs:81 — crates/dbx-web/src/routes/tunnel_profiles.rs:81-105 | src-tauri/src/commands/tunnel_profiles.rs:51-75 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) crates/dbx-drivers/src/db/rqlite_driver.rs:127 — crates/dbx-drivers/src/db/rqlite_driver.rs:127-153 | crates/dbx-drivers/src/db/turso_driver.rs:188-214 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) crates/dbx-web/src/routes/mongodb_import_export.rs:249 — crates/dbx-web/src/routes/mongodb_import_export.rs:249-271 | crates/dbx-web/src/routes/table_import.rs:263-288 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) crates/dbx-core/src/query/mongo_ops.rs:1533 — crates/dbx-core/src/query/mongo_ops.rs:1533-1551 | crates/dbx-mcp/src/backend.rs:2824-2840 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) REDACTED:1181 — REDACTED:1181-1231 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:97-130 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) crates/dbx-core/src/persistence/cloud_sync.rs:3122 — crates/dbx-core/src/persistence/cloud_sync.rs:3122-3148 | crates/dbx-core/src/persistence/cloud_sync.rs:3150-3165 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) REDACTED:3375 — REDACTED:3375-3396 | REDACTED:5422-5439 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (23 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (23 members, 50+ identical tokens) crates/dbx-core/src/query/redis_ops.rs:180 — crates/dbx-core/src/query/redis_ops.rs:180-201 | crates/dbx-core/src/query/redis_ops.rs:210-231 | crates/dbx-core/src/query/redis_ops.rs:239-260 | crates/dbx-core/src/query/redis_ops.rs:267-288 | crates/dbx-core/src/query/redis_ops.rs:370-391 | crates/dbx-core/src/query/redis_ops.rs:402-423 | crates/dbx-core/src/query/redis_ops.rs:475-496 | crates/dbx-core/src/query/redis_ops.rs:508-529 | crates/dbx-core/src/query/redis_ops.rs:545-566 | crates/dbx-core/src/query/redis_ops.rs:575-596 | crates/dbx-core/src/query/redis_ops.rs:605-626 | crates/dbx-core/src/query/redis_ops.rs:647-668 | crates/dbx-core/src/query/redis_ops.rs:677-698 | crates/dbx-core/src/query/redis_ops.rs:715-736 | crates/dbx-core/src/query/redis_ops.rs:755-776 | crates/dbx-core/src/query/redis_ops.rs:793-814 | crates/dbx-core/src/query/redis_ops.rs:824-845 | crates/dbx-core/src/query/redis_ops.rs:853-874 | crates/dbx-core/src/query/redis_ops.rs:885-906 | crates/dbx-core/src/query/redis_ops.rs:916-937 | crates/dbx-core/src/query/redis_ops.rs:946-967 | crates/dbx-core/src/query/redis_ops.rs:999-1020 | crates/dbx-core/src/query/redis_ops.rs:1028-1049 — These 23 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 23 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 23 times.
D4 · Code Duplication · Members sharing a duplicated core (13 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (13 members, 50+ identical tokens) src-tauri/src/commands/mcp_bridge.rs:2294 — src-tauri/src/commands/mcp_bridge.rs:2294-2311 | src-tauri/src/commands/mcp_bridge.rs:2313-2343 | src-tauri/src/commands/mcp_bridge.rs:2345-2371 | src-tauri/src/commands/mcp_bridge.rs:2373-2390 | src-tauri/src/commands/mcp_bridge.rs:2392-2411 | src-tauri/src/commands/mcp_bridge.rs:2413-2445 | src-tauri/src/commands/mcp_bridge.rs:2447-2473 | src-tauri/src/commands/mcp_bridge.rs:2475-2505 | src-tauri/src/commands/mcp_bridge.rs:2507-2537 | src-tauri/src/commands/mcp_bridge.rs:2539-2561 | src-tauri/src/commands/mcp_bridge.rs:2563-2592 | src-tauri/src/commands/mcp_bridge.rs:2594-2631 | src-tauri/src/commands/mcp_bridge.rs:2633-2668 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:95 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:95-124 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:205-244 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:103-123 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:163-199 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:220-241 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:283-323 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:307-349 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:107-131 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:173-213 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:111-135 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) crates/dbx-driver-elasticsearch/src/lib.rs:749 — crates/dbx-driver-elasticsearch/src/lib.rs:749-763 | crates/dbx-driver-elasticsearch/src/lib.rs:1002-1016 | crates/dbx-driver-elasticsearch/src/lib.rs:1018-1031 | crates/dbx-driver-elasticsearch/src/lib.rs:1520-1538 | crates/dbx-driver-elasticsearch/src/lib.rs:1558-1566 | crates/dbx-driver-elasticsearch/src/lib.rs:1605-1623 | crates/dbx-driver-elasticsearch/src/lib.rs:1905-1919 | crates/dbx-driver-elasticsearch/src/lib.rs:1927-1939 | crates/dbx-driver-elasticsearch/src/lib.rs:1991-2001 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:524 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:524-540 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:542-560 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:575-600 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:602-621 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:669-687 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:689-706 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:708-734 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) crates/dbx-driver-mysql/src/mysql.rs:5654 — crates/dbx-driver-mysql/src/mysql.rs:5654-5702 | crates/dbx-driver-mysql/src/mysql.rs:6006-6054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (48 lines × 5) · ×1
  • Duplicated block (48 lines × 5) crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:819 — crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:819-866 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:899-946 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1069-1116 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1243-1290 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1390-1437 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (48 lines × 3) · ×1
  • Duplicated block (48 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:441 — crates/dbx-driver-mongodb/src/mongo_shell.rs:441-488 | crates/dbx-web/src/routes/mcp_policy.rs:123-170 | src-tauri/src/commands/mcp_bridge.rs:1512-1559 — before extracting anything, compare `crates/dbx-driver-mongodb/src/mongo_shell.rs` and `crates/dbx-web/src/routes/mcp_policy.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44–45 lines × 6) · ×1
  • Duplicated block (44–45 lines × 6) REDACTED:1926 — REDACTED:1926-1970 | REDACTED:2030-2073 | REDACTED:2146-2190 | REDACTED:2246-2289 | REDACTED:2334-2377 | REDACTED:2422-2465 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (42–43 lines × 3) · ×1
  • Duplicated block (42–43 lines × 3) REDACTED:7760 — REDACTED:7760-7801 | REDACTED:8248-8289 | REDACTED:8586-8628 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (41–43 lines × 2) · ×1
  • Duplicated block (41–43 lines × 2) agents/drivers/duckdb/src/sql.rs:2 — agents/drivers/duckdb/src/sql.rs:2-42 | crates/dbx-drivers/src/db/duckdb_sql.rs:12-54 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-drivers/src/db/duckdb_sql.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (39–41 lines × 2) · ×1
  • Duplicated block (39–41 lines × 2) crates/dbx-driver-mongodb/src/mongo_driver.rs:1323 — crates/dbx-driver-mongodb/src/mongo_driver.rs:1323-1363 | crates/dbx-driver-mongodb/src/mongo_driver.rs:1561-1599 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) REDACTED:3811 — REDACTED:3811-3846 | src-tauri/src/commands/connection.rs:2470-2505 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–34 lines × 2) · ×1
  • Duplicated block (29–34 lines × 2) crates/dbx-core/src/data/transfer.rs:6772 — crates/dbx-core/src/data/transfer.rs:6772-6805 | crates/dbx-core/src/data/transfer.rs:6968-6996 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:122 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:122-152 | src-tauri/src/commands/redis_pubsub_server.rs:153-183 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) crates/dbx-web/src/routes/redis_pubsub_ws.rs:79 — crates/dbx-web/src/routes/redis_pubsub_ws.rs:79-108 | src-tauri/src/commands/redis_pubsub_server.rs:110-139 — before extracting anything, compare `crates/dbx-web/src/routes/redis_pubsub_ws.rs` and `src-tauri/src/commands/redis_pubsub_server.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) crates/dbx-core/src/admin/nacos/search.rs:250 — crates/dbx-core/src/admin/nacos/search.rs:250-277 | crates/dbx-core/src/admin/nacos/search.rs:331-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×1
  • Duplicated block (27 lines × 3) REDACTED:4983 — REDACTED:4983-5009 | REDACTED:5043-5069 | REDACTED:5103-5129 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:676 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:676-701 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:731-756 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:791-816 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:709 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:709-729 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:764-789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21–25 lines × 3) · ×1
  • Duplicated block (21–25 lines × 3) REDACTED:302 — REDACTED:302-322 | crates/dbx-drivers/src/db/rqlite_driver.rs:171-195 | crates/dbx-drivers/src/db/turso_driver.rs:232-256 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) crates/dbx-driver-agent/src/agent_service.rs:1667 — crates/dbx-driver-agent/src/agent_service.rs:1667-1689 | crates/dbx-driver-agent/src/agent_service.rs:1796-1820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19–25 lines × 2) · ×1
  • Duplicated block (19–25 lines × 2) REDACTED:6868 — REDACTED:6868-6892 | REDACTED:6937-6955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:486 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:486-510 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:657-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–24 lines × 6) · ×1
  • Duplicated block (22–24 lines × 6) REDACTED:1999 — REDACTED:1999-2022 | REDACTED:2101-2123 | REDACTED:2200-2223 | REDACTED:2304-2325 | REDACTED:2393-2414 | REDACTED:2497-2518 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) crates/dbx-core/src/query/mongo_ops.rs:1560 — crates/dbx-core/src/query/mongo_ops.rs:1560-1583 | crates/dbx-drivers/src/db/dynamodb_driver.rs:541-564 | crates/dbx-mcp/src/backend.rs:2847-2870 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) REDACTED:7705 — REDACTED:7705-7726 | REDACTED:8170-8191 | REDACTED:8533-8555 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:144 — crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:144-165 | crates/dbx-sql-schema/src/table_structure_sql/oracle_constraints.rs:232-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) src-tauri/src/commands/connection.rs:1996 — src-tauri/src/commands/connection.rs:1996-2018 | src-tauri/src/commands/connection.rs:2562-2582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22 lines × 4) · ×1
  • Duplicated block (22 lines × 4) REDACTED:98 — REDACTED:98-119 | crates/dbx-drivers/src/db/influxdb3_driver.rs:90-111 | crates/dbx-drivers/src/db/influxdb_driver.rs:131-152 | crates/dbx-drivers/src/db/victoriametrics_driver.rs:154-175 — before extracting anything, compare `crates/dbx-drivers/src/db/influxdb3_driver.rs` and `crates/dbx-drivers/src/db/influxdb_driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) crates/dbx-core/src/admin/consul/archive.rs:481 — crates/dbx-core/src/admin/consul/archive.rs:481-501 | crates/dbx-core/src/admin/consul/kv.rs:486-507 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) REDACTED:1583 — REDACTED:1583-1603 | REDACTED:1788-1808 | REDACTED:2080-2100 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) REDACTED:817 — REDACTED:817-837 | REDACTED:1298-1316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:96 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:96-115 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:173-192 | crates/dbx-ai-provider/src/ai_codex_cli.rs:343-362 | crates/dbx-ai-provider/src/ai_grok_cli.rs:143-162 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 4) · ×1
  • Duplicated block (19–20 lines × 4) REDACTED:302 — REDACTED:302-320 | crates/dbx-drivers/src/db/rqlite_driver.rs:173-192 | crates/dbx-drivers/src/db/sqlite.rs:2517-2536 | crates/dbx-drivers/src/db/turso_driver.rs:234-253 — before extracting anything, compare `REDACTED` and `crates/dbx-drivers/src/db/rqlite_driver.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) REDACTED:1703 — REDACTED:1703-1722 | REDACTED:1999-2018 | REDACTED:2206-2225 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) crates/dbx-driver-mongodb/src/mongo_shell.rs:1366 — crates/dbx-driver-mongodb/src/mongo_shell.rs:1366-1383 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1513-1531 | crates/dbx-driver-mongodb/src/mongo_shell.rs:1567-1584 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15–18 lines × 3) · ×1
  • Duplicated block (15–18 lines × 3) crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:499 — crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:499-516 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:667-681 | crates/dbx-sql-dialect/src/sql_dialect/ddl_profile.rs:782-796 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) crates/dbx-driver-mysql/src/mysql.rs:5668 — crates/dbx-driver-mysql/src/mysql.rs:5668-5684 | crates/dbx-driver-mysql/src/mysql.rs:5821-5836 | crates/dbx-driver-mysql/src/mysql.rs:6020-6036 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) crates/dbx-drivers/src/db/sqlite.rs:2760 — crates/dbx-drivers/src/db/sqlite.rs:2760-2776 | crates/dbx-sqlite-worker/src/runtime.rs:100-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) REDACTED:4611 — REDACTED:4611-4626 | REDACTED:4988-5002 | REDACTED:5048-5062 | REDACTED:5108-5122 | REDACTED:5173-5187 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:791 — crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:791-806 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:877-892 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1040-1055 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1218-1233 | crates/dbx-core/src/schema/table_structure_sql/sqlite_rebuild.rs:1363-1378 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–16 lines × 3) · ×1
  • Duplicated block (13–16 lines × 3) crates/dbx-core/src/query/document_ops.rs:560 — crates/dbx-core/src/query/document_ops.rs:560-572 | crates/dbx-core/src/query/mongo_ops.rs:370-385 | crates/dbx-core/src/query/mongo_ops.rs:547-562 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) REDACTED:1228 — REDACTED:1228-1242 | REDACTED:1279-1293 | REDACTED:1331-1345 | REDACTED:1386-1400 | REDACTED:1437-1451 | REDACTED:1512-1526 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) crates/dbx-ai-provider/src/ai_opencode_cli.rs:380 — crates/dbx-ai-provider/src/ai_opencode_cli.rs:380-394 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:401-414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) crates/dbx-core/src/schema/mod.rs:966 — crates/dbx-core/src/schema/mod.rs:966-980 | crates/dbx-core/src/schema/mod.rs:2727-2740 | crates/dbx-core/src/schema/mod.rs:7923-7937 | crates/dbx-core/src/schema/mod.rs:8842-8856 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) agents/drivers/duckdb/src/sql.rs:390 — agents/drivers/duckdb/src/sql.rs:390-401 | crates/dbx-sql-core/src/sql.rs:3299-3312 | crates/dbx-sql-core/src/sql.rs:3347-3360 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-sql-core/src/sql.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) src-tauri/src/commands/mcp_bridge.rs:2241 — src-tauri/src/commands/mcp_bridge.rs:2241-2253 | src-tauri/src/commands/mcp_bridge.rs:2269-2281 | src-tauri/src/commands/mcp_bridge.rs:2672-2684 | src-tauri/src/commands/mcp_bridge.rs:2728-2740 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) crates/dbx-sql-schema/src/schema_diff.rs:6666 — crates/dbx-sql-schema/src/schema_diff.rs:6666-6678 | crates/dbx-sql-schema/src/schema_diff.rs:6717-6728 | crates/dbx-sql-schema/src/schema_diff.rs:6744-6755 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) crates/dbx-ai-provider/src/ai.rs:3588 — crates/dbx-ai-provider/src/ai.rs:3588-3600 | crates/dbx-ai-provider/src/ai.rs:3658-3666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (2–13 lines × 3) · ×1
  • Duplicated block (2–13 lines × 3) REDACTED:3744 — REDACTED:3744-3756 | src-tauri/src/commands/connection.rs:1820-1821 | src-tauri/src/commands/connection.rs:2392-2404 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×1
  • Duplicated block (11–12 lines × 4) REDACTED:1718 — REDACTED:1718-1728 | REDACTED:2014-2024 | REDACTED:2221-2231 | REDACTED:2424-2435 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) agents/drivers/duckdb/src/sql.rs:403 — agents/drivers/duckdb/src/sql.rs:403-413 | REDACTED:2198-2207 | crates/dbx-sql-core/src/sql.rs:3379-3390 — before extracting anything, compare `agents/drivers/duckdb/src/sql.rs` and `crates/dbx-sql-core/src/sql.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) crates/dbx-drivers/src/db/ssh_tunnel.rs:1858 — crates/dbx-drivers/src/db/ssh_tunnel.rs:1858-1866 | crates/dbx-drivers/src/db/ssh_tunnel.rs:1918-1929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 13) · ×1
  • Duplicated block (11 lines × 13) src-tauri/src/commands/mcp_bridge.rs:2296 — src-tauri/src/commands/mcp_bridge.rs:2296-2306 | src-tauri/src/commands/mcp_bridge.rs:2315-2325 | src-tauri/src/commands/mcp_bridge.rs:2347-2357 | src-tauri/src/commands/mcp_bridge.rs:2375-2385 | src-tauri/src/commands/mcp_bridge.rs:2394-2404 | src-tauri/src/commands/mcp_bridge.rs:2415-2425 | src-tauri/src/commands/mcp_bridge.rs:2449-2459 | src-tauri/src/commands/mcp_bridge.rs:2477-2487 | src-tauri/src/commands/mcp_bridge.rs:2509-2519 | src-tauri/src/commands/mcp_bridge.rs:2541-2551 | src-tauri/src/commands/mcp_bridge.rs:2565-2575 | src-tauri/src/commands/mcp_bridge.rs:2596-2606 | src-tauri/src/commands/mcp_bridge.rs:2635-2645 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) crates/dbx-ai-provider/src/ai_codex_cli.rs:404 — crates/dbx-ai-provider/src/ai_codex_cli.rs:404-414 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:386-396 | src-tauri/src/commands/mcp.rs:1605-1614 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_codex_cli.rs` and `crates/dbx-ai-provider/src/ai_pi_agent_cli.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) REDACTED:3758 — REDACTED:3758-3766 | src-tauri/src/commands/connection.rs:1823-1833 | src-tauri/src/commands/connection.rs:2407-2415 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) crates/dbx-core/src/connection/jdbc.rs:662 — crates/dbx-core/src/connection/jdbc.rs:662-672 | crates/dbx-driver-agent/src/agent_service.rs:132-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) crates/dbx-core/src/data/transfer.rs:14473 — crates/dbx-core/src/data/transfer.rs:14473-14482 | crates/dbx-core/src/data/transfer.rs:14497-14506 | crates/dbx-core/src/data/transfer.rs:14818-14827 | crates/dbx-core/src/data/transfer.rs:14842-14851 | crates/dbx-core/src/data/transfer.rs:14876-14885 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) crates/dbx-core/src/schema/native_jobs/operations.rs:494 — crates/dbx-core/src/schema/native_jobs/operations.rs:494-500 | crates/dbx-core/src/schema/native_jobs/operations/dameng.rs:319-328 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8 lines × 17) · ×1
  • Duplicated block (8 lines × 17) crates/dbx-core/src/query/redis_ops.rs:476 — crates/dbx-core/src/query/redis_ops.rs:476-483 | crates/dbx-core/src/query/redis_ops.rs:509-516 | crates/dbx-core/src/query/redis_ops.rs:546-553 | crates/dbx-core/src/query/redis_ops.rs:576-583 | crates/dbx-core/src/query/redis_ops.rs:606-613 | crates/dbx-core/src/query/redis_ops.rs:648-655 | crates/dbx-core/src/query/redis_ops.rs:678-685 | crates/dbx-core/src/query/redis_ops.rs:716-723 | crates/dbx-core/src/query/redis_ops.rs:756-763 | crates/dbx-core/src/query/redis_ops.rs:794-801 | crates/dbx-core/src/query/redis_ops.rs:825-832 | crates/dbx-core/src/query/redis_ops.rs:854-861 | crates/dbx-core/src/query/redis_ops.rs:886-893 | crates/dbx-core/src/query/redis_ops.rs:917-924 | crates/dbx-core/src/query/redis_ops.rs:947-954 | crates/dbx-core/src/query/redis_ops.rs:1000-1007 | crates/dbx-core/src/query/redis_ops.rs:1029-1036 — all 17 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 12) · ×1
  • Duplicated block (8 lines × 12) REDACTED:3776 — REDACTED:3776-3783 | REDACTED:3792-3799 | REDACTED:3808-3815 | REDACTED:3824-3831 | src-tauri/src/commands/connection.rs:1850-1857 | src-tauri/src/commands/connection.rs:1878-1885 | src-tauri/src/commands/connection.rs:1895-1902 | src-tauri/src/commands/connection.rs:1912-1919 | src-tauri/src/commands/connection.rs:2425-2432 | src-tauri/src/commands/connection.rs:2451-2458 | src-tauri/src/commands/connection.rs:2467-2474 | src-tauri/src/commands/connection.rs:2483-2490 — before extracting anything, compare `REDACTED` and `src-tauri/src/commands/connection.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 269 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) crates/dbx-core/src/admin/mq/adapters/pulsar.rs:527 — crates/dbx-core/src/admin/mq/adapters/pulsar.rs:527-534 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:547-554 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:580-587 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:605-612 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:674-681 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:694-701 | crates/dbx-core/src/admin/mq/adapters/pulsar.rs:711-718 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 23) · ×1
  • Duplicated block (7 lines × 23) crates/dbx-core/src/query/redis_ops.rs:183 — crates/dbx-core/src/query/redis_ops.rs:183-189 | crates/dbx-core/src/query/redis_ops.rs:213-219 | crates/dbx-core/src/query/redis_ops.rs:242-248 | crates/dbx-core/src/query/redis_ops.rs:270-276 | crates/dbx-core/src/query/redis_ops.rs:373-379 | crates/dbx-core/src/query/redis_ops.rs:405-411 | crates/dbx-core/src/query/redis_ops.rs:478-484 | crates/dbx-core/src/query/redis_ops.rs:511-517 | crates/dbx-core/src/query/redis_ops.rs:548-554 | crates/dbx-core/src/query/redis_ops.rs:578-584 | crates/dbx-core/src/query/redis_ops.rs:608-614 | crates/dbx-core/src/query/redis_ops.rs:650-656 | crates/dbx-core/src/query/redis_ops.rs:680-686 | crates/dbx-core/src/query/redis_ops.rs:718-724 | crates/dbx-core/src/query/redis_ops.rs:758-764 | crates/dbx-core/src/query/redis_ops.rs:796-802 | crates/dbx-core/src/query/redis_ops.rs:827-833 | crates/dbx-core/src/query/redis_ops.rs:856-862 | crates/dbx-core/src/query/redis_ops.rs:888-894 | crates/dbx-core/src/query/redis_ops.rs:919-925 | crates/dbx-core/src/query/redis_ops.rs:949-955 | crates/dbx-core/src/query/redis_ops.rs:1002-1008 | crates/dbx-core/src/query/redis_ops.rs:1031-1037 — all 23 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) agents/drivers/duckdb/src/sql.rs:239 — agents/drivers/duckdb/src/sql.rs:239-245 | agents/drivers/duckdb/src/sql.rs:403-409 | REDACTED:2198-2204 | crates/dbx-driver-mysql/src/mysql.rs:6934-6940 | crates/dbx-driver-mysql/src/mysql.rs:7110-7116 | crates/dbx-driver-sqlserver/src/sqlserver.rs:4428-4434 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) crates/dbx-core/src/connection/jdbc.rs:917 — crates/dbx-core/src/connection/jdbc.rs:917-923 | crates/dbx-core/src/connection/jdbc.rs:989-994 | crates/dbx-core/src/connection/jdbc.rs:1069-1074 | crates/dbx-plugin-runtime/src/plugins.rs:199-205 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:719 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:719-724 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:817-823 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:898-903 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–7 lines × 3) · ×1
  • Duplicated block (3–7 lines × 3) crates/dbx-ai-provider/src/ai_cli_agent.rs:456 — crates/dbx-ai-provider/src/ai_cli_agent.rs:456-462 | crates/dbx-ai-provider/src/ai_cli_agent.rs:634-640 | crates/dbx-ai-provider/src/ai_cli_agent.rs:981-983 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (2–7 lines × 9) · ×1
  • Duplicated block (2–7 lines × 9) crates/dbx-driver-elasticsearch/src/lib.rs:752 — crates/dbx-driver-elasticsearch/src/lib.rs:752-753 | crates/dbx-driver-elasticsearch/src/lib.rs:1008-1009 | crates/dbx-driver-elasticsearch/src/lib.rs:1022-1023 | crates/dbx-driver-elasticsearch/src/lib.rs:1525-1526 | crates/dbx-driver-elasticsearch/src/lib.rs:1561-1562 | crates/dbx-driver-elasticsearch/src/lib.rs:1609-1610 | crates/dbx-driver-elasticsearch/src/lib.rs:1912-1913 | crates/dbx-driver-elasticsearch/src/lib.rs:1933-1939 | crates/dbx-driver-elasticsearch/src/lib.rs:1995-2001 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5–7 lines × 4) · ×1
  • Duplicated block (5–7 lines × 4) crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:696 — crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:696-700 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:798-804 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:970-976 | crates/dbx-sql-schema/src/table_structure_sql/column_alter.rs:1184-1188 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (4–6 lines × 4) · ×1
  • Duplicated block (4–6 lines × 4) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:85 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:85-90 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:162-167 | crates/dbx-ai-provider/src/ai_codex_cli.rs:381-384 | crates/dbx-ai-provider/src/ai_grok_cli.rs:132-137 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–6 lines × 3) · ×1
  • Duplicated block (4–6 lines × 3) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:331 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:331-336 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:410-415 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:610-613 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (1–6 lines × 14) · ×1
  • Duplicated block (1–6 lines × 14) crates/dbx-driver-mysql/src/manticoresearch.rs:181 — crates/dbx-driver-mysql/src/manticoresearch.rs:181-182 | crates/dbx-driver-mysql/src/mysql.rs:3814-3816 | crates/dbx-driver-mysql/src/mysql.rs:3885-3888 | crates/dbx-driver-mysql/src/mysql.rs:4635-4636 | crates/dbx-driver-mysql/src/mysql.rs:7352-7355 | crates/dbx-driver-mysql/src/mysql_compatible.rs:129-130 | crates/dbx-driver-mysql/src/ob_oracle.rs:56-56 | crates/dbx-driver-mysql/src/ob_oracle.rs:78-81 | crates/dbx-driver-mysql/src/ob_oracle.rs:125-126 | crates/dbx-driver-mysql/src/ob_oracle.rs:175-180 | crates/dbx-driver-mysql/src/ob_oracle.rs:240-241 | crates/dbx-driver-mysql/src/ob_oracle.rs:295-298 | crates/dbx-driver-mysql/src/ob_oracle.rs:343-348 | crates/dbx-driver-mysql/src/starrocks.rs:75-76 — there are 14 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 8) · ×1
  • Duplicated block (5 lines × 8) crates/dbx-ai-provider/src/ai.rs:3854 — crates/dbx-ai-provider/src/ai.rs:3854-3858 | crates/dbx-ai-provider/src/ai.rs:3962-3966 | crates/dbx-ai-provider/src/ai.rs:4117-4121 | crates/dbx-ai-provider/src/ai.rs:4215-4219 | crates/dbx-ai-provider/src/ai.rs:4468-4472 | crates/dbx-ai-provider/src/ai.rs:4668-4672 | crates/dbx-ai-provider/src/ai.rs:4850-4854 | crates/dbx-ai-provider/src/ai.rs:5111-5115 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) crates/dbx-core/src/schema/mod.rs:432 — crates/dbx-core/src/schema/mod.rs:432-436 | crates/dbx-core/src/schema/mod.rs:502-506 | crates/dbx-core/src/schema/mod.rs:537-541 | crates/dbx-core/src/schema/mod.rs:571-573 | crates/dbx-core/src/schema/mod.rs:606-610 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (2–5 lines × 8) · ×1
  • Duplicated block (2–5 lines × 8) crates/dbx-driver-mysql/src/mysql.rs:3813 — crates/dbx-driver-mysql/src/mysql.rs:3813-3814 | crates/dbx-driver-mysql/src/mysql.rs:7217-7218 | crates/dbx-driver-mysql/src/mysql.rs:7234-7238 | crates/dbx-driver-mysql/src/mysql.rs:7296-7299 | crates/dbx-driver-mysql/src/mysql.rs:7347-7351 | crates/dbx-driver-mysql/src/mysql_compatible.rs:140-141 | crates/dbx-driver-mysql/src/mysql_compatible.rs:239-240 | crates/dbx-driver-mysql/src/starrocks.rs:74-75 — there are 8 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (2–5 lines × 4) · ×1
  • Duplicated block (2–5 lines × 4) crates/dbx-driver-mysql/src/mysql.rs:7217 — crates/dbx-driver-mysql/src/mysql.rs:7217-7218 | crates/dbx-driver-mysql/src/mysql.rs:7254-7258 | crates/dbx-driver-mysql/src/mysql.rs:7312-7316 | crates/dbx-driver-mysql/src/mysql_compatible.rs:239-240 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) crates/dbx-drivers/src/db/questdb.rs:54 — crates/dbx-drivers/src/db/questdb.rs:54-58 | crates/dbx-drivers/src/db/questdb.rs:85-89 | crates/dbx-drivers/src/db/questdb.rs:111-114 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×1
  • Duplicated block (7 lines × 8) crates/dbx-ai-provider/src/ai_claude_code_cli.rs:187 — crates/dbx-ai-provider/src/ai_claude_code_cli.rs:187-193 | crates/dbx-ai-provider/src/ai_codebuddy_cli.rs:267-273 | crates/dbx-ai-provider/src/ai_codex_cli.rs:488-494 | crates/dbx-ai-provider/src/ai_cursor_cli.rs:158-164 | crates/dbx-ai-provider/src/ai_grok_cli.rs:237-243 | crates/dbx-ai-provider/src/ai_opencode_cli.rs:229-235 | crates/dbx-ai-provider/src/ai_pi_agent_cli.rs:430-436 | crates/dbx-ai-provider/src/ai_qoder_cli.rs:119-125 — before extracting anything, compare `crates/dbx-ai-provider/src/ai_claude_code_cli.rs` and `crates/dbx-ai-provider/src/ai_codebuddy_cli.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) REDACTED:6338 — REDACTED:6338-6359 | REDACTED:6468-6489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) crates/dbx-core/src/data/transfer.rs:14450 — crates/dbx-core/src/data/transfer.rs:14450-14458 | crates/dbx-core/src/data/transfer.rs:14474-14482 | crates/dbx-core/src/data/transfer.rs:14498-14506 | crates/dbx-core/src/data/transfer.rs:14527-14535 | crates/dbx-core/src/data/transfer.rs:14728-14736 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) crates/dbx-driver-mysql/src/manticoresearch.rs:79 — crates/dbx-driver-mysql/src/manticoresearch.rs:79-82 | crates/dbx-driver-mysql/src/oceanbase_mysql.rs:22-29 | crates/dbx-driver-mysql/src/starrocks.rs:77-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (2–5 lines × 11) · ×1
  • Duplicated block (2–5 lines × 11) REDACTED:2741 — REDACTED:2741-2742 | REDACTED:2901-2902 | REDACTED:2912-2916 | REDACTED:2922-2926 | REDACTED:3362-3363 | REDACTED:3384-3386 | REDACTED:4908-4909 | REDACTED:5191-5192 | REDACTED:6984-6985 | REDACTED:9401-9402 | REDACTED:9493-9494 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17–44 lines × 2) · ×1
  • Duplicated block (17–44 lines × 2) REDACTED:2610 — REDACTED:2610-2653 | REDACTED:2666-2682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2610` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–42 lines × 13) · ×1
  • Duplicated block (10–42 lines × 13) REDACTED:2144 — REDACTED:2144-2153 | REDACTED:2173-2196 | REDACTED:2255-2266 | REDACTED:2484-2519 | REDACTED:2545-2564 | REDACTED:2611-2652 | REDACTED:2667-2681 | REDACTED:2729-2738 | REDACTED:2758-2768 | REDACTED:3162-3173 | REDACTED:3325-3335 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:270-279 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:286-296 — there are 13 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2520` calls `equals`, `getString` and `REDACTED:2565` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:182 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:182-210 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:108-136 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 3) · ×1
  • Duplicated block (28 lines × 3) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:93 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:93-120 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:107-134 | agents/drivers/kylin/src/main/java/com/dbx/agent/kylin/KylinAgent.java:72-99 — before extracting anything, compare `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java` and `agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–27 lines × 4) · ×1
  • Duplicated block (20–27 lines × 4) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:30 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:30-52 | agents/common/src/main/java/com/dbx/agent/ConfiguredJdbcAgent.java:133-155 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:126-145 | agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:198-224 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java` and `agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:197` calls `resolveSchema` and `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:29` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×1
  • Duplicated block (25 lines × 3) agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:727 — agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:727-751 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:805-829 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:435-459 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:727` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–22 lines × 3) · ×1
  • Duplicated block (15–22 lines × 3) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:406 — agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:406-420 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:480-501 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:557-575 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:406` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–20 lines × 2) · ×1
  • Duplicated block (15–20 lines × 2) agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:196 — agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:196-215 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:176-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/spark/src/main/java/com/dbx/agent/spark/SparkAgent.java:196` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–17 lines × 2) · ×1
  • Duplicated block (10–17 lines × 2) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2302 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2302-2318 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2359-2368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–15 lines × 5) · ×1
  • Duplicated block (12–15 lines × 5) REDACTED:821 — REDACTED:821-835 | REDACTED:1090-1101 | REDACTED:1133-1144 | REDACTED:1263-1274 | REDACTED:1298-1311 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:838` calls `loadColumnNamesByNumber` and `REDACTED:1145` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×1
  • Duplicated block (14–15 lines × 4) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:757 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:757-770 | REDACTED:2649-2663 | REDACTED:2678-2692 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:367-381 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:757` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:216 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:216-230 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:182-194 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–14 lines × 4) · ×1
  • Duplicated block (10–14 lines × 4) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:111 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:111-124 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:232-241 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:118-131 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:122-135 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:247 — agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:247-259 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:157-170 | agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java:228-240 — before extracting anything, compare `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java` and `agents/drivers/iris/src/main/java/com/dbx/agent/iris/IrisAgent.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/cache/src/main/java/com/dbx/agent/cache/CacheAgent.java:247` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–14 lines × 2) · ×1
  • Duplicated block (9–14 lines × 2) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:315 — agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:315-323 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:200-213 — before extracting anything, compare `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java` and `agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:315` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:132 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:132-144 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:89-101 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:206-218 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:239-251 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:93-105 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:97-109 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:222` calls `resolveSchema` and `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:148` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:191 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:191-203 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:149-161 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:269-281 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:293-305 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:159-171 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9–13 lines × 4) · ×1
  • Duplicated block (9–13 lines × 4) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097-1109 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:399-411 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:574-586 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2401-2409 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:76 — agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:76-88 | agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java:90-102 | agents/drivers/kylin/src/main/java/com/dbx/agent/kylin/KylinAgent.java:55-67 — before extracting anything, compare `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java` and `agents/drivers/ignite3/src/main/java/com/dbx/agent/ignite3/Ignite3Agent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/ignite/src/main/java/com/dbx/agent/ignite/IgniteAgent.java:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:390 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:390-401 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:473-480 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:390` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–11 lines × 5) · ×1
  • Duplicated block (7–11 lines × 5) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097-1107 | REDACTED:2767-2774 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:399-409 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:574-584 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2401-2407 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1097` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:654 — agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:654-664 | REDACTED:227-237 | REDACTED:1359-1369 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:493-503 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:574-584 — before extracting anything, compare `agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:213 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:213-222 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:655-664 | REDACTED:228-237 | REDACTED:1360-1369 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:494-503 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:575-584 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:345-354 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:297-306 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:210` calls `tableTypeAllowed`, `add` and `REDACTED:227` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:200 — agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:200-207 | agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:120-128 | REDACTED:2652-2661 | REDACTED:2780-2787 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/kafka/src/main/java/com/dbx/agent/kafka/KafkaAgent.java:118` calls `parseString`, `getAsJsonObject` and `agents/common/src/main/java/com/dbx/agent/MultiSessionJsonRpcServer.java:198` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–10 lines × 3) · ×1
  • Duplicated block (3–10 lines × 3) agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:182 — agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:182-191 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:340-342 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:191-200 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:217 — agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:217-225 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:659-667 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:498-506 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:517-525 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:647-655 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:666-674 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:349-357 | agents/drivers/trino/src/main/java/com/dbx/agent/trino/TrinoAgent.java:301-309 — before extracting anything, compare `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java` and `agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/bigquery/src/main/java/com/dbx/agent/bigquery/BigQueryAgent.java:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 9) · ×1
  • Duplicated block (7–8 lines × 9) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:330 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:330-336 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:453-460 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:498-505 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:591-597 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:679-685 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:753-760 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:789-796 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:863-870 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:1092-1098 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:330` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:496` calls `catalogRelation` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:329` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:498 — agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:498-504 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1764-1771 | REDACTED:4539-4545 | REDACTED:5457-5464 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:498` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (1–7 lines × 6) · ×1
  • Duplicated block (1–7 lines × 6) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:936 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:936-942 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:969-970 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:989-995 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1001-1007 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1056-1062 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:1067-1067 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugTarget.java:969` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 10) · ×1
  • Duplicated block (6 lines × 10) REDACTED:3379 — REDACTED:3379-3384 | REDACTED:4453-4458 | REDACTED:4509-4514 | REDACTED:5294-5299 | REDACTED:5317-5322 | REDACTED:5348-5353 | REDACTED:5363-5368 | REDACTED:5378-5383 | REDACTED:5403-5408 | REDACTED:5424-5429 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594 — agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594-599 | REDACTED:3332-3337 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:498-503 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2085-2090 | agents/drivers/sqlserver-legacy/src/main/java/com/dbx/agent/sqlserverlegacy/SqlServerLegacyAgent.java:531-536 | REDACTED:4539-4544 | REDACTED:5457-5463 | REDACTED:6056-6062 — there are 8 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:594` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:858 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:858-863 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:916-920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:858` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1828 — agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1828-1831 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1901-1905 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2012-2016 | agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:2398-2402 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/OceanBaseOracleAgent.java:1828` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 8) · ×1
  • Duplicated block (4–5 lines × 8) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:12 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:12-16 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:85-89 | agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:207-210 | agents/drivers/db2/src/main/java/com/dbx/agent/db2/Db2Agent.java:171-174 | agents/drivers/goldendb/src/main/java/com/dbx/agent/goldendb/GoldendbAgent.java:128-131 | agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:247-250 | agents/drivers/informix/src/main/java/com/dbx/agent/informix/InformixAgent.java:280-283 | agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:136-139 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java` and `agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:12` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `agents/drivers/h2/src/main/java/com/dbx/agent/h2/H2Agent.java:246` calls `resolveSchema` and `agents/common/src/main/java/com/dbx/agent/PostgresLikeAgent.java:206` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:138 — agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:138-146 | agents/common/src/main/java/com/dbx/agent/BatchExecutor.java:157-165 | agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java:556-564 | agents/common/src/main/java/com/dbx/agent/JdbcExecutor.java:1269-1277 | agents/common/src/main/java/com/dbx/agent/StandardJdbcMetadata.java:867-875 | agents/common/src/main/java/com/dbx/agent/TransactionExecutor.java:150-158 — before extracting anything, compare `agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java` and `agents/common/src/main/java/com/dbx/agent/DatabaseAgent.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `agents/common/src/main/java/com/dbx/agent/TransactionExecutor.java:161` calls `run` and `agents/common/src/main/java/com/dbx/agent/BatchExecutor.java:167` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×1
  • Duplicated block (94 lines × 2) REDACTED:185 — REDACTED:185-278 | REDACTED:185-278 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×1
  • Duplicated block (52 lines × 2) agents/drivers/argo-go/bench/functional_probe.py:37 — agents/drivers/argo-go/bench/functional_probe.py:37-88 | agents/drivers/hive-go/bench/functional_probe.py:37-88 — before extracting anything, compare `agents/drivers/argo-go/bench/functional_probe.py` and `agents/drivers/hive-go/bench/functional_probe.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) REDACTED:414 — REDACTED:414-463 | REDACTED:414-463 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) REDACTED:485 — REDACTED:485-531 | REDACTED:485-531 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 397 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D5 · Coupling · Unstable project dbx-drivers · ×1
  • Unstable project dbx-drivers — dbx-drivers has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project dbx-sql · ×1
  • Unstable project dbx-sql — dbx-sql has instability 0.83 with 1 dependents.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking REDACTED:1708 — `enable_wal_mode` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
R10 · Code Duplication · Duplication concentrated across 45 sibling directories (340 clone groups) · ×1
  • Duplication concentrated across 45 sibling directories (340 clone groups) apps/desktop/src/components/layout/SqlLibraryPanel.vue:1388 — 340 duplicated blocks under apps/desktop/src/components/ have copies in at least two of the sibling directories admin, ai, backup, chart, codeSnapshot, common (+39 more sibling(s) not listed) — 197 of them are reported below, and 143 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 340 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 340 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 340 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (221 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (221 clone groups) apps/desktop/src/components/sidebar/TreeItem.vue:307 — 221 duplicated blocks under apps/desktop/src/ have copies in at least two of the sibling directories components, composables, lib, stores, types — 137 of them are reported below, and 84 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 221 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 221 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 221 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 45 sibling directories (148 clone groups) · ×1
  • Duplication concentrated across 45 sibling directories (148 clone groups) apps/desktop/src/lib/app/documentJsonValues.ts:306 — 148 duplicated blocks under apps/desktop/src/lib/ have copies in at least two of the sibling directories ai, app, backend, backup, cloudSync, codeSnapshot (+39 more sibling(s) not listed) — 98 of them are reported below, and 50 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 148 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 148 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 148 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (214 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (214 matched lines × 2 locations) apps/desktop/src/lib/backend/http.ts:1621 — apps/desktop/src/lib/backend/http.ts:1621 · apps/desktop/src/lib/backend/tauri.ts:2067 — the two spans are one implementation copied and then locally edited — 1185 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (192 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (192 matched lines × 2 locations) apps/desktop/src/components/admin/DamengRoleAdmin.vue:58 — apps/desktop/src/components/admin/DamengRoleAdmin.vue:58 · apps/desktop/src/components/admin/DamengUserAdmin.vue:81 — the two spans are one implementation copied and then locally edited — 1634 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (178 lines × 2 locations) · ×1
  • Duplicated block (178 lines × 2 locations) apps/desktop/src/components/layout/SqlLibraryPanel.vue:1388 — apps/desktop/src/components/layout/SqlLibraryPanel.vue:1388 · apps/desktop/src/components/transfer/TransferTaskTree.vue:333 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (163 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (163 matched lines × 2 locations) apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78 — apps/desktop/src/components/grid/DataGridFilterBuilder.vue:78 · apps/desktop/src/components/grid/DataGridSortBuilder.vue:49 — the two spans are one implementation copied and then locally edited — 1169 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (110 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (110 matched lines × 2 locations) apps/desktop/src/lib/metadata/objectDdlCache.ts:44 — apps/desktop/src/lib/metadata/objectDdlCache.ts:44 · apps/desktop/src/lib/metadata/objectMetadataCache.ts:25 — the two spans are one implementation copied and then locally edited — 1086 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (102 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (102 matched lines × 2 locations) apps/desktop/src/components/admin/MySqlDashboard.vue:32 — apps/desktop/src/components/admin/MySqlDashboard.vue:32 · apps/desktop/src/components/admin/PostgresDashboard.vue:29 — the two spans are one implementation copied and then locally edited — 1085 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (101 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (101 matched lines × 2 locations) apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84 — apps/desktop/src/components/mq/rabbitmq/RabbitMqPermissionsPanel.vue:84 · apps/desktop/src/components/mq/rabbitmq/RabbitMqPoliciesPanel.vue:58 — the two spans are one implementation copied and then locally edited — 589 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (88 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (88 matched lines × 2 locations) apps/desktop/src/components/sidebar/TreeItem.vue:307 — apps/desktop/src/components/sidebar/TreeItem.vue:307 · apps/desktop/src/lib/sidebar/treeNodeIcon.ts:54 — the two spans are one implementation copied and then locally edited — 578 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (81 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (81 matched lines × 2 locations) apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45 — apps/desktop/src/components/grid/DataGridTextFilterWorkbench.vue:45 · apps/desktop/src/components/grid/DataGridTextSortWorkbench.vue:28 — the two spans are one implementation copied and then locally edited — 610 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (72 lines × 2 locations) · ×1
  • Duplicated block (72 lines × 2 locations) apps/desktop/src/lib/sql/sqlStatementRanges.ts:1226 — apps/desktop/src/lib/sql/sqlStatementRanges.ts:1226 · apps/desktop/src/lib/sql/sqlStatementRanges.ts:1460 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (70 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (70 matched lines × 2 locations) REDACTED:6489 — REDACTED:6489 · REDACTED:6618 — the two spans are one implementation copied and then locally edited — 291 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (65 matched lines × 2 locations) apps/desktop/src/components/connection/ConnectionTreeSelect.vue:76 — apps/desktop/src/components/connection/ConnectionTreeSelect.vue:76 · apps/desktop/src/components/ui/searchable-select/SearchableSelect.vue:175 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (64 lines × 2 locations) · ×1
  • Duplicated block (64 lines × 2 locations) apps/desktop/src/lib/backend/http.ts:4278 — apps/desktop/src/lib/backend/http.ts:4278 · apps/desktop/src/lib/backend/tauri.ts:4432 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (63 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (63 matched lines × 2 locations) apps/desktop/src/lib/sql/identifierSearch.ts:7 — apps/desktop/src/lib/sql/identifierSearch.ts:7 · apps/desktop/src/lib/sql/sqlCompletion.ts:6794 — the two spans are one implementation copied and then locally edited — 523 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (61 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (61 matched lines × 2 locations) apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65 — apps/desktop/src/components/codeSnapshot/CodeSnapshotDialog.vue:65 · apps/desktop/src/components/grid/GridSnapshotDialog.vue:29 — the two spans are one implementation copied and then locally edited — 436 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (61 lines × 2 locations) · ×1
  • Duplicated block (61 lines × 2 locations) apps/desktop/src/components/sidebar/ConnectionTree.vue:1373 — apps/desktop/src/components/sidebar/ConnectionTree.vue:1373 · apps/desktop/src/components/sidebar/ConnectionTree.vue:1446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) apps/desktop/src/lib/sql/sqlFormatter.ts:633 — apps/desktop/src/lib/sql/sqlFormatter.ts:633 · apps/desktop/src/lib/sql/sqlFormatter.ts:996 — the two spans are one implementation copied and then locally edited — 491 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68 — apps/desktop/src/composables/useDataGridCanvasRuntime.ts:68 · apps/desktop/src/composables/useDataGridScrollbars.ts:44 — the two spans are one implementation copied and then locally edited — 260 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (50 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (50 matched lines × 2 locations) apps/desktop/src/components/mq/ExchangesPanel.vue:107 — apps/desktop/src/components/mq/ExchangesPanel.vue:107 · apps/desktop/src/components/mq/TopicsPanel.vue:259 — the two spans are one implementation copied and then locally edited — 292 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (48 lines × 2 locations) · ×1
  • Duplicated block (48 lines × 2 locations) apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380 — apps/desktop/src/components/diff/SchemaDiffDeployStep.vue:380 · apps/desktop/src/components/diff/SchemaDiffObjectTree.vue:43 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (47 lines × 2 locations) · ×1
  • Duplicated block (47 lines × 2 locations) apps/desktop/src/lib/backend/tauri.ts:6778 — apps/desktop/src/lib/backend/tauri.ts:6778 · apps/desktop/src/lib/backend/tauri.ts:6830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) apps/desktop/src/components/connection/ConnectionDialog.vue:7019 — apps/desktop/src/components/connection/ConnectionDialog.vue:7019 · apps/desktop/src/components/connection/TunnelProfileManager.vue:84 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R2 · Cyclomatic Complexity · Complex function executeTabSql (cyclomatic 627, cognitive 832) · ×1
  • Complex function executeTabSql (cyclomatic 627, cognitive 832) apps/desktop/src/stores/queryStore.ts:8102 — executeTabSql has cyclomatic complexity 627 and cognitive complexity 832; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function connectionConfigForSubmit (cyclomatic 285, cognitive 362) · ×1
  • Complex function connectionConfigForSubmit (cyclomatic 285, cognitive 362) apps/desktop/src/components/connection/ConnectionDialog.vue:4926 — connectionConfigForSubmit has cyclomatic complexity 285 and cognitive complexity 362; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function applyEditorSettingsPatch (cyclomatic 276, cognitive 294) · ×1
  • Complex function applyEditorSettingsPatch (cyclomatic 276, cognitive 294) apps/desktop/src/stores/settingsStore.ts:3005 — applyEditorSettingsPatch has cyclomatic complexity 276 and cognitive complexity 294; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function send (cyclomatic 240, cognitive 346) · ×1
  • Complex function send (cyclomatic 240, cognitive 346) apps/desktop/src/components/editor/AiAssistant.vue:4061 — send has cyclomatic complexity 240 and cognitive complexity 346; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function toggle (cyclomatic 220, cognitive 239) · ×1
  • Complex function toggle (cyclomatic 220, cognitive 239) REDACTED:917 — toggle has cyclomatic complexity 220 and cognitive complexity 239; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function dispatch (cyclomatic 180, cognitive 281) · ×1
  • Complex function dispatch (cyclomatic 180, cognitive 281) REDACTED:648 — dispatch has cyclomatic complexity 180 and cognitive complexity 281; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fetchCapturedTabResultForExport (cyclomatic 171, cognitive 242) · ×1
  • Complex function fetchCapturedTabResultForExport (cyclomatic 171, cognitive 242) apps/desktop/src/stores/queryStore.ts:10991 — fetchCapturedTabResultForExport has cyclomatic complexity 171 and cognitive complexity 242; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function normalizeEditorSettings (cyclomatic 164, cognitive 157) · ×1
  • Complex function normalizeEditorSettings (cyclomatic 164, cognitive 157) apps/desktop/src/stores/settingsStore.ts:2014 — normalizeEditorSettings has cyclomatic complexity 164 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildObjectSidebarMenu (cyclomatic 133, cognitive 215) · ×1
  • Complex function buildObjectSidebarMenu (cyclomatic 133, cognitive 215) REDACTED:7987 — buildObjectSidebarMenu has cyclomatic complexity 133 and cognitive complexity 215; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onGridKeydown (cyclomatic 129, cognitive 133) · ×1
  • Complex function onGridKeydown (cyclomatic 129, cognitive 133) apps/desktop/src/components/grid/DataGrid.vue:11734 — onGridKeydown has cyclomatic complexity 129 and cognitive complexity 133; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleKeydown (cyclomatic 127, cognitive 144) · ×1
  • Complex function handleKeydown (cyclomatic 127, cognitive 144) apps/desktop/src/App.vue:4667 — handleKeydown has cyclomatic complexity 127 and cognitive complexity 144; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function saveChanges (cyclomatic 125, cognitive 149) · ×1
  • Complex function saveChanges (cyclomatic 125, cognitive 149) apps/desktop/src/composables/useDataGridEditor.ts:2440 — saveChanges has cyclomatic complexity 125 and cognitive complexity 149; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function refreshSqlPreview (cyclomatic 124, cognitive 180) · ×1
  • Complex function refreshSqlPreview (cyclomatic 124, cognitive 180) apps/desktop/src/components/structure/TableStructureEditor.vue:3472 — refreshSqlPreview has cyclomatic complexity 124 and cognitive complexity 180; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function prepareOracleTypeManagement (cyclomatic 122, cognitive 203) · ×1
  • Complex function prepareOracleTypeManagement (cyclomatic 122, cognitive 203) apps/desktop/src/lib/table/oracleTypeManagement.ts:230 — prepareOracleTypeManagement has cyclomatic complexity 122 and cognitive complexity 203; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function performAsyncCompletionWithResult (cyclomatic 122, cognitive 151) · ×1
  • Complex function performAsyncCompletionWithResult (cyclomatic 122, cognitive 151) apps/desktop/src/components/editor/useQueryEditorCompletion.ts:1582 — performAsyncCompletionWithResult has cyclomatic complexity 122 and cognitive complexity 151; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function openData (cyclomatic 114, cognitive 113) · ×1
  • Complex function openData (cyclomatic 114, cognitive 113) apps/desktop/src/composables/useSidebarDataOpenRuntime.ts:38 — openData has cyclomatic complexity 114 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ensureTreeLoadedForTarget (cyclomatic 109, cognitive 116) · ×1
  • Complex function ensureTreeLoadedForTarget (cyclomatic 109, cognitive 116) apps/desktop/src/components/sidebar/ConnectionTree.vue:1886 — ensureTreeLoadedForTarget has cyclomatic complexity 109 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildDefaultGeneratorParams (cyclomatic 108, cognitive 121) · ×1
  • Complex function buildDefaultGeneratorParams (cyclomatic 108, cognitive 121) apps/desktop/src/lib/dataGrid/dataGenerate.ts:1259 — buildDefaultGeneratorParams has cyclomatic complexity 108 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadTreeNodeChildren (cyclomatic 107, cognitive 83) · ×1
  • Complex function loadTreeNodeChildren (cyclomatic 107, cognitive 83) apps/desktop/src/stores/connectionStore.ts:8584 — loadTreeNodeChildren has cyclomatic complexity 107 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getIconInfo (cyclomatic 107, cognitive 24) · ×1
  • Complex function getIconInfo (cyclomatic 107, cognitive 24) apps/desktop/src/components/sidebar/TreeItem.vue:267 — getIconInfo has cyclomatic complexity 107 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · apps/desktop/src/components/grid/DataGrid.vue · ×1
  • apps/desktop/src/components/grid/DataGrid.vue: 17278 lines of code apps/desktop/src/components/grid/DataGrid.vue:1 — apps/desktop/src/components/grid/DataGrid.vue has 17278 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13712 lines of code REDACTED:1 — REDACTED has 13712 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13674 lines of code REDACTED:1 — REDACTED has 13674 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/editor/EditorSettingsDialog.vue · ×1
  • apps/desktop/src/components/editor/EditorSettingsDialog.vue: 13474 lines of code apps/desktop/src/components/editor/EditorSettingsDialog.vue:1 — apps/desktop/src/components/editor/EditorSettingsDialog.vue has 13474 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13442 lines of code REDACTED:1 — REDACTED has 13442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13022 lines of code REDACTED:1 — REDACTED has 13022 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 13001 lines of code REDACTED:1 — REDACTED has 13001 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 12983 lines of code REDACTED:1 — REDACTED has 12983 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 12966 lines of code REDACTED:1 — REDACTED has 12966 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/i18n/locales/ko.ts · ×1
  • apps/desktop/src/i18n/locales/ko.ts: 12480 lines of code apps/desktop/src/i18n/locales/ko.ts:1 — apps/desktop/src/i18n/locales/ko.ts has 12480 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 12029 lines of code REDACTED:1 — REDACTED has 12029 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 12014 lines of code REDACTED:1 — REDACTED has 12014 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/stores/queryStore.ts · ×1
  • apps/desktop/src/stores/queryStore.ts: 11226 lines of code apps/desktop/src/stores/queryStore.ts:1 — apps/desktop/src/stores/queryStore.ts has 11226 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/i18n/locales/az.ts · ×1
  • apps/desktop/src/i18n/locales/az.ts: 11119 lines of code apps/desktop/src/i18n/locales/az.ts:1 — apps/desktop/src/i18n/locales/az.ts has 11119 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/connection/ConnectionDialog.vue · ×1
  • apps/desktop/src/components/connection/ConnectionDialog.vue: 11086 lines of code apps/desktop/src/components/connection/ConnectionDialog.vue:1 — apps/desktop/src/components/connection/ConnectionDialog.vue has 11086 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 11013 lines of code REDACTED:1 — REDACTED has 11013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/stores/connectionStore.ts · ×1
  • apps/desktop/src/stores/connectionStore.ts: 10978 lines of code apps/desktop/src/stores/connectionStore.ts:1 — apps/desktop/src/stores/connectionStore.ts has 10978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/structure/TableStructureEditor.vue · ×1
  • apps/desktop/src/components/structure/TableStructureEditor.vue: 10120 lines of code apps/desktop/src/components/structure/TableStructureEditor.vue:1 — apps/desktop/src/components/structure/TableStructureEditor.vue has 10120 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 8523 lines of code REDACTED:1 — REDACTED has 8523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/editor/AiAssistant.vue · ×1
  • apps/desktop/src/components/editor/AiAssistant.vue: 7836 lines of code apps/desktop/src/components/editor/AiAssistant.vue:1 — apps/desktop/src/components/editor/AiAssistant.vue has 7836 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/objects/ObjectBrowser.vue · ×1
  • apps/desktop/src/components/objects/ObjectBrowser.vue: 6869 lines of code apps/desktop/src/components/objects/ObjectBrowser.vue:1 — apps/desktop/src/components/objects/ObjectBrowser.vue has 6869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/sql/sqlCompletion.ts · ×1
  • apps/desktop/src/lib/sql/sqlCompletion.ts: 6524 lines of code apps/desktop/src/lib/sql/sqlCompletion.ts:1 — apps/desktop/src/lib/sql/sqlCompletion.ts has 6524 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/backend/tauri.ts · ×1
  • apps/desktop/src/lib/backend/tauri.ts: 6128 lines of code apps/desktop/src/lib/backend/tauri.ts:1 — apps/desktop/src/lib/backend/tauri.ts has 6128 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/App.vue · ×1
  • apps/desktop/src/App.vue: 5743 lines of code apps/desktop/src/App.vue:1 — apps/desktop/src/App.vue has 5743 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/backend/http.ts · ×1
  • apps/desktop/src/lib/backend/http.ts: 5116 lines of code apps/desktop/src/lib/backend/http.ts:1 — apps/desktop/src/lib/backend/http.ts has 5116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/redis/RedisKeyBrowser.vue · ×1
  • apps/desktop/src/components/redis/RedisKeyBrowser.vue: 4030 lines of code apps/desktop/src/components/redis/RedisKeyBrowser.vue:1 — apps/desktop/src/components/redis/RedisKeyBrowser.vue has 4030 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/redis/RedisValueViewer.vue · ×1
  • apps/desktop/src/components/redis/RedisValueViewer.vue: 3956 lines of code apps/desktop/src/components/redis/RedisValueViewer.vue:1 — apps/desktop/src/components/redis/RedisValueViewer.vue has 3956 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/layout/ContentArea.vue · ×1
  • apps/desktop/src/components/layout/ContentArea.vue: 3854 lines of code apps/desktop/src/components/layout/ContentArea.vue:1 — apps/desktop/src/components/layout/ContentArea.vue has 3854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/nacos/NacosAdminConsole.vue · ×1
  • apps/desktop/src/components/nacos/NacosAdminConsole.vue: 3778 lines of code apps/desktop/src/components/nacos/NacosAdminConsole.vue:1 — apps/desktop/src/components/nacos/NacosAdminConsole.vue has 3778 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/stores/settingsStore.ts · ×1
  • apps/desktop/src/stores/settingsStore.ts: 3359 lines of code apps/desktop/src/stores/settingsStore.ts:1 — apps/desktop/src/stores/settingsStore.ts has 3359 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/document/DocumentBrowser.vue · ×1
  • apps/desktop/src/components/document/DocumentBrowser.vue: 3299 lines of code apps/desktop/src/components/document/DocumentBrowser.vue:1 — apps/desktop/src/components/document/DocumentBrowser.vue has 3299 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/editor/QueryEditor.vue · ×1
  • apps/desktop/src/components/editor/QueryEditor.vue: 3296 lines of code apps/desktop/src/components/editor/QueryEditor.vue:1 — apps/desktop/src/components/editor/QueryEditor.vue has 3296 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/sidebar/ConnectionTree.vue · ×1
  • apps/desktop/src/components/sidebar/ConnectionTree.vue: 3052 lines of code apps/desktop/src/components/sidebar/ConnectionTree.vue:1 — apps/desktop/src/components/sidebar/ConnectionTree.vue has 3052 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/types/database.ts · ×1
  • apps/desktop/src/types/database.ts: 2909 lines of code apps/desktop/src/types/database.ts:1 — apps/desktop/src/types/database.ts has 2909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/composables/useDataGridEditor.ts · ×1
  • apps/desktop/src/composables/useDataGridEditor.ts: 2840 lines of code apps/desktop/src/composables/useDataGridEditor.ts:1 — apps/desktop/src/composables/useDataGridEditor.ts has 2840 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/composables/useDataGridExport.ts · ×1
  • apps/desktop/src/composables/useDataGridExport.ts: 2838 lines of code apps/desktop/src/composables/useDataGridExport.ts:1 — apps/desktop/src/composables/useDataGridExport.ts has 2838 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/lib/sql/sqlStatementRanges.ts · ×1
  • apps/desktop/src/lib/sql/sqlStatementRanges.ts: 2768 lines of code apps/desktop/src/lib/sql/sqlStatementRanges.ts:1 — apps/desktop/src/lib/sql/sqlStatementRanges.ts has 2768 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/layout/EditorGroupTabBar.vue · ×1
  • apps/desktop/src/components/layout/EditorGroupTabBar.vue: 2471 lines of code apps/desktop/src/components/layout/EditorGroupTabBar.vue:1 — apps/desktop/src/components/layout/EditorGroupTabBar.vue has 2471 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2409 lines of code REDACTED:1 — REDACTED has 2409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/desktop/src/components/import/TableImportDialog.vue · ×1
  • apps/desktop/src/components/import/TableImportDialog.vue: 2341 lines of code apps/desktop/src/components/import/TableImportDialog.vue:1 — apps/desktop/src/components/import/TableImportDialog.vue has 2341 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~415 LoC) · ×1
  • Dead file (~415 LoC) deploy/plugin-stats-worker/worker.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~208 LoC) · ×1
  • Dead file (~208 LoC) REDACTED — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~161 LoC) · ×1
  • Dead file (~161 LoC) REDACTED — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~146 LoC) · ×1
  • Dead file (~146 LoC) agents/drivers/oceanbase-oracle/scripts/verify-partition-ddl.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~130 LoC) · ×1
  • Dead file (~130 LoC) apps/desktop/src/lib/sql/sqlServerQueryWrapping.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~95 LoC) · ×1
  • Dead file (~95 LoC) scripts/check-mq-integration.mjs — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~44 LoC) · ×1
  • Dead file (~44 LoC) apps/desktop/src/lib/debug/plDebugWatch.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~16 LoC) · ×1
  • Dead file (~16 LoC) apps/desktop/src/lib/diagram/diagramZoom.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~10 LoC) · ×1
  • Dead file (~10 LoC) apps/desktop/src/lib/app/pinnedTreeNodeIds.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~9 LoC) · ×1
  • Dead file (~9 LoC) scripts/release-node-packages.mjs — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~7 LoC) · ×1
  • Dead file (~7 LoC) apps/desktop/src/lib/history/historyActions.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~2 LoC) · ×1
  • Dead file (~2 LoC) apps/desktop/src/components/ui/date-time-picker/index.ts — no import path from any entry point (84 application, 20 tooling, 2157 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@oxfmt/binding-darwin-arm64' · ×1
  • Unused dependency '@oxfmt/binding-darwin-arm64' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@oxlint/binding-darwin-arm64' · ×1
  • Unused dependency '@oxlint/binding-darwin-arm64' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'daisyui' · ×1
  • Unused dependency 'daisyui' — Declared in plugins/sdk/dev-host/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity docs/app/[lang]/layout.tsx:66 — `https://analytics.unihub.top/script.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository.
X1 · Async correctness · Blocking `thread · ×1
  • Blocking `thread::sleep` inside an `async` body REDACTED:1726 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
X28 · Index access outside its own emptiness guard · Index access outside its own emptiness guard · ×1
  • Index access outside its own emptiness guard agents/drivers/oracle-go/pldebug_legacy_declarations.go:102 — This condition tests `tokens` for emptiness and then indexes it on a branch that test does not reach. `tokens[0].Quoted` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `tokens` being empty — so an empty `tokens` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `tokens[1].word(" ")` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `tokens` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `tokens`.
Minor — 289 finding(s)
D10 · Test Quality · Mock-dominated test · ×97
  • Mock-dominated test: skips the substring lookup when the prefix search fills the result budget or the filter is short apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:494 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: normalizes unquoted Oracle aliases while preserving quoted case before catalog lookup apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:1098 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: prefers an explicit SQL Server routine schema over the current default schema apps/desktop/src/stores/__tests__/connectionStore.completion.spec.ts:1962 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the bounded fuzzy-search budget for external catalog tables apps/desktop/src/stores/__tests__/connectionStore.dorisCatalog.spec.ts:130 — This test sets up 7 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not fetch object DDL or column metadata during a connection refresh apps/desktop/src/stores/__tests__/connectionStore.refresh.spec.ts:439 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: immediate %s waits beyond the pool timeout for retirement and prompts even with stale status apps/desktop/src/stores/__tests__/connectionStore.savePassword.spec.ts:315 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: migrates historical disabled-encryption configs and installs the legacy component apps/desktop/src/stores/__tests__/connectionStore.sqlserverLegacy.spec.ts:44 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: reconnects persisted legacy profiles without reinstalling an installed component apps/desktop/src/stores/__tests__/connectionStore.sqlserverLegacy.spec.ts:72 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: covers functions with the same flow apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:98 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: leaves a plain query tab alone, so CREATE keeps its normal semantics there apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:110 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: leaves scripts with other statements and other routines to run exactly as written apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:122 — This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not apply to non-routine source tabs or other databases apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:136 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: still runs the statement when the backend cannot build the replace sequence apps/desktop/src/stores/__tests__/queryStore.mysqlRoutineSourceRun.spec.ts:162 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: continues from update all into the prepared app install apps/desktop/src/lib/updates/__tests__/componentUpdateOrchestration.spec.ts:190 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: falls back to component updates without restarting when the restart plan cannot be persisted apps/desktop/src/lib/updates/__tests__/componentUpdateOrchestration.spec.ts:226 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: allows only a metadata DDL export to carry its same-target state appendix apps/desktop/src/lib/table/__tests__/objectSourceLoad.spec.ts:141 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: reports a missing workbench explicitly without falling back to the backend apps/desktop/src/lib/plugins/pluginContext.spec.ts:142 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: cancels unfinished native downloads when the workbench is disposed apps/desktop/src/lib/plugins/pluginHostBridge.spec.ts:166 — This test sets up 7 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: cancels active streams when the workbench is disposed apps/desktop/src/lib/plugins/pluginHostBridge.spec.ts:2375 — This test sets up 7 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: dispatches query and special-page entries to their handlers apps/desktop/src/lib/navigation/__tests__/globalNavigationExecutor.spec.ts:5 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: writes only the path the save dialog just returned, after stamping the suggested name apps/desktop/src/lib/docs/__tests__/saveDataDictionaryFile.spec.ts:20 — This test sets up 3 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the document body when no dialog is active apps/desktop/src/lib/common/__tests__/clipboard.spec.ts:44 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: passes the %s-second override through both adapters, including unlimited apps/desktop/src/lib/backend/__tests__/getExplainInfo.spec.ts:75 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: filters query messages by execution and returns listener cleanup apps/desktop/src/lib/backend/__tests__/queryMessagesStreaming.spec.ts:7 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: serializes zoom IPC and only publishes the newest completed target apps/desktop/src/lib/app/__tests__/uiScaleApplyQueue.spec.ts:15 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 7 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • + 72 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×39
  • Console output used as the logging channel deploy/plugin-stats-worker/worker.ts:81 — `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 81 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel deploy/plugin-stats-worker/worker.ts:108 — `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 108 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel deploy/plugin-stats-worker/worker.ts:363 — `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 363 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel deploy/plugin-stats-worker/worker.ts:411 — `deploy/plugin-stats-worker/worker.ts` reports through `console.*` at line 411 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/savedSqlStore.ts:755 — `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 755 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/savedSqlStore.ts:835 — `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 835 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/savedSqlStore.ts:947 — `apps/desktop/src/stores/savedSqlStore.ts` reports through `console.*` at line 947 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts:67 — `apps/desktop/src/stores/sqlExecutionTargetGroupStore.ts` reports through `console.*` at line 67 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:214 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 214 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:592 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 592 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:661 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 661 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:736 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 736 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:748 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 748 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/tabs/tabResultCache.ts:901 — `apps/desktop/src/lib/tabs/tabResultCache.ts` reports through `console.*` at line 901 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/errorPosition.ts:51 — `apps/desktop/src/lib/sql/errorPosition.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/sqlHighlighter.ts:33 — `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/sqlHighlighter.ts:48 — `apps/desktop/src/lib/sql/sqlHighlighter.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sql/sqlRichText.ts:62 — `apps/desktop/src/lib/sql/sqlRichText.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:735 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 735 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:738 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 738 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:783 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 783 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:789 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 789 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:793 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 793 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:804 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 804 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts:893 — `apps/desktop/src/lib/sidebar/sidebarLayoutMonitor.ts` reports through `console.*` at line 893 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 14 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×28
  • Silent fallback default on Err agents/drivers/duckdb/src/query.rs:704 — `duckdb_execute_with_max_rows` turns every `Err` into `"?".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err agents/drivers/duckdb/src/schema.rs:405 — `duckdb_column_comments` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai.rs:3548 — `parse_retry_after_secs` turns every `Err` into `Some(0)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:58 — `toml_string` turns every `Err` into `"\"\"".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:373 — `parse_codex_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:531 — `parse_claude_compatible_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:668 — `parse_open_code_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:759 — `parse_cursor_jsonl_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-ai-provider/src/ai_cli_agent.rs:928 — `parse_grok_streaming_json_line` turns every `Err` into `ParsedCliAgentEvent::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err REDACTED:2025 — `oracle_oci_defaults` turns every `Err` into `OracleOciDefaults::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err REDACTED:366 — `active_paths` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err REDACTED:374 — `remove_owner` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-core/src/admin/consul/capabilities.rs:146 — `probe_agent` turns every `Err` into `ConsulCapabilities::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-core/src/admin/nacos/prometheus.rs:51 — `endpoint_candidates` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-core/src/ai/agent_kv.rs:1332 — `configured_etcd_metrics_urls` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-core/src/ai/agent_kv.rs:1378 — `sanitize_metrics_url` turns every `Err` into `"configured metrics endpoint".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err REDACTED:7642 — `redact_transport_url` turns every `Err` into `"<invalid-url>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-core/src/connection/jdbc.rs:475 — `list_system_fonts` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err REDACTED:917 — `json_stringify` turns every `Err` into `"null".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-core/src/schema/mod.rs:13172 — `postgres_object_source_catalog_caps` turns every `Err` into `PostgresCatalogCaps::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-driver-agent/src/agent_manager.rs:1623 — `path_size_bytes` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-driver-elasticsearch/src/lib.rs:459 — `elasticsearch_base_url_fallbacks` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-driver-elasticsearch/src/lib.rs:699 — `alias_map_or_empty` turns every `Err` into `BTreeMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-driver-redis/src/lib.rs:3235 — `scan_keys_batch_inner` turns every `Err` into `"unknown".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/dbx-driver-support/src/http_tunnel.rs:151 — `redacted_tunnel_url` turns every `Err` into `"<invalid-url>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • + 3 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate agents/drivers/argo-go/metadata.go:436 — `!acceptsHiveTable(constraints.ObjectTypes) && !(server.supportsRoutines() && acceptsHiveRoutine(constraints.ObjectTypes))` appears character-identically in 2 files — agents/drivers/argo-go/metadata.go, agents/drivers/hive-go/metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_breakpoint.go:160 — `!e.closeRequested && (unknown || e.targetReturned)` appears character-identically in 2 files — agents/drivers/oracle-go/pldebug_breakpoint.go, agents/drivers/oracle-go/pldebug_frame_value.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:950 — `!kerberos.UseTicketCache && !kerberos.UseKeytab && (kerberos.ClientPrincipal == "" || kerberos.Password == "")` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:925 — `!kerberos.UseTicketCache && kerberos.CCachePath == ""` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/kingbase-go/main.go:1269 — `!ok || !strings.EqualFold(strings.TrimSpace(key), "sslmode")` appears character-identically in 2 files — agents/drivers/kingbase-go/main.go, agents/drivers/vastbase-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2810 — `!source.Valid || strings.TrimSpace(source.String) == ""` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/query.go:287 — `!state.lastAccessed.IsZero() && now.Sub(state.lastAccessed) >= querySessionIdleTime` appears character-identically in 2 files — agents/drivers/argo-go/query.go, agents/drivers/hive-go/query.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_frame_value.go:96 — `!stop.StackDepth.Valid || stop.StackDepth.Int64 <= 0 || int64(request.Frame) >= stop.StackDepth.Int64` appears character-identically in 2 files — agents/drivers/oracle-go/pldebug_frame_value.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:736 — `!strings.EqualFold(config.Auth, "DELEGATIONTOKEN") && !strings.EqualFold(config.Auth, "DELEGATION_TOKEN")` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:866 — `!strings.HasPrefix(trimmed, "-D") || !found` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1053 — `!typdefaultbin.Valid || typdefaultbin.String == ""` appears character-identically in 2 files — REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2536 — `!validatedUnsupported && isUndefinedColumn(err, "convalidated")` appears character-identically in 2 files — REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/etcd-go/kv.go:249 — `(hasLease && hasTtl) || (preserveLease && (hasLease || hasTtl))` appears character-identically in 2 files — agents/drivers/etcd-go/kv.go, agents/drivers/etcd2-go/kv.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_target.go:832 — `a.Type == "DATE" || a.Type == "TIMESTAMP"` appears character-identically in 2 files — agents/drivers/oracle-go/pldebug_target.go, agents/drivers/oracle-go/pldebug_target_invoke.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/connector.go:154 — `attempt+1 < connector.retries && connector.retryInterval > 0` appears character-identically in 2 files — agents/drivers/argo-go/connector.go, agents/drivers/hive-go/connector.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/etcd-go/main.go:70 — `bytes < 0 || s.watchBufferedBytes+bytes > maxSessionWatchBufferBytes` appears character-identically in 2 files — agents/drivers/etcd-go/main.go, agents/drivers/etcd2-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/etcd-go/auth.go:161 — `candidate.end == "" || rangeStartAtOrAfterEnd(candidate.start, candidate.end)` appears character-identically in 2 files — agents/drivers/etcd-go/auth.go, agents/drivers/etcd-go/kv.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/oracle-go/pldebug_anonymous_source.go:100 — `capture != nil && capture.ReferencesPending` appears character-identically in 4 files — agents/drivers/oracle-go/pldebug_anonymous_source.go, agents/drivers/oracle-go/pldebug_entry.go, REDACTED, agents/drivers/oracle-go/pldebug_stack.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/kingbase-go/main.go:1515 — `char == '_' || char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' || char >= '0' && char <= '9'` appears character-identically in 2 files — agents/drivers/kingbase-go/main.go, agents/drivers/vastbase-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/kingbase-go/main.go:1768 — `char == 0 || char < 0x09 || char > 0x0d && char < 0x20` appears character-identically in 2 files — agents/drivers/kingbase-go/main.go, agents/drivers/vastbase-go/main.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2946 — `column.Comment == nil || strings.TrimSpace(*column.Comment) == ""` appears character-identically in 2 files — REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:3000 — `comment.Valid && strings.TrimSpace(comment.String) != ""` appears character-identically in 3 files — REDACTED, REDACTED, agents/drivers/vastbase-go/vastbase_metadata.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:186 — `config.Database == "" && parsed.database != ""` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:192 — `config.Password == "" && parsed.password != ""` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agents/drivers/argo-go/config.go:989 — `config.UseKeytab || parseJAASBool(value)` appears character-identically in 2 files — agents/drivers/argo-go/config.go, agents/drivers/hive-go/config.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×11
  • Silent fallback default in catch REDACTED:6447 — `bitColumnPrecision` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:6412 — `columnTypeName` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/drivers/spanner/src/main/java/com/dbx/agent/spanner/SpannerAgent.java:683 — `configuredDatabaseName` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/drivers/snowflake/src/main/java/com/dbx/agent/snowflake/SnowflakeAgent.java:301 — `listForeignKeys` swallows every exception into `return Collections.emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:614 — `authorizedDatabaseNames` swallows every exception into `return Collections.emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:1415 — `currentCatalog` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:1042 — `queryDatabaseNamesFromSysmaster` swallows every exception into `return Collections.emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:2841 — `statementPrintMessages` swallows every exception into `return List.of()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:2780 — `triggerColumnText` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:595 — `connectionUrl` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch agents/common/src/main/java/com/dbx/agent/AbstractJdbcAgent.java:548 — `resolveIdentifierQuote` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
X9 · Subsumed condition operand · Subsumed condition operand · ×11
  • Subsumed condition operand src-tauri/src/commands/keychain.rs:38 — `stderr.contains("The specified item could not be found")` can never decide this `||` — every value satisfying `stderr.contains("The specified item could not be found")` also satisfies `stderr.contains("could not be found")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand REDACTED:6402 — `normalized.startsWith("bit varying")` can never decide this `||` — every value satisfying `normalized.startsWith("bit varying")` also satisfies `normalized.startsWith("bit ")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-sql-schema/src/table_structure_sql/validation.rs:213 — `lower.starts_with("character varying")` can never decide this `||` — every value satisfying `lower.starts_with("character varying")` also satisfies `lower.starts_with("character")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-driver-mysql/src/mysql.rs:2769 — `lower.contains("this command is not supported in the prepared statement protocol yet")` can never decide this `||` — every value satisfying `lower.contains("this command is not supported in the prepared statement protocol yet")` also satisfies `lower.contains("prepared statement protocol")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-core/tests/live_mongodb_legacy_agent_commands.rs:266 — `missing.contains("ns not found")` can never decide this `||` — every value satisfying `missing.contains("ns not found")` also satisfies `missing.contains("not found")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-core/src/persistence/cloud_sync.rs:2503 — `normalized.contains("clientsecret")` can never decide this `||` — every value satisfying `normalized.contains("clientsecret")` also satisfies `normalized.contains("secret")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-ai-provider/src/ai_codex_cli.rs:1018 — `lower.contains("the filename or extension is too long")` can never decide this `||` — every value satisfying `lower.contains("the filename or extension is too long")` also satisfies `lower.contains("filename or extension is too long")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/dbx-ai-provider/src/ai_codex_cli.rs:1023 — `lower.contains("not authenticated")` can never decide this `||` — every value satisfying `lower.contains("not authenticated")` also satisfies `lower.contains("auth")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand REDACTED:519 — `strings.HasPrefix(topic, "%RETRY%")` can never decide this `||` — every value satisfying `strings.HasPrefix(topic, "%RETRY%")` also satisfies `strings.HasPrefix(topic, "%R")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand REDACTED:522 — `strings.HasPrefix(topic, "%DLQ%")` can never decide this `||` — every value satisfying `strings.HasPrefix(topic, "%DLQ%")` also satisfies `strings.HasPrefix(topic, "%D")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand .github/scripts/label-pull-request.mjs:126 — `file.startsWith("packages/mcp-server/")` can never decide this `||` — every value satisfying `file.startsWith("packages/mcp-server/")` also satisfies `file.startsWith("packages/mcp-")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D16 · Bus Factor · Off-boarding risk · ×6
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 32 significant file(s) lose their only recent owner: agents/drivers/duckdb/src/schema.rs, apps/desktop/src/composables/useDataGridColumnFormatter.ts, REDACTED, src-tauri/src/commands/mcp_native_installation.rs, deploy/plugin-stats-worker/worker.ts, crates/dbx-plugin-runtime/src/plugins/filesystem.rs, src-tauri/src/plugin_ui_protocol.rs, REDACTED (+24 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 16 significant file(s) lose their only recent owner: crates/dbx-sql-data/src/data_grid_iotdb_sql.rs, apps/desktop/src/lib/dataGrid/dataGridSelectionPersistence.ts, apps/desktop/src/lib/dataGrid/dataGridForeignKeyDisplay.ts, apps/desktop/src/lib/sql/sqlServerRoutineSyntaxDiagnostics.ts, crates/dbx-sql-core/src/sqlserver_temporal.rs, apps/desktop/src/lib/sql/mysqlRoutineSyntaxDiagnostics.ts, apps/desktop/src/lib/updates/componentUpdateOrchestration.ts, apps/desktop/src/lib/connection/sqlServerLegacyCompatibility.ts (+8 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 11 significant file(s) lose their only recent owner: crates/dbx-core/src/admin/nacos/namespace_access.rs, crates/dbx-core/src/admin/nacos/search.rs, crates/dbx-core/src/admin/nacos/prometheus.rs, src-tauri/src/commands/mcp_http_server.rs, src-tauri/src/commands/nacos_cmd.rs, apps/desktop/src/lib/backend/nacos-tauri.ts, apps/desktop/src/types/meilisearchManagement.ts, crates/dbx-core/src/admin/nacos/port.rs (+3 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 5 significant file(s) lose their only recent owner: apps/desktop/src/lib/ai/aiProposalDetect.ts, apps/desktop/src/lib/ai/aiConversationBinding.ts, apps/desktop/src/lib/ai/richContent/aiRichContent.ts, apps/desktop/src/lib/ai/userSkillSelection.ts, apps/desktop/src/stores/userSkillStore.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: apps/desktop/src/lib/database/xuguServerStatus.ts, agents/drivers/xugu/protocol_error.go, apps/desktop/src/lib/sidebar/xuguTablespaces.ts, apps/desktop/src/lib/sidebar/xuguTypeMembers.ts, apps/desktop/src/lib/sidebar/xuguPublicSynonyms.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 3 significant file(s) lose their only recent owner: apps/desktop/src/lib/plugins/pluginFieldConditions.ts, apps/desktop/src/lib/plugins/pluginBottomDock.ts, apps/desktop/src/lib/plugins/pluginAppearance.ts. Pair on, review, or document these before any departure.
X4 · Structured logging · Interpolated log message defeats structured logging · ×6
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1621 — `info!` at line 1621 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1623 — `info!` at line 1623 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1648 — `error!` at line 1648 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1655 — `error!` at line 1655 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1675 — `error!` at line 1675 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/dbx-web/src/main.rs:1696 — `error!` at line 1696 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
D34 · Knowledge Freshness · Orphaned file · ×5
  • Orphaned file apps/desktop/src/lib/database/jdbcxBuiltinDriver.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/document/gridFsBrowser.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/lib/query/queryResultArchive.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file agents/common/src/main/java/com/dbx/agent/JdbcDatabaseInfo.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/desktop/src/stores/productionSafetyStore.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×4
  • Hand-rolled JSON/XML parsing via regex scripts/ai-html-runtime-canary.mjs:145 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex scripts/ai-html-runtime-canary.mjs:146 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex apps/desktop/src/lib/model/modelCodeHighlighter.ts:37 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex apps/desktop/src/lib/ai/aiCodeHighlighter.ts:89 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
AX6 · Interface segregation · Fat interface · ×3
  • Fat interface: EditorToolbarActions (31 required operations) apps/desktop/src/components/layout/editorToolbarActions.ts:23 — `EditorToolbarActions` declares 31 required operations: `newQuery`, `databaseRequiredSignalFor`, `connectionRequiredSignalFor`, `captureExecutionSnapshot`, `toolbarExecute`, `toolbarExecuteAll`, `toolbarExecuteInNewResultTab`, `cancelExecution`, `explain`, `formatSql`, `compressSql`, `toggleSqlKeywordCase`, `saveSql`, `saveAllTabs`, `openSqlFile`, `importResultArchive`, `pasteSqlInCondition`, `multiExecute`, `previewChanges`, `changeConnection`, `changeCatalog`, `changeDatabase`, `changeSchema`, `setDefaultDatabase`, `clearDefaultDatabase`, `activateSettingsPage`, `closeSettingsPage`, `activateDriverStore`, `closeDriverStore`, `activatePluginCenter`, `closePluginCenter`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: QueryEditorSurfaceHandle (23 required operations) apps/desktop/src/components/layout/querySurfaces.ts:15 — `QueryEditorSurfaceHandle` declares 23 required operations: `focusSearch`, `focusWhere`, `openGoToColumn`, `refreshData`, `toggleResultsPane`, `refreshQueryEditorCompletionCache`, `handleModRTarget`, `requestQueryEditorExecute`, `requestQueryEditorExecuteAll`, `captureQueryEditorExecutionSnapshot`, `requestQueryEditorExecuteInNewResultTab`, `requestQueryEditorPreviewChanges`, `shouldBlockQueryEditorExecutionShortcut`, `cancelQueryEditorExecutionViewport`, `acceptQueryEditorExecutionViewport`, `pasteClipboardAsSqlInCondition`, `applyTableStructureChanges`, `insertRedisCommand`, `executeRedisCommand`, `isRedisConsoleReady`, `previewStatementRange`, `focusStatementRange`, `focusErrorPosition`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: UseDataGridLargeValuesOptions (18 required operations) apps/desktop/src/composables/useDataGridLargeValues.ts:49 — `UseDataGridLargeValuesOptions` declares 18 required operations: `gridScrollerElement`, `displayItemAt`, `getRowItem`, `tableColumnForGridColumn`, `formatCell`, `formatCellCached`, `scheduleCanvasDraw`, `clearCellFormatCache`, `invalidateResultEstimate`, `connectionIdentifierQuote`, `getConnectionConfig`, `uuid`, `translate`, `translateBackendError`, `appendDebugLog`, `toast`, `cloneRow`, `cloneRows`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 23 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (101 single-owned of 1780 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1780 of the 2561 production source files in this repository met that bar). They are anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)), anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (2 file(s)) (+17 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: REDACTED, crates/dbx-formats/src/sql_file_zip_package.rs, apps/desktop/src/lib/sql/sqlShortcutActions.ts, apps/desktop/src/lib/editor/hoverTableLookup.ts, apps/desktop/src/lib/connection/connectionPickerTree.ts, apps/desktop/src/lib/dataGrid/dataGridConditionHighlight.ts, apps/desktop/src/lib/sidebar/elasticsearchIndexActions.ts, apps/desktop/src/lib/mongo/mongoQueryResultEditing.ts (+21 more).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 8 of 83 project(s) overshoot their size bounds, lowering Project Cohesion to 8.1/10. The most over is `(repository root)` (462521 LoC, 5759 module-visible types across 140 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 5 of 1780 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1780 of the 2561 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: apps/desktop/src/lib/database/jdbcxBuiltinDriver.ts, apps/desktop/src/lib/document/gridFsBrowser.ts, apps/desktop/src/lib/query/queryResultArchive.ts, agents/common/src/main/java/com/dbx/agent/JdbcDatabaseInfo.java, apps/desktop/src/stores/productionSafetyStore.ts. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 28/87 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `agents/drivers/access`, `agents/drivers/bigquery`, `agents/drivers/cache`, `agents/drivers/cassandra-go`, `agents/drivers/databend` and 54 more.
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations agents/drivers/zookeeper/integration_test.go — A Go testing.B suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
R7 · Dead Code · Unused export 'resolvePlDebugProbe' · ×1
  • Unused export 'resolvePlDebugProbe' apps/desktop/src/components/debug/plDebugLaunch.ts:46 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DATA_GRID_DISTINCT_VALUE_DEBOUNCE_MS' · ×1
  • Unused export 'DATA_GRID_DISTINCT_VALUE_DEBOUNCE_MS' apps/desktop/src/composables/useDataGridDistinctValueLoader.ts:11 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'schemaDiffSessionNextProgressStep' · ×1
  • Unused export 'schemaDiffSessionNextProgressStep' apps/desktop/src/composables/useSchemaDiffSession.ts:438 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'runAiAction' · ×1
  • Unused export 'runAiAction' apps/desktop/src/lib/ai/ai.ts:283 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'runAiStream' · ×1
  • Unused export 'runAiStream' apps/desktop/src/lib/ai/ai.ts:295 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'extractSql' · ×1
  • Unused export 'extractSql' apps/desktop/src/lib/ai/ai.ts:378 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'formatCouchDbDocumentOperationPreview' · ×1
  • Unused export 'formatCouchDbDocumentOperationPreview' apps/desktop/src/lib/app/documentStoreSave.ts:24 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'detachedTabId' · ×1
  • Unused export 'detachedTabId' apps/desktop/src/lib/app/windowContext.ts:127 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PlainConfigPayload' · ×1
  • Unused export 'PlainConfigPayload' apps/desktop/src/lib/backend/configCrypto.ts:9 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'formatErrorWithContext' · ×1
  • Unused export 'formatErrorWithContext' apps/desktop/src/lib/backend/errorUtils.ts:373 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugProbe' · ×1
  • Unused export 'plDebugProbe' apps/desktop/src/lib/backend/pl-debug-tauri.ts:245 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugExecute' · ×1
  • Unused export 'plDebugExecute' apps/desktop/src/lib/backend/pl-debug-tauri.ts:340 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugSetValue' · ×1
  • Unused export 'plDebugSetValue' apps/desktop/src/lib/backend/pl-debug-tauri.ts:348 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugSetExceptionBreakpoint' · ×1
  • Unused export 'plDebugSetExceptionBreakpoint' apps/desktop/src/lib/backend/pl-debug-tauri.ts:353 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugStepOut' · ×1
  • Unused export 'plDebugStepOut' apps/desktop/src/lib/backend/pl-debug-tauri.ts:374 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'plDebugAbort' · ×1
  • Unused export 'plDebugAbort' apps/desktop/src/lib/backend/pl-debug-tauri.ts:378 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DATABASE_BACKUP_CONFIG_CHANGED_EVENT' · ×1
  • Unused export 'DATABASE_BACKUP_CONFIG_CHANGED_EVENT' REDACTED:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'writeDatabaseBackupSchedules' · ×1
  • Unused export 'writeDatabaseBackupSchedules' REDACTED:439 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'writeDatabaseBackupRuns' · ×1
  • Unused export 'writeDatabaseBackupRuns' REDACTED:450 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'findJsonTreeMatches' · ×1
  • Unused export 'findJsonTreeMatches' apps/desktop/src/lib/common/jsonTreeSearch.ts:48 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'TEXT_DIFF_MAX_CHARACTER_DIFF_CHARACTERS' · ×1
  • Unused export 'TEXT_DIFF_MAX_CHARACTER_DIFF_CHARACTERS' apps/desktop/src/lib/common/textDiff.ts:22 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'databaseInfoSummary' · ×1
  • Unused export 'databaseInfoSummary' apps/desktop/src/lib/connection/connectionDatabaseInfo.ts:112 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isLocalFileDb' · ×1
  • Unused export 'isLocalFileDb' apps/desktop/src/lib/connection/connectionFile.ts:59 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'layerReferencesProfile' · ×1
  • Unused export 'layerReferencesProfile' apps/desktop/src/lib/connection/tunnelProfiles.ts:88 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'capabilityStatus' · ×1
  • Unused export 'capabilityStatus' apps/desktop/src/lib/consul/consulPolicy.ts:15 — Nothing imports this binding — it is safe to review for removal.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete docs/public/_headers:1 — Set: Referrer-Policy, X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−1.5 on this card.)
X2 · Cancellation propagation · Not all functions that make a request accept a context.Context or an AbortSignal · ×1
  • Not all functions that make a request accept a context.Context or an AbortSignal — Only 18/66 functions that make a cancellable request (fetch, axios, ky, ofetch; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 3/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~2.4 `!` null assertions per 1k TypeScript source lines — 1204 assertion(s) across the 496233 source line(s) of the 1511 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: apps/desktop/src/stores/queryStore.ts (88), apps/desktop/src/components/transfer/queryResultTransferDdl.ts (39), apps/desktop/src/stores/connectionStore.ts (34). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugNative.java:285 — `matchNativeNames` returns `List.of()` when `NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
Minor — 8 finding(s)
D12 · Dependency Hygiene · Outdated · ×7
  • Outdated: gitee.com/XuguDB/go-xugu-driver — `gitee.com/XuguDB/go-xugu-driver` is required at v1.0.12 in agents/drivers/xugu/go.mod, but v1.0.16 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gitee.com/XuguDB/go-xugu-driver@v1.0.16 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/apache/thrift — `github.com/apache/thrift` is required at v0.22.0 in agents/go-common/gohive/go.mod, but v0.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/apache/thrift@v0.25.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/apache/thrift — `github.com/apache/thrift` is required at v0.24.0 in REDACTED, but v0.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/apache/thrift@v0.25.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: github.com/rabbitmq/amqp091-go — `github.com/rabbitmq/amqp091-go` is required at v1.13.0 in REDACTED, but v1.16.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rabbitmq/amqp091-go@v1.16.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: golang.org/x/net — `golang.org/x/net` is required at v0.57.0 in REDACTED, but v0.61.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/net@v0.61.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: golang.org/x/net — `golang.org/x/net` is required at v0.41.0 in agents/go-common/gohive/go.mod, but v0.61.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/net@v0.61.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
  • Outdated: golang.org/x/text — `golang.org/x/text` is required at v0.22.0 in REDACTED, but v0.43.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/text@v0.43.0 && go mod tidy` and commit the updated REDACTED and REDACTED.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: dbx-agents:common — dbx-agents:common: abstractness 0.17, instability 0.00, distance 0.83 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8c03f863b6204e5a816b2cc26050dedd/history.json --exit-code 0 --source .15artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8c03f863b6204e5a816b2cc26050dedd/tree.json --exit-code 0 --source .8artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude agents/go-common/iotdb-client-go/common --exclude agents/go-common/iotdb-client-go/rpc --exclude apps/desktop/src/__tests__ --exclude apps/desktop/src/components/admin/__tests__ --exclude apps/desktop/src/components/ai/rich/__tests__ --exclude apps/desktop/src/components/backup/__tests__ --exclude apps/desktop/src/components/chart/__tests__ --exclude apps/desktop/src/components/codeSnapshot/__tests__ --exclude apps/desktop/src/components/common/__tests__ --exclude apps/desktop/src/components/config/__tests__ --exclude apps/desktop/src/components/connection/__tests__ --exclude apps/desktop/src/components/consul/__tests__ --exclude apps/desktop/src/components/debug/__tests__ --exclude apps/desktop/src/components/diagram/__tests__ --exclude apps/desktop/src/components/diff/__tests__ --exclude apps/desktop/src/components/docs/__tests__ --exclude apps/desktop/src/components/document/__tests__ --exclude apps/desktop/src/components/editor/__tests__ --exclude apps/desktop/src/components/etcd/__tests__ --exclude apps/desktop/src/components/explain/__tests__ --exclude apps/desktop/src/components/export/__tests__ --exclude apps/desktop/src/components/generate/params/__tests__ --exclude apps/desktop/src/components/graph/__tests__ --exclude apps/desktop/src/components/grid/__tests__ --exclude apps/desktop/src/components/import/__tests__ --exclude apps/desktop/src/components/kv/__tests__ --exclude apps/desktop/src/components/layout/__tests__ --exclude apps/desktop/src/components/mcp/__tests__ --exclude apps/desktop/src/components/meilisearch/__tests__ --exclude apps/desktop/src/components/mq/__tests__ --exclude apps/desktop/src/components/mqtt/__tests__ --exclude apps/desktop/src/components/nacos/__tests__ --exclude apps/desktop/src/components/objects/__tests__ --exclude apps/desktop/src/components/plugins/__tests__ --exclude apps/desktop/src/components/quick-open/__tests__ --exclude apps/desktop/src/components/redis/__tests__ --exclude apps/desktop/src/components/search/__tests__ --exclude apps/desktop/src/components/settings/__tests__ --exclude apps/desktop/src/components/sidebar/__tests__ --exclude apps/desktop/src/components/ssh/__tests__ --exclude apps/desktop/src/components/structure/__tests__ --exclude apps/desktop/src/components/transfer/__tests__ --exclude apps/desktop/src/components/ui/__tests__ --exclude apps/desktop/src/components/ui/dialog/__tests__ --exclude apps/desktop/src/components/ui/input/__tests__ --exclude apps/desktop/src/components/ui/searchable-select/__tests__ --exclude apps/desktop/src/components/vector/__tests__ --exclude apps/desktop/src/components/zookeeper/__tests__ --exclude apps/desktop/src/composables/__tests__ --exclude apps/desktop/src/directives/__tests__ --exclude apps/desktop/src/docs/__tests__ --exclude apps/desktop/src/docs-export/__tests__ --exclude apps/desktop/src/i18n/__tests__ --exclude apps/desktop/src/lib/__tests__ --exclude apps/desktop/src/lib/ai/__tests__ --exclude apps/desktop/src/lib/ai/richContent/__tests__ --exclude apps/desktop/src/lib/app/__tests__ --exclude apps/desktop/src/lib/backend/__tests__ --exclude apps/desktop/src/lib/codeSnapshot/__tests__ --exclude apps/desktop/src/lib/common/__tests__ --exclude apps/desktop/src/lib/connection/__tests__ --exclude apps/desktop/src/lib/consul/__tests__ --exclude apps/desktop/src/lib/dataGrid/__tests__ --exclude apps/desktop/src/lib/database/__tests__ --exclude apps/desktop/src/lib/debug/__tests__ --exclude apps/desktop/src/lib/diagnostics/__tests__ --exclude apps/desktop/src/lib/diagram/__tests__ --exclude apps/desktop/src/lib/docs/__tests__ --exclude apps/desktop/src/lib/driverStore/__tests__ --exclude apps/desktop/src/lib/editor/__tests__ --exclude apps/desktop/src/lib/etcd/__tests__ --exclude apps/desktop/src/lib/export/__tests__ --exclude apps/desktop/src/lib/format/__tests__ --exclude apps/desktop/src/lib/globalSearch/__tests__ --exclude apps/desktop/src/lib/gridSnapshot/__tests__ --exclude apps/desktop/src/lib/history/__tests__ --exclude apps/desktop/src/lib/influxdb/__tests__ --exclude apps/desktop/src/lib/metadata/__tests__ --exclude apps/desktop/src/lib/mongo/__tests__ --exclude apps/desktop/src/lib/mq/__tests__ --exclude apps/desktop/src/lib/nacos/__tests__ --exclude apps/desktop/src/lib/naming/__tests__ --exclude apps/desktop/src/lib/navigation/__tests__ --exclude apps/desktop/src/lib/plugins/__tests__ --exclude apps/desktop/src/lib/query/__tests__ --exclude apps/desktop/src/lib/redis/__tests__ --exclude apps/desktop/src/lib/redis/codec/__tests__ --exclude apps/desktop/src/lib/schema/__tests__ --exclude apps/desktop/src/lib/settings/__tests__ --exclude apps/desktop/src/lib/sidebar/__tests__ --exclude apps/desktop/src/lib/soql/__tests__ --exclude apps/desktop/src/lib/sql/__tests__ --exclude apps/desktop/src/lib/sqlserver/__tests__ --exclude apps/desktop/src/lib/table/__tests__ --exclude apps/desktop/src/lib/tabs/__tests__ --exclude apps/desktop/src/lib/ui/__tests__ --exclude apps/desktop/src/lib/updates/__tests__ --exclude apps/desktop/src/stores/__tests__ --exclude apps/desktop/src/styles/__tests__ --exclude apps/desktop/src/types/generated --exclude packages/app-tests --exclude packages/mcp-server/tests --exclude packages/plugin-cli/tests --exclude vendor/tauri-plugin-updater/permissions/autogenerated/commands .574artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update97artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .31artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 63 file(s) — `.github/scripts/suggest-similar-issues.mjs`, `agents/drivers/oceanbase-oracle/src/main/java/com/dbx/agent/oceanbaseoracle/PlDebugManager.java`, `apps/desktop/src/components/editor/queryEditorCodeMirrorRuntime.ts`, `apps/desktop/src/components/editor/queryEditorSqlExtensions.ts`, `apps/desktop/src/components/editor/useQueryEditorBatchSelection.ts`, … (+58 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17b1f-434e-740d-b305-1c1031a015a3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md