Repository Analysis

spacedriveapp/spacedrive

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-04-19
Last Push
38,139
Stars
Rust
Language
382,603
Lines of Code
1995
Files
401
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 67LOW 333

Pattern Findings

401 matches across 11 categories. Click a row to expand file-level details.

Over-Commented Block251 hits · 251 pts
SeverityFileLineSnippet
LOWAGENTS.md421````rust
LOWcrates/crypto/src/protected.rs1//! This is a basic wrapper for secret/hidden values
LOWcrates/crypto/src/protected.rs21//! use sd_crypto::Protected;
LOWcrates/crypto/src/erase.rs1use crate::{rng::CryptoRng, Error};
LOWcrates/crypto/src/cookie.rs101 }
LOWcrates/crypto/src/cookie.rs181
LOWcrates/archive/Cargo.toml21# Archive-specific dependencies - workspace versions
LOWcrates/archive/src/lib.rs1//! # sd-archive — Spacedrive's Data Archival System
LOWcrates/archive/src/lib.rs21//!
LOWcrates/fs-watcher/src/lib.rs1//! Platform-agnostic filesystem watcher
LOWcrates/fs-watcher/src/lib.rs21//! - **Broadcast Events**: Multiple subscribers can receive events concurrently
LOWcrates/fs-watcher/src/lib.rs41//! while let Ok(event) = rx.recv().await {
LOWcrates/fs-watcher/src/event.rs1//! Filesystem event types
LOWcrates/fs-watcher/src/watcher.rs161/// Platform-agnostic filesystem watcher
LOWcrates/fs-watcher/src/platform/macos.rs1//! macOS-specific event handler
LOWcrates/fs-watcher/src/platform/mod.rs1//! Platform-specific event handlers
LOWcrates/fs-watcher/src/platform/mod.rs21#[cfg(target_os = "windows")]
LOWcrates/images/src/consts.rs21pub const HEIF_EXTENSIONS: [&str; 8] = [
LOWcrates/images/src/error.rs21 // these errors are either: reliant on external (C dependencies), or are extremely niche
LOWcrates/job-derive/src/lib.rs1//! Derive macros for automatic job registration
LOWcrates/task-system/src/error.rs21/// error type.
LOWcrates/task-system/src/lib.rs1//!
LOWcrates/task-system/src/lib.rs21//! use async_trait::async_trait;
LOWcrates/task-system/src/lib.rs41//! async fn run(&mut self, _interrupter: &Interrupter) -> Result<ExecStatus, SampleError> {
LOWcrates/sdk/API_REFERENCE.md341
LOWcrates/sdk/src/lib.rs1//! Spacedrive Extension SDK
LOWcrates/sdk/src/models.rs1//! Extension Data Models - Person, Album, Place, etc.
LOWcrates/log-analyzer/src/lib.rs1//! Log analysis system for Spacedrive.
LOWcrates/media-metadata/src/exif/consts.rs1use exif::Tag;
LOWcrates/media-metadata/src/exif/geographic/location.rs21}
LOWcrates/media-metadata/src/exif/geographic/location.rs101 reader
LOWcrates/media-metadata/src/exif/geographic/location.rs121 pub const fn coordinates(&self) -> (f64, f64) {
LOWcrates/media-metadata/src/exif/geographic/location.rs141 /// This also re-generates the Plus Code for your coordinates
LOWcrates/media-metadata/src/exif/geographic/location.rs161 /// ```
LOWcrates/media-metadata/src/exif/geographic/location.rs181 #[inline]
LOWcrates/media-metadata/src/exif/geographic/location.rs221}
LOWcrates/sdk-macros/src/lib.rs21 extension::extension_impl(args, input)
LOWcore/tests/normalized_cache_fixtures_test.rs1//! Normalized Cache Fixtures Test
LOWcore/tests/file_sync_test.rs1//! File Sync Integration Test
LOWcore/tests/transitive_sync_backfill_test.rs1//! Transitive Sync Backfill Test
LOWcore/tests/file_move_test.rs1//! Integration tests for file move operations
LOWcore/tests/ephemeral_bridge_test.rs1//! Ephemeral Directory Event Streaming Bridge Test
LOWcore/tests/event_system_test.rs1//! Event System Integration Test
LOWcore/tests/sync_backfill_race_test.rs1//! Backfill + Live Events Race Condition Test
LOWcore/tests/sync_realtime_test.rs1//! Real-Time Sync Integration Test
LOWcore/tests/typescript_bridge_test.rs1//! TypeScript Integration Test Bridge
LOWcore/tests/indexing_responder_reindex_test.rs1//! Watcher integration test for moving folders into managed locations
LOWcore/tests/sync_setup_test.rs521
LOWcore/tests/search_test.rs1//! Integration tests for search functionality
LOWcore/tests/proxy_pairing_test.rs1//! Proxy pairing test using the cargo test subprocess framework
LOWcore/tests/folder_rename_test.rs1//! Integration tests for folder rename operations
LOWcore/examples/indexing_demo.rs1//! Desktop Indexing Demo - Production Indexer Showcase
LOWcore/benchmarks/src/cli/commands.rs21 #[arg(short, long)]
LOWcore/benchmarks/src/cli/commands.rs41 /// Directory containing recipe YAML files
LOWcore/benchmarks/src/cli/commands.rs61 dataset_root: Option<PathBuf>,
LOWcore/src/infra/extension/mod.rs1//! WASM Plugin System
LOWcore/src/infra/extension/host_functions.rs21 pub api_dispatcher: Arc<crate::infra::api::ApiDispatcher>, // For creating sessions
LOWcore/src/infra/extension/host_functions.rs401 // TODO: Update metrics
LOWcore/src/infra/wire/type_extraction.rs301/// Intermediate struct to hold API function metadata for Swift code generation
LOWcore/src/infra/wire/mod.rs1//! Wire protocol and type system infrastructure
191 more matches not shown…
Decorative Section Separators47 hits · 140 pts
SeverityFileLineSnippet
MEDIUMcrates/archive/src/engine.rs125 // ── Public API ──────────────────────────────────────────────────────
MEDIUMadapters/safari-history/adapter.toml34# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/macos-contacts/sync.py100 # ── Load groups ──────────────────────────────────────────────────
MEDIUMadapters/macos-contacts/sync.py114 # ── Load group memberships ───────────────────────────────────────
MEDIUMadapters/macos-contacts/sync.py129 # ── Load contacts ────────────────────────────────────────────────
MEDIUMadapters/macos-contacts/adapter.toml21# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/github/sync.py118 # ── Determine repos to index ─────────────────────────────────────────
MEDIUMadapters/github/sync.py138 # ── Upsert repository ────────────────────────────────────────────
MEDIUMadapters/github/sync.py164 # ── Fetch issues (and PRs if enabled) ────────────────────────────
MEDIUMadapters/github/sync.py238 # ── Fetch comments for this issue ────────────────────────────
MEDIUMadapters/github/adapter.toml49# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/slack/sync.py70 # ── Load users for display name lookup ───────────────────────────────
MEDIUMadapters/slack/sync.py88 # ── Load channels ────────────────────────────────────────────────────
MEDIUMadapters/slack/sync.py129 # ── Load messages from channel folders ───────────────────────────────
MEDIUMadapters/slack/adapter.toml33# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/obsidian/adapter.toml32# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/apple-notes/sync.py82 # ── Sync folders ──────────────────────────────────────────────────
MEDIUMadapters/apple-notes/sync.py118 # ── Sync notes ────────────────────────────────────────────────────
MEDIUMadapters/apple-notes/adapter.toml21# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/chrome-history/adapter.toml41# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/chrome-bookmarks/adapter.toml25# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/gmail/sync.py26# ── Constants ────────────────────────────────────────────────────────────────
MEDIUMadapters/gmail/sync.py33# ── Helpers ──────────────────────────────────────────────────────────────────
MEDIUMadapters/gmail/sync.py174# ── Sync Logic ───────────────────────────────────────────────────────────────
MEDIUMadapters/gmail/sync.py431# ── Main ─────────────────────────────────────────────────────────────────────
MEDIUMadapters/gmail/adapter.toml72# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/opencode/sync.py132 # ── Fetch sessions ──────────────────────────────────────────────
MEDIUMadapters/opencode/sync.py164 # ── Fetch messages for this session ─────────────────────────
MEDIUMadapters/opencode/sync.py175 # ── Fetch parts for all messages in this session ────────────
MEDIUMadapters/opencode/sync.py194 # ── Aggregate session stats ─────────────────────────────────
MEDIUMadapters/opencode/sync.py251 # ── Emit session ────────────────────────────────────────────
MEDIUMadapters/opencode/sync.py274 # ── Emit messages ───────────────────────────────────────────
MEDIUMadapters/opencode/adapter.toml41# ── Data type schema ────────────────────────────────────────────────────
MEDIUMadapters/macos-calendar/sync.py96 # ── Load calendars ───────────────────────────────────────────────
MEDIUMadapters/macos-calendar/sync.py139 # ── Load events ──────────────────────────────────────────────────
MEDIUMadapters/macos-calendar/adapter.toml26# ── Data type schema ────────────────────────────────────────────────────
MEDIUM.tasks/core/VSS-005-cli-integration.md62# ┌──────────────┬────────────┬────────┬──────────┬──────────┐
MEDIUM.tasks/core/VSS-005-cli-integration.md64# ├──────────────┼────────────┼────────┼──────────┼──────────┤
MEDIUM.tasks/core/VSS-005-cli-integration.md69# └──────────────┴────────────┴────────┴──────────┴──────────┘
MEDIUM.tasks/core/VSS-005-cli-integration.md87# ┌──────────────┬───────┬──────────┬──────────┐
MEDIUM.tasks/core/VSS-005-cli-integration.md89# ├──────────────┼───────┼──────────┼──────────┤
MEDIUM.tasks/core/VSS-005-cli-integration.md95# ├──────────────┼───────┼──────────┼──────────┤
MEDIUM.tasks/core/VSS-005-cli-integration.md97# └──────────────┴───────┴──────────┴──────────┘
MEDIUM.tasks/core/VSS-005-cli-integration.md114# ┌──────────────┬─────────┬─────────┬──────────┐
MEDIUM.tasks/core/VSS-005-cli-integration.md116# ├──────────────┼─────────┼─────────┼──────────┤
MEDIUM.tasks/core/VSS-005-cli-integration.md120# └──────────────┴─────────┴─────────┴──────────┘
MEDIUMapps/cli/src/domains/redundancy/mod.rs135// ─── rendering helpers ────────────────────────────────────────────────────────
Verbosity Indicators39 hits · 61 pts
SeverityFileLineSnippet
LOWcore/tests/sync_backfill_race_test.rs343 // Step 1: Alice indexes first location
LOWcore/tests/sync_backfill_race_test.rs385 // Step 2: Start backfill on Bob while Alice continues indexing
LOWcore/tests/sync_backfill_race_test.rs412 // Step 3: Wait for everything to stabilize
LOWcore/tests/sync_backfill_race_test.rs419 // Step 4: Compare results
LOWcore/tests/volume_detection_test.rs449 // Step 1: Check if paths are on same physical storage
LOWcore/tests/volume_detection_test.rs455 // Step 2: Get volumes for both paths
LOWcore/tests/volume_detection_test.rs467 // Step 3: Select copy strategy
LOWcore/tests/volume_detection_test.rs483 // Step 4: Verify expected behavior
LOWcore/src/infra/daemon/rpc.rs452 // Step 1: Get buffered events BEFORE registering connection
LOWcore/src/infra/daemon/rpc.rs458 // Step 2: Register connection for event streaming (starts receiving live events)
LOWcore/src/infra/daemon/rpc.rs469 // Step 3: Send buffered events in chronological order
LOWcore/src/ops/indexing/database_storage.rs732 // Step 1: Delete all ancestor relationships for the moved subtree, but preserve internal
LOWcore/src/ops/indexing/database_storage.rs743 // Step 2: Reconnect the subtree under the new parent by creating closure rows for all
LOWcore/src/ops/indexing/verify/action.rs60 // Step 1: Scan filesystem to get current state
LOWcore/src/ops/indexing/verify/action.rs63 // Step 2: Query database for existing entries in this path
LOWcore/src/ops/indexing/verify/action.rs66 // Step 3: Compare and generate report
LOWcore/src/ops/indexing/phases/processing.rs715 // Step 4: Perform the actual database deletion
LOWcore/src/volume/fs/mod.rs101 // Step 1: resolve mount point root (e.g. "C:\")
LOWcore/src/volume/fs/mod.rs109 // Step 2: get stable volume GUID path
LOWadapters/gmail/sync.py462 # Step 1: Sync labels (always full)
LOWadapters/gmail/sync.py465 # Step 2: Sync messages
LOW…ges/interface/src/components/modals/SyncSetupModal.tsx221// Step 1: Select Device
LOW…ges/interface/src/components/modals/SyncSetupModal.tsx293// Step 2: Choose Action
LOW…ges/interface/src/components/modals/SyncSetupModal.tsx419// Step 3: Confirm
LOW…ges/interface/src/components/modals/SyncSetupModal.tsx479// Step 4: Executing
LOW…ace/src/routes/explorer/components/AddStorageModal.tsx532 // Step 1: Track the volume
LOW…ace/src/routes/explorer/components/AddStorageModal.tsx538 // Step 2: Create a location for the volume's mount point
LOW…ace/src/routes/explorer/components/AddStorageModal.tsx701 // Step 1: Add the cloud volume and get fingerprint
LOW…ace/src/routes/explorer/components/AddStorageModal.tsx727 // Step 2: Create a location for the cloud volume so it gets indexed
LOW…s-client/tests/integration/ephemeral-streaming.test.ts73 // Step 1: Subscribe FIRST
LOW…s-client/tests/integration/ephemeral-streaming.test.ts102 // Step 2: Query the directory listing (triggers ephemeral indexing)
LOW…s-client/tests/integration/ephemeral-streaming.test.ts124 // Step 3: Wait for events to arrive
LOW…s-client/tests/integration/ephemeral-streaming.test.ts137 // Step 4: Verify events arrived
LOW…s-client/tests/integration/ephemeral-streaming.test.ts207 // Step 1: Query FIRST (triggers indexing, events go to buffer)
LOW…s-client/tests/integration/ephemeral-streaming.test.ts228 // Step 2: Subscribe AFTER query (late subscriber)
LOWapps/cli/src/domains/library/mod.rs271 // Step 1: Select local library
LOWapps/cli/src/domains/library/mod.rs298 // Step 2: Select remote device from paired devices
LOWapps/cli/src/domains/library/mod.rs334 // Step 3: Discover remote libraries
LOWapps/cli/src/domains/library/mod.rs346 // Step 4: Select sync action
Excessive Try-Catch Wrapping24 hits · 32 pts
SeverityFileLineSnippet
LOWadapters/safari-history/sync.py77 except Exception as e:
MEDIUMadapters/safari-history/sync.py47def main():
LOWadapters/macos-contacts/sync.py92 except Exception as e:
MEDIUMadapters/macos-contacts/sync.py66def main():
LOWadapters/github/sync.py127 except Exception as e:
LOWadapters/github/sync.py145 except Exception as e:
LOWadapters/github/sync.py175 except Exception as e:
LOWadapters/github/sync.py262 except Exception as e:
LOWadapters/obsidian/sync.py193 except Exception as e:
LOWadapters/apple-notes/sync.py74 except Exception as e:
MEDIUMadapters/apple-notes/sync.py47def main():
LOWadapters/chrome-history/sync.py77 except Exception as e:
MEDIUMadapters/chrome-history/sync.py42def main():
LOWadapters/chrome-bookmarks/sync.py110 except Exception as e:
MEDIUMadapters/chrome-bookmarks/sync.py87def main():
LOWadapters/gmail/sync.py170 except Exception:
LOWadapters/gmail/sync.py336 except Exception:
LOWadapters/gmail/sync.py492 except Exception as e:
LOWadapters/opencode/sync.py124 except Exception as e:
MEDIUMadapters/opencode/sync.py94def main():
LOWadapters/macos-calendar/sync.py88 except Exception as e:
MEDIUMadapters/macos-calendar/sync.py60def main():
MEDIUM…s/swift-client/Examples/LibraryManagementExample.swift52 print("Error: \(error)")
MEDIUM…client/Sources/SpacedriveClient/SpacedriveClient.swift503 print("Error details: \(error.localizedDescription)")
AI Slop Vocabulary8 hits · 24 pts
SeverityFileLineSnippet
MEDIUMcore/benchmarks/src/cli/commands.rs11#[command(about = "Spacedrive benchmarking harness", long_about = None)]
MEDIUMcore/src/infra/action/mod.rs3//! This module provides a centralized, robust, and extensible layer for handling
MEDIUMcore/src/infra/job/traits.rs78 // Try named first (more robust to field reordering/additions), fallback to non-named for legacy
MEDIUMcore/src/infra/event/log_emitter.rs168 // Simple field extraction (this could be more robust)
MEDIUMcore/src/ops/indexing/change_detection/detector.rs82 // Create a persistent writer adapter to leverage the unified query logic
MEDIUMcore/src/service/network/core/mod.rs1756 /// Enhanced pairing request sending with robust active polling
MEDIUMcore/src/service/file_sync/mod.rs194 // In production, this should be more robust
MEDIUMcore/src/volume/fs/zfs.rs171 // Use fast copy strategy for ZFS (can leverage clones)
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippet
LOWcrates/sd-client/test.sh42# Check if daemon socket exists
LOWcore/scripts/test_daemon.sh14# Check if daemon is still running
LOWadapters/gmail/sync.py482 # Set cursor to current history ID for next incremental sync
LOWscripts/test-data.sh10# Check if curl and tar are available
LOWapps/server/build-for-truenas.sh15# Check if buildx is available
LOWapps/server/docker-run.sh9# Check if .env exists
LOWapps/server/docker-run.sh20# Check if docker-compose is available
LOWapps/gpui-photo-grid/run.sh47# Check if daemon is running
Deep Nesting10 hits · 10 pts
SeverityFileLineSnippet
LOWadapters/macos-contacts/sync.py66
LOWadapters/github/sync.py30
LOWadapters/github/sync.py97
LOWadapters/slack/sync.py49
LOWadapters/obsidian/sync.py63
LOWadapters/gmail/sync.py46
LOWadapters/gmail/sync.py265
LOWadapters/opencode/sync.py56
LOWadapters/opencode/sync.py94
LOWadapters/macos-calendar/sync.py60
Slop Phrases3 hits · 8 pts
SeverityFileLineSnippet
MEDIUMcrates/crypto/src/protected.rs3//! It's worth noting that this wrapper does not provide additional security that you can't get manually, it just makes
MEDIUMcrates/images/src/heif.rs66 // This implementation is **ENTIRELY** untested, as I'm unable to source
MEDIUMapps/tauri/src-tauri/gen/schemas/acl-manifests.json1{"clipboard-manager":{"default_permission":{"identifier":"default","description":"No features are enabled by default, as
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHcore/src/domain/memory/types.rs20 /// AI-generated or user-written summary
Fake / Example Data5 hits · 6 pts
SeverityFileLineSnippet
LOWAGENTS.md433//! let input = ShareFileInput { file_id: 123, recipient: "user@example.com" };
LOWcrates/archive/README.md37 "email": "user@example.com"
LOWcrates/archive/README.md156{"email": "user@example.com", "cursor": "abc123"}
LOWcore/tests/typescript_bridge_test.rs294 "Lorem ipsum dolor sit amet. ".repeat(100)
LOWcore/tests/typescript_bridge_test.rs294 "Lorem ipsum dolor sit amet. ".repeat(100)
Hyper-Verbose Identifiers5 hits · 5 pts
SeverityFileLineSnippet
LOWadapters/gmail/sync.py265def sync_messages_incremental(token: str, user: str, history_id: str, max_results: int):
LOW…kages/interface/src/contexts/WebContextMenuContext.tsx26export function useWebContextMenuController(): WebContextMenuController | null {
LOW…/src/components/overlays/DaemonDisconnectedOverlay.tsx35export function DaemonDisconnectedOverlay({
LOWapps/tauri/src/contextMenu.ts56export function initializeContextMenuHandler() {
LOWapps/tauri/src/updater.example.ts279export function startPeriodicUpdateChecks(