Skip to content

refactor: split suppressed functions to meet clippy caps#82

Merged
ElbertePlinio merged 1 commit into
mainfrom
refactor/split-suppressions
Jul 24, 2026
Merged

refactor: split suppressed functions to meet clippy caps#82
ElbertePlinio merged 1 commit into
mainfrom
refactor/split-suppressions

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Removes the six legacy clippy suppression sites tracked by #63 (too_many_lines / cognitive_complexity) via behavior-preserving extraction: lib.rs run(), file_job.rs run_file_job(), engine.rs start() and run_pipeline(), bin/pickscribe.rs transcribe_incremental_segment(), and engine/incremental.rs run() — the last converting a labeled loop into a Progress enum returned from advance() (the one necessary structural change; branch order, sleep points, and terminal outcomes preserved 1:1, covered by the existing 9 incremental::tests::run_* cases).

Validated: cargo clippy --workspace --all-targets -- -D warnings clean (twice, once after cargo clean), cargo test --workspace --locked --all-targets all green. Independent behavior-preservation review: zero findings (control flow, lock scope, drop timing, moves, error propagation all confirmed unchanged).

grep -rn "allow(clippy" is now empty — completes the last checklist item of #63.

Closes #63.

🤖 Generated with Claude Code

Splits the six legacy oversized/complex functions tracked in #63 into
behavior-preserving helpers so the enforced too_many_lines and
cognitive_complexity caps pass without #[allow(...)] escapes:

- src-tauri/src/lib.rs run(): init_sentry/setup_app/handle_run_event
- src-tauri/src/file_job.rs run_file_job(): execute_file_job/
  convert_and_transcribe/clean_transcript_if_requested
- src-tauri/src/engine.rs start(): reject_unsupported_platform/
  start_recorder/begin_recording_session/spawn_recorder_warmup_check/
  spawn_level_meter
- src-tauri/src/engine.rs run_pipeline(): fail_session/
  acquire_transcript/clean_and_deliver
- src/bin/pickscribe.rs transcribe_incremental_segment():
  transcribe_with_custom_command/transcribe_with_whisper_cpp
- src/engine/incremental.rs run(): advance/compute_segment_bounds/
  produce_segment (labeled-loop control flow becomes a Progress enum)
@ElbertePlinio
ElbertePlinio merged commit bd08321 into main Jul 24, 2026
4 checks passed
@ElbertePlinio
ElbertePlinio deleted the refactor/split-suppressions branch July 24, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install enforced CI gate baseline

1 participant