Skip to content

confluence-mdx: 코드 품질 리팩토링 3건 (함수 추출 + 테스트 추가)#803

Merged
jk-kim0 merged 3 commits intomainfrom
refactor/code-quality-3
Feb 18, 2026
Merged

confluence-mdx: 코드 품질 리팩토링 3건 (함수 추출 + 테스트 추가)#803
jk-kim0 merged 3 commits intomainfrom
refactor/code-quality-3

Conversation

@jk-kim0
Copy link
Copy Markdown
Contributor

@jk-kim0 jk-kim0 commented Feb 18, 2026

Summary

  • patch_builder.py의 3곳 중복 containing_changes 패턴을 _flush_containing_changes() 공통 함수로 추출합니다
  • build_patches() 루프의 매핑 해석 로직을 _resolve_mapping_for_change()로 분리하여 순환 복잡도를 감소합니다
  • reverse_sync_cli.pyrun_verify() God Function에서 _parse_and_diff(), _save_diff_yaml(), _compile_result() 3개 함수를 추출합니다
  • 추출한 함수에 대한 유닛 테스트 17건을 추가합니다

Test plan

  • 유닛 테스트 649/649 passed
  • E2E reverse-sync 16/16 passed
  • Byte-equal fast-path 21/21 passed
  • Byte-equal forced-splice 21/21 passed

🤖 Generated with Claude Code

jk-kim0 and others added 3 commits February 18, 2026 00:58
build_patches, build_table_row_patches, build_list_item_patches 3곳의
동일한 containing_changes 순회+패치 생성 로직을 헬퍼 함수로 통합합니다.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
build_patches() 루프 내부의 복잡한 매핑 해석 분기(순환 복잡도 ~12-15)를
별도 함수로 분리하여 strategy 기반 디스패치로 단순화합니다.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…_yaml, _compile_result를 추출합니다

151줄의 run_verify()에서 독립적인 3개 단계를 별도 함수로 분리하여
각 단계를 개별 테스트 가능하게 합니다.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Feb 18, 2026 1:25am

Request Review

@jk-kim0 jk-kim0 self-assigned this Feb 18, 2026
@jk-kim0 jk-kim0 merged commit 605bfa6 into main Feb 18, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the refactor/code-quality-3 branch February 18, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant