refactor: split suppressed functions to meet clippy caps#82
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()andrun_pipeline(),bin/pickscribe.rs transcribe_incremental_segment(), andengine/incremental.rs run()— the last converting a labeled loop into aProgressenum returned fromadvance()(the one necessary structural change; branch order, sleep points, and terminal outcomes preserved 1:1, covered by the existing 9incremental::tests::run_*cases).Validated:
cargo clippy --workspace --all-targets -- -D warningsclean (twice, once aftercargo clean),cargo test --workspace --locked --all-targetsall 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